react-native-screen-transitions 3.12.0 → 3.13.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js +1 -2
- package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js.map +1 -1
- package/lib/commonjs/shared/components/activity/helpers.js +50 -1
- package/lib/commonjs/shared/components/activity/helpers.js.map +1 -1
- package/lib/commonjs/shared/components/activity/variants/activity-screen.js +17 -68
- package/lib/commonjs/shared/components/activity/variants/activity-screen.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/components/boundary-lifecycle.js +0 -3
- package/lib/commonjs/shared/components/boundary/components/boundary-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js +1 -1
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.js +69 -0
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js +11 -10
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +3 -19
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +8 -17
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +27 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +27 -11
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +8 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.js +19 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.js +18 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +22 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +10 -10
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +19 -12
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +6 -6
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/helpers/create-overlay-interpolator-frame.js +9 -2
- package/lib/commonjs/shared/components/overlay/helpers/create-overlay-interpolator-frame.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js +16 -4
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/hooks/use-overlay-slot.js +11 -6
- package/lib/commonjs/shared/components/overlay/hooks/use-overlay-slot.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js +5 -4
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +1 -3
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +8 -6
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
- package/lib/commonjs/shared/factories/screen-topology/create-screen-topology.js +147 -0
- package/lib/commonjs/shared/factories/screen-topology/create-screen-topology.js.map +1 -0
- package/lib/commonjs/shared/factories/screen-topology/index.js +45 -0
- package/lib/commonjs/shared/factories/screen-topology/index.js.map +1 -0
- package/lib/commonjs/shared/factories/screen-topology/types.js +2 -0
- package/lib/commonjs/shared/factories/screen-topology/types.js.map +1 -0
- package/lib/commonjs/shared/factories/screen-topology/use-screen-relationships.js +15 -0
- package/lib/commonjs/shared/factories/screen-topology/use-screen-relationships.js.map +1 -0
- package/lib/commonjs/shared/factories/screen-topology/worklet.js +55 -0
- package/lib/commonjs/shared/factories/screen-topology/worklet.js.map +1 -0
- package/lib/commonjs/shared/hooks/navigation/use-screen-state.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-stack.js +16 -16
- package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +4 -0
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +26 -95
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +6 -52
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +5 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +12 -12
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js +4 -13
- package/lib/commonjs/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/stack-progress.js +10 -26
- package/lib/commonjs/shared/providers/screen/animation/helpers/stack-progress.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +0 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/index.js +6 -0
- package/lib/commonjs/shared/providers/screen/animation/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +8 -7
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js +62 -15
- package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +3 -4
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js +24 -19
- package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +3 -3
- package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture.js +2 -3
- package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/index.js +8 -2
- package/lib/commonjs/shared/providers/screen/gestures/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.js +11 -18
- package/lib/commonjs/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/ownership/resolve-ownership.js +5 -7
- package/lib/commonjs/shared/providers/screen/gestures/ownership/resolve-ownership.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js +4 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-release.js +9 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.js +5 -8
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +5 -4
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/walk-up-scroll-gesture-coordination.js +1 -3
- package/lib/commonjs/shared/providers/screen/gestures/scroll-coordination/walk-up-scroll-gesture-coordination.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +4 -4
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/constants.js +2 -1
- package/lib/commonjs/shared/providers/screen/styles/constants.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-block-ownership.js +19 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-block-ownership.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js +4 -2
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +5 -8
- 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 +35 -15
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/index.js +8 -2
- package/lib/commonjs/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +23 -16
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/use-current-screen-relationships.js +14 -0
- package/lib/commonjs/shared/providers/screen/use-current-screen-relationships.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/blank-stack.provider.js +13 -5
- package/lib/commonjs/shared/providers/stack/blank-stack.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/core.provider.js +1 -3
- package/lib/commonjs/shared/providers/stack/core.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/direct.provider.js +2 -5
- package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/commonjs/shared/stores/animation.store.js +0 -2
- package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +11 -1
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/clear.js +6 -0
- package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/coordinator.js +312 -0
- package/lib/commonjs/shared/stores/bounds/internals/coordinator.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/internals/entries.js +0 -27
- package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +22 -32
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/state.js +4 -1
- package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +7 -3
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +11 -0
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +6 -2
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +11 -5
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/commonjs/shared/utils/create-provider.js +51 -100
- package/lib/commonjs/shared/utils/create-provider.js.map +1 -1
- package/lib/module/shared/adapters/with-screen-transitions/stack-layout.js +1 -2
- package/lib/module/shared/adapters/with-screen-transitions/stack-layout.js.map +1 -1
- package/lib/module/shared/components/activity/helpers.js +48 -0
- package/lib/module/shared/components/activity/helpers.js.map +1 -1
- package/lib/module/shared/components/activity/variants/activity-screen.js +18 -69
- package/lib/module/shared/components/activity/variants/activity-screen.js.map +1 -1
- package/lib/module/shared/components/boundary/components/boundary-lifecycle.js +0 -3
- package/lib/module/shared/components/boundary/components/boundary-lifecycle.js.map +1 -1
- package/lib/module/shared/components/boundary/components/boundary-target.js +2 -2
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.js +64 -0
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js +11 -10
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +3 -19
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-measurer.js +9 -18
- package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +24 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +29 -13
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +8 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.js +14 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.js +13 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +19 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +10 -10
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +20 -13
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +5 -6
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/module/shared/components/overlay/helpers/create-overlay-interpolator-frame.js +7 -1
- package/lib/module/shared/components/overlay/helpers/create-overlay-interpolator-frame.js.map +1 -1
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js +16 -4
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/module/shared/components/overlay/hooks/use-overlay-slot.js +12 -7
- package/lib/module/shared/components/overlay/hooks/use-overlay-slot.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/overlay-host.js +7 -6
- package/lib/module/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +2 -3
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +9 -7
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
- package/lib/module/shared/factories/screen-topology/create-screen-topology.js +142 -0
- package/lib/module/shared/factories/screen-topology/create-screen-topology.js.map +1 -0
- package/lib/module/shared/factories/screen-topology/index.js +6 -0
- package/lib/module/shared/factories/screen-topology/index.js.map +1 -0
- package/lib/module/shared/factories/screen-topology/types.js +2 -0
- package/lib/module/shared/factories/screen-topology/types.js.map +1 -0
- package/lib/module/shared/factories/screen-topology/use-screen-relationships.js +10 -0
- package/lib/module/shared/factories/screen-topology/use-screen-relationships.js.map +1 -0
- package/lib/module/shared/factories/screen-topology/worklet.js +48 -0
- package/lib/module/shared/factories/screen-topology/worklet.js.map +1 -0
- package/lib/module/shared/hooks/navigation/use-screen-state.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-stack.js +17 -18
- package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +4 -0
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/animation.provider.js +25 -95
- package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +6 -52
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +5 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +14 -14
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js +4 -13
- package/lib/module/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/stack-progress.js +9 -24
- package/lib/module/shared/providers/screen/animation/helpers/stack-progress.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +0 -1
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/index.js +1 -1
- package/lib/module/shared/providers/screen/animation/index.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js +9 -8
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js +66 -18
- package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +3 -4
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/gestures.provider.js +21 -17
- package/lib/module/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +3 -3
- package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture.js +3 -4
- package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/index.js +1 -1
- package/lib/module/shared/providers/screen/gestures/index.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.js +13 -20
- package/lib/module/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/ownership/resolve-ownership.js +5 -7
- package/lib/module/shared/providers/screen/gestures/ownership/resolve-ownership.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js +4 -1
- package/lib/module/shared/providers/screen/gestures/pan/activation/use-pan-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-release.js +9 -2
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +1 -0
- package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.js +4 -8
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js +7 -6
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/walk-up-scroll-gesture-coordination.js +1 -3
- package/lib/module/shared/providers/screen/gestures/scroll-coordination/walk-up-scroll-gesture-coordination.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/policy.js +4 -4
- package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/constants.js +2 -1
- package/lib/module/shared/providers/screen/styles/constants.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/visibility-block-ownership.js +14 -0
- package/lib/module/shared/providers/screen/styles/helpers/visibility-block-ownership.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js +5 -3
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +5 -8
- 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 +35 -15
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/index.js +1 -1
- package/lib/module/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/slot.provider.js +20 -14
- package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/use-current-screen-relationships.js +9 -0
- package/lib/module/shared/providers/screen/use-current-screen-relationships.js.map +1 -0
- package/lib/module/shared/providers/stack/blank-stack.provider.js +12 -5
- package/lib/module/shared/providers/stack/blank-stack.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/core.provider.js +1 -3
- package/lib/module/shared/providers/stack/core.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/direct.provider.js +2 -5
- package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/module/shared/stores/animation.store.js +0 -2
- package/lib/module/shared/stores/animation.store.js.map +1 -1
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +9 -0
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/clear.js +7 -1
- package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/coordinator.js +300 -0
- package/lib/module/shared/stores/bounds/internals/coordinator.js.map +1 -0
- package/lib/module/shared/stores/bounds/internals/entries.js +1 -27
- package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +24 -32
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/state.js +3 -0
- package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +7 -3
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +11 -0
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +6 -2
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js +11 -5
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/module/shared/utils/create-provider.js +51 -100
- package/lib/module/shared/utils/create-provider.js.map +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/helpers.d.ts +16 -0
- package/lib/typescript/shared/components/activity/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts +2 -4
- package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/{use-initial-source-measurement.d.ts → use-boundary-measurement-request.d.ts} +4 -3
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +1 -3
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.d.ts +6 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts +4 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts +2 -3
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +3 -0
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/types.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/helpers/create-overlay-interpolator-frame.d.ts +1 -0
- package/lib/typescript/shared/components/overlay/helpers/create-overlay-interpolator-frame.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/hooks/use-overlay-slot.d.ts +2 -1
- package/lib/typescript/shared/components/overlay/hooks/use-overlay-slot.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.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-lifecycle/hooks/use-close-transition-intent.d.ts +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -1
- package/lib/typescript/shared/factories/screen-topology/create-screen-topology.d.ts +4 -0
- package/lib/typescript/shared/factories/screen-topology/create-screen-topology.d.ts.map +1 -0
- package/lib/typescript/shared/factories/screen-topology/index.d.ts +5 -0
- package/lib/typescript/shared/factories/screen-topology/index.d.ts.map +1 -0
- package/lib/typescript/shared/factories/screen-topology/types.d.ts +20 -0
- package/lib/typescript/shared/factories/screen-topology/types.d.ts.map +1 -0
- package/lib/typescript/shared/factories/screen-topology/use-screen-relationships.d.ts +5 -0
- package/lib/typescript/shared/factories/screen-topology/use-screen-relationships.d.ts.map +1 -0
- package/lib/typescript/shared/factories/screen-topology/worklet.d.ts +5 -0
- package/lib/typescript/shared/factories/screen-topology/worklet.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/navigation/use-screen-state.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +2 -0
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +14 -12
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts +4 -4
- package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts +0 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.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/animation/helpers/read-screen-animation-revisions.d.ts +2 -2
- package/lib/typescript/shared/providers/screen/animation/helpers/read-screen-animation-revisions.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/stack-progress.d.ts +5 -2
- package/lib/typescript/shared/providers/screen/animation/helpers/stack-progress.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +0 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/index.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/types.d.ts +1 -13
- package/lib/typescript/shared/providers/screen/animation/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts +5 -2
- package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +5 -4
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/gestures.provider.d.ts +16 -4
- package/lib/typescript/shared/providers/screen/gestures/gestures.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/hooks/use-screen-gesture-config.d.ts +2 -2
- package/lib/typescript/shared/providers/screen/gestures/hooks/use-screen-gesture-config.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/hooks/use-screen-gesture.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/index.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/gestures/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/ownership/resolve-ownership.d.ts +2 -3
- package/lib/typescript/shared/providers/screen/gestures/ownership/resolve-ownership.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/activation/use-pan-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-release.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.d.ts +5 -3
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/walk-up-scroll-gesture-coordination.d.ts +2 -2
- package/lib/typescript/shared/providers/screen/gestures/scroll-coordination/walk-up-scroll-gesture-coordination.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +3 -3
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts +5 -2
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/constants.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/visibility-block-ownership.d.ts +10 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/visibility-block-ownership.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -1
- 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 +8 -2
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/index.d.ts +1 -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 +9 -3
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/use-current-screen-relationships.d.ts +5 -0
- package/lib/typescript/shared/providers/screen/use-current-screen-relationships.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/blank-stack.provider.d.ts +4 -1
- package/lib/typescript/shared/providers/stack/blank-stack.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/core.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts +0 -1
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +1 -0
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/coordinator.d.ts +36 -0
- package/lib/typescript/shared/stores/bounds/internals/coordinator.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts +1 -2
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +1 -3
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts +3 -1
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +12 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/types/providers/blank-stack-provider.types.d.ts +1 -0
- package/lib/typescript/shared/types/providers/blank-stack-provider.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
- package/lib/typescript/shared/utils/create-provider.d.ts +24 -24
- package/lib/typescript/shared/utils/create-provider.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/adapters/with-screen-transitions/stack-layout.tsx +1 -2
- package/src/shared/components/activity/helpers.ts +59 -0
- package/src/shared/components/activity/variants/activity-screen.tsx +29 -94
- package/src/shared/components/boundary/components/boundary-lifecycle.tsx +0 -6
- package/src/shared/components/boundary/components/boundary-target.tsx +2 -2
- package/src/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.ts +102 -0
- package/src/shared/components/boundary/hooks/lifecycles/use-boundary-presence.ts +20 -11
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +3 -22
- package/src/shared/components/boundary/hooks/use-measurer.ts +8 -22
- package/src/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.ts +40 -0
- package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +73 -22
- package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +10 -1
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.ts +19 -0
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.ts +14 -0
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.ts +36 -1
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts +22 -13
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +28 -15
- package/src/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +1 -1
- package/src/shared/components/boundary/providers/boundary-root.provider.tsx +10 -6
- package/src/shared/components/boundary/types.ts +1 -1
- package/src/shared/components/overlay/helpers/create-overlay-interpolator-frame.ts +14 -1
- package/src/shared/components/overlay/helpers/get-active-overlay.ts +29 -4
- package/src/shared/components/overlay/hooks/use-overlay-slot.ts +26 -8
- package/src/shared/components/overlay/variations/overlay-host.tsx +11 -6
- package/src/shared/components/screen-container/layers/content.tsx +3 -4
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition-intent.ts +8 -12
- package/src/shared/factories/screen-topology/create-screen-topology.ts +199 -0
- package/src/shared/factories/screen-topology/index.ts +16 -0
- package/src/shared/factories/screen-topology/types.ts +22 -0
- package/src/shared/factories/screen-topology/use-screen-relationships.ts +15 -0
- package/src/shared/factories/screen-topology/worklet.ts +60 -0
- package/src/shared/hooks/navigation/use-screen-state.ts +2 -7
- package/src/shared/hooks/navigation/use-stack.tsx +28 -31
- package/src/shared/providers/helpers/measured-bounds-writes.ts +5 -0
- package/src/shared/providers/screen/animation/animation.provider.tsx +73 -206
- package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +10 -81
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +18 -3
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +0 -1
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +19 -22
- package/src/shared/providers/screen/animation/helpers/read-screen-animation-revisions.ts +6 -30
- package/src/shared/providers/screen/animation/helpers/stack-progress.ts +13 -32
- package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +0 -2
- package/src/shared/providers/screen/animation/index.tsx +1 -0
- package/src/shared/providers/screen/animation/types.ts +1 -23
- package/src/shared/providers/screen/animation/use-screen-animation.tsx +10 -14
- package/src/shared/providers/screen/descriptors/descriptors.provider.tsx +110 -23
- package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +6 -6
- package/src/shared/providers/screen/gestures/gestures.provider.tsx +96 -85
- package/src/shared/providers/screen/gestures/hooks/use-screen-gesture-config.ts +4 -4
- package/src/shared/providers/screen/gestures/hooks/use-screen-gesture.ts +3 -4
- package/src/shared/providers/screen/gestures/index.tsx +2 -1
- package/src/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.tsx +16 -29
- package/src/shared/providers/screen/gestures/ownership/resolve-ownership.ts +5 -8
- package/src/shared/providers/screen/gestures/pan/activation/use-pan-activation.ts +2 -3
- package/src/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.ts +1 -0
- package/src/shared/providers/screen/gestures/pan/behavior/pan-release.ts +12 -2
- package/src/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.ts +1 -0
- package/src/shared/providers/screen/gestures/scroll-coordination/scroll-metadata-owner.tsx +6 -9
- package/src/shared/providers/screen/gestures/scroll-coordination/use-scroll-gesture-coordination.ts +11 -7
- package/src/shared/providers/screen/gestures/scroll-coordination/walk-up-scroll-gesture-coordination.ts +12 -12
- package/src/shared/providers/screen/gestures/shared/policy.ts +7 -7
- package/src/shared/providers/screen/gestures/types.ts +6 -2
- package/src/shared/providers/screen/styles/constants.ts +1 -0
- package/src/shared/providers/screen/styles/helpers/visibility-block-ownership.ts +16 -0
- package/src/shared/providers/screen/styles/hooks/slot-resolvers.tsx +10 -3
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +7 -17
- package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +40 -15
- package/src/shared/providers/screen/styles/index.tsx +2 -1
- package/src/shared/providers/screen/styles/slot.provider.tsx +30 -15
- package/src/shared/providers/screen/use-current-screen-relationships.ts +10 -0
- package/src/shared/providers/stack/blank-stack.provider.tsx +19 -6
- package/src/shared/providers/stack/core.provider.tsx +0 -1
- package/src/shared/providers/stack/direct.provider.tsx +2 -4
- package/src/shared/stores/animation.store.ts +0 -3
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +12 -0
- package/src/shared/stores/bounds/internals/clear.ts +12 -1
- package/src/shared/stores/bounds/internals/coordinator.ts +415 -0
- package/src/shared/stores/bounds/internals/entries.ts +1 -38
- package/src/shared/stores/bounds/internals/links.ts +28 -38
- package/src/shared/stores/bounds/internals/state.ts +10 -1
- package/src/shared/stores/bounds/types.ts +18 -1
- package/src/shared/types/providers/blank-stack-provider.types.ts +1 -0
- package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +8 -3
- package/src/shared/utils/bounds/helpers/create-link-accessor.ts +11 -0
- package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +3 -2
- package/src/shared/utils/bounds/helpers/resolve-bounds-pair-key.ts +0 -1
- package/src/shared/utils/bounds/helpers/styles/compute.ts +12 -5
- package/src/shared/utils/create-provider.tsx +135 -200
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +0 -177
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js +0 -49
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +0 -69
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +0 -68
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +0 -97
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js +0 -43
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +0 -29
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/ancestors.js +0 -23
- package/lib/commonjs/shared/providers/screen/gestures/shared/ancestors.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +0 -173
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js +0 -44
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +0 -64
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +0 -1
- package/lib/module/shared/components/boundary/utils/destination-signals.js +0 -63
- package/lib/module/shared/components/boundary/utils/destination-signals.js.map +0 -1
- package/lib/module/shared/components/boundary/utils/refresh-signals.js +0 -92
- package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +0 -1
- package/lib/module/shared/components/boundary/utils/source-signals.js +0 -38
- package/lib/module/shared/components/boundary/utils/source-signals.js.map +0 -1
- package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +0 -25
- package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/shared/ancestors.js +0 -19
- package/lib/module/shared/providers/screen/gestures/shared/ancestors.js.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +0 -10
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts +0 -10
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts +0 -16
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts +0 -19
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts +0 -14
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts +0 -6
- package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/ancestors.d.ts +0 -11
- package/lib/typescript/shared/providers/screen/gestures/shared/ancestors.d.ts.map +0 -1
- package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +0 -267
- package/src/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.ts +0 -51
- package/src/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +0 -90
- package/src/shared/components/boundary/utils/destination-signals.ts +0 -75
- package/src/shared/components/boundary/utils/refresh-signals.ts +0 -164
- package/src/shared/components/boundary/utils/source-signals.ts +0 -51
- package/src/shared/providers/screen/descriptors/helpers/get-ancestor-keys.ts +0 -28
- package/src/shared/providers/screen/gestures/shared/ancestors.ts +0 -27
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
import type { SharedValue } from "react-native-reanimated";
|
|
2
|
+
import {
|
|
3
|
+
registerWorkletScreen,
|
|
4
|
+
screenBelongsToScope,
|
|
5
|
+
unregisterWorkletScreen,
|
|
6
|
+
} from "../../../factories/screen-topology";
|
|
7
|
+
import {
|
|
8
|
+
ensurePairDestinationRequests,
|
|
9
|
+
ensurePairGroups,
|
|
10
|
+
ensurePairLinks,
|
|
11
|
+
ensurePairSourceRequests,
|
|
12
|
+
getDestinationScreenKeyFromPairKey,
|
|
13
|
+
getGroupKeyFromTag,
|
|
14
|
+
getLinkKeyFromTag,
|
|
15
|
+
getSourceScreenKeyFromPairKey,
|
|
16
|
+
} from "../helpers/link-pairs.helpers";
|
|
17
|
+
import type {
|
|
18
|
+
BoundsScreenNode,
|
|
19
|
+
BoundTag,
|
|
20
|
+
EntryPatch,
|
|
21
|
+
LinkKey,
|
|
22
|
+
LinkPairsState,
|
|
23
|
+
ScreenKey,
|
|
24
|
+
ScreenPairKey,
|
|
25
|
+
TagID,
|
|
26
|
+
} from "../types";
|
|
27
|
+
import { removeEntry, setEntry } from "./entries";
|
|
28
|
+
import { boundaryRegistry, boundsScreens, pairs } from "./state";
|
|
29
|
+
|
|
30
|
+
type MeasurementRequest = {
|
|
31
|
+
type: "source" | "destination";
|
|
32
|
+
pairKey: ScreenPairKey;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
type RegisterScreenParams = {
|
|
36
|
+
screenKey: ScreenKey;
|
|
37
|
+
parentScreenKey?: ScreenKey;
|
|
38
|
+
animationProgress: SharedValue<number>;
|
|
39
|
+
pendingLifecycleStartBlockCount: SharedValue<number>;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
type RegisterBoundaryParams = {
|
|
43
|
+
boundTag: BoundTag;
|
|
44
|
+
screenKey: ScreenKey;
|
|
45
|
+
entry: EntryPatch;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
type RequestBoundaryMeasurementsParams = {
|
|
49
|
+
pairKey: ScreenPairKey;
|
|
50
|
+
tag: TagID;
|
|
51
|
+
destination: boolean;
|
|
52
|
+
refresh: boolean;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const getRequestedLinkKey = (
|
|
56
|
+
state: LinkPairsState,
|
|
57
|
+
pairKey: ScreenPairKey,
|
|
58
|
+
tag: TagID,
|
|
59
|
+
): LinkKey => {
|
|
60
|
+
"worklet";
|
|
61
|
+
const requestedLinkKey = getLinkKeyFromTag(tag);
|
|
62
|
+
const group = getGroupKeyFromTag(tag);
|
|
63
|
+
return group
|
|
64
|
+
? (state[pairKey]?.groups[group]?.activeId ?? requestedLinkKey)
|
|
65
|
+
: requestedLinkKey;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const getConcreteTag = (
|
|
69
|
+
state: LinkPairsState,
|
|
70
|
+
pairKey: ScreenPairKey,
|
|
71
|
+
tag: TagID,
|
|
72
|
+
): TagID => {
|
|
73
|
+
"worklet";
|
|
74
|
+
const group = getGroupKeyFromTag(tag);
|
|
75
|
+
const linkKey = getRequestedLinkKey(state, pairKey, tag);
|
|
76
|
+
return group ? `${group}:${linkKey}` : linkKey;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const hasRegisteredDestination = (
|
|
80
|
+
pairKey: ScreenPairKey,
|
|
81
|
+
tag: TagID,
|
|
82
|
+
): boolean => {
|
|
83
|
+
"worklet";
|
|
84
|
+
const destinationRoot = getDestinationScreenKeyFromPairKey(pairKey);
|
|
85
|
+
if (!destinationRoot) return false;
|
|
86
|
+
|
|
87
|
+
const screens = boundaryRegistry.get()[tag]?.screens;
|
|
88
|
+
for (const screenKey in screens) {
|
|
89
|
+
if (screenBelongsToScope(screenKey, destinationRoot)) return true;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return false;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const hasRegisteredSource = (pairKey: ScreenPairKey, tag: TagID): boolean => {
|
|
96
|
+
"worklet";
|
|
97
|
+
const sourceRoot = getSourceScreenKeyFromPairKey(pairKey);
|
|
98
|
+
const screens = boundaryRegistry.get()[tag]?.screens;
|
|
99
|
+
for (const screenKey in screens) {
|
|
100
|
+
if (screenBelongsToScope(screenKey, sourceRoot)) return true;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return false;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const claimDestinationBlock = (pairKey: ScreenPairKey, tag: TagID) => {
|
|
107
|
+
"worklet";
|
|
108
|
+
const state = pairs.get();
|
|
109
|
+
const linkKey = getRequestedLinkKey(state, pairKey, tag);
|
|
110
|
+
const pair = state[pairKey];
|
|
111
|
+
if (
|
|
112
|
+
!pair?.destinationRequests?.[linkKey] ||
|
|
113
|
+
pair.blockedDestinations?.[linkKey]
|
|
114
|
+
) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const concreteTag = getConcreteTag(state, pairKey, tag);
|
|
119
|
+
if (
|
|
120
|
+
!hasRegisteredSource(pairKey, concreteTag) ||
|
|
121
|
+
!hasRegisteredDestination(pairKey, concreteTag)
|
|
122
|
+
) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const destinationRoot = getDestinationScreenKeyFromPairKey(pairKey);
|
|
127
|
+
const destinationScreen = boundsScreens.get()[destinationRoot];
|
|
128
|
+
if (!destinationScreen || destinationScreen.animationProgress.get() > 0) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
destinationScreen.pendingLifecycleStartBlockCount.modify(
|
|
133
|
+
<T extends number>(count: T): T => {
|
|
134
|
+
"worklet";
|
|
135
|
+
return (count + 1) as T;
|
|
136
|
+
},
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
pairs.modify(<T extends LinkPairsState>(current: T): T => {
|
|
140
|
+
"worklet";
|
|
141
|
+
const currentPair = current[pairKey];
|
|
142
|
+
if (!currentPair) return current;
|
|
143
|
+
if (!currentPair.blockedDestinations) {
|
|
144
|
+
currentPair.blockedDestinations = {};
|
|
145
|
+
}
|
|
146
|
+
currentPair.blockedDestinations[linkKey] = true;
|
|
147
|
+
return current;
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const releaseDestinationBlock = (pairKey: ScreenPairKey, linkKey: LinkKey) => {
|
|
152
|
+
"worklet";
|
|
153
|
+
const pair = pairs.get()[pairKey];
|
|
154
|
+
if (!pair?.blockedDestinations?.[linkKey]) return;
|
|
155
|
+
|
|
156
|
+
const destinationRoot = getDestinationScreenKeyFromPairKey(pairKey);
|
|
157
|
+
const destinationScreen = boundsScreens.get()[destinationRoot];
|
|
158
|
+
destinationScreen?.pendingLifecycleStartBlockCount.modify(
|
|
159
|
+
<T extends number>(count: T): T => {
|
|
160
|
+
"worklet";
|
|
161
|
+
return Math.max(0, count - 1) as T;
|
|
162
|
+
},
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
166
|
+
"worklet";
|
|
167
|
+
delete state[pairKey]?.blockedDestinations?.[linkKey];
|
|
168
|
+
return state;
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const releaseDestinationBlockWhenReady = (
|
|
173
|
+
pairKey: ScreenPairKey,
|
|
174
|
+
linkKey: LinkKey,
|
|
175
|
+
) => {
|
|
176
|
+
"worklet";
|
|
177
|
+
const pair = pairs.get()[pairKey];
|
|
178
|
+
const link = pair?.links[linkKey];
|
|
179
|
+
if (!link?.source || !link.destination) return;
|
|
180
|
+
if (link.source.escapeClipping && !pair.portalReadySources?.[linkKey]) return;
|
|
181
|
+
releaseDestinationBlock(pairKey, linkKey);
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export function registerScreen(params: RegisterScreenParams) {
|
|
185
|
+
"worklet";
|
|
186
|
+
const node: BoundsScreenNode = {
|
|
187
|
+
animationProgress: params.animationProgress,
|
|
188
|
+
pendingLifecycleStartBlockCount: params.pendingLifecycleStartBlockCount,
|
|
189
|
+
};
|
|
190
|
+
registerWorkletScreen({
|
|
191
|
+
screenKey: params.screenKey,
|
|
192
|
+
parentScreenKey: params.parentScreenKey,
|
|
193
|
+
});
|
|
194
|
+
boundsScreens.modify(<T extends typeof boundsScreens.value>(state: T): T => {
|
|
195
|
+
"worklet";
|
|
196
|
+
(state as typeof boundsScreens.value)[params.screenKey] = node;
|
|
197
|
+
return state;
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
const state = pairs.get();
|
|
201
|
+
for (const pairKey in state) {
|
|
202
|
+
const requests = state[pairKey]?.destinationRequests;
|
|
203
|
+
for (const linkKey in requests) {
|
|
204
|
+
claimDestinationBlock(pairKey, linkKey);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function unregisterScreen(screenKey: ScreenKey) {
|
|
210
|
+
"worklet";
|
|
211
|
+
unregisterWorkletScreen(screenKey);
|
|
212
|
+
boundsScreens.modify(<T extends typeof boundsScreens.value>(state: T): T => {
|
|
213
|
+
"worklet";
|
|
214
|
+
delete state[screenKey];
|
|
215
|
+
return state;
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function registerBoundary({
|
|
220
|
+
boundTag,
|
|
221
|
+
screenKey,
|
|
222
|
+
entry,
|
|
223
|
+
}: RegisterBoundaryParams) {
|
|
224
|
+
"worklet";
|
|
225
|
+
setEntry(boundTag.tag, screenKey, entry);
|
|
226
|
+
|
|
227
|
+
const state = pairs.get();
|
|
228
|
+
for (const pairKey in state) {
|
|
229
|
+
const linkKey = getRequestedLinkKey(state, pairKey, boundTag.tag);
|
|
230
|
+
if (state[pairKey]?.destinationRequests?.[linkKey]) {
|
|
231
|
+
claimDestinationBlock(pairKey, boundTag.tag);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function unregisterBoundary(boundTag: BoundTag, screenKey: ScreenKey) {
|
|
237
|
+
"worklet";
|
|
238
|
+
removeEntry(boundTag.tag, screenKey);
|
|
239
|
+
if (!boundsScreens.get()[screenKey]) return;
|
|
240
|
+
|
|
241
|
+
const state = pairs.get();
|
|
242
|
+
for (const pairKey in state) {
|
|
243
|
+
const concreteTag = getConcreteTag(state, pairKey, boundTag.tag);
|
|
244
|
+
const type =
|
|
245
|
+
screenBelongsToScope(screenKey, getSourceScreenKeyFromPairKey(pairKey)) &&
|
|
246
|
+
!hasRegisteredSource(pairKey, concreteTag)
|
|
247
|
+
? "source"
|
|
248
|
+
: screenBelongsToScope(
|
|
249
|
+
screenKey,
|
|
250
|
+
getDestinationScreenKeyFromPairKey(pairKey),
|
|
251
|
+
) && !hasRegisteredDestination(pairKey, concreteTag)
|
|
252
|
+
? "destination"
|
|
253
|
+
: null;
|
|
254
|
+
if (!type) continue;
|
|
255
|
+
|
|
256
|
+
abandonBoundaryMeasurement({
|
|
257
|
+
type,
|
|
258
|
+
pairKey,
|
|
259
|
+
tag: getRequestedLinkKey(state, pairKey, boundTag.tag),
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export function requestBoundaryMeasurements({
|
|
265
|
+
pairKey,
|
|
266
|
+
tag,
|
|
267
|
+
destination,
|
|
268
|
+
refresh,
|
|
269
|
+
}: RequestBoundaryMeasurementsParams) {
|
|
270
|
+
"worklet";
|
|
271
|
+
const requestedLinkKey = getLinkKeyFromTag(tag);
|
|
272
|
+
const group = getGroupKeyFromTag(tag);
|
|
273
|
+
const previousActiveId = group
|
|
274
|
+
? pairs.get()[pairKey]?.groups[group]?.activeId
|
|
275
|
+
: undefined;
|
|
276
|
+
|
|
277
|
+
if (previousActiveId && previousActiveId !== requestedLinkKey) {
|
|
278
|
+
releaseDestinationBlock(pairKey, previousActiveId);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
282
|
+
"worklet";
|
|
283
|
+
const groups = ensurePairGroups(state, pairKey);
|
|
284
|
+
if (group && groups[group]?.activeId !== requestedLinkKey) {
|
|
285
|
+
groups[group] = {
|
|
286
|
+
activeId: requestedLinkKey,
|
|
287
|
+
initialId: groups[group]?.initialId ?? requestedLinkKey,
|
|
288
|
+
};
|
|
289
|
+
if (previousActiveId) {
|
|
290
|
+
delete state[pairKey]?.sourceRequests?.[previousActiveId];
|
|
291
|
+
delete state[pairKey]?.destinationRequests?.[previousActiveId];
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const linkKey = getRequestedLinkKey(state, pairKey, tag);
|
|
296
|
+
const pair = state[pairKey];
|
|
297
|
+
const link = ensurePairLinks(state, pairKey)[linkKey];
|
|
298
|
+
const refreshing = !!pair?.refreshingLinks?.[linkKey];
|
|
299
|
+
const startsRefresh = refresh && !refreshing;
|
|
300
|
+
|
|
301
|
+
if (!pair.refreshingLinks) pair.refreshingLinks = {};
|
|
302
|
+
if (refresh) {
|
|
303
|
+
pair.refreshingLinks[linkKey] = true;
|
|
304
|
+
} else {
|
|
305
|
+
delete pair.refreshingLinks[linkKey];
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
if (!link?.source || startsRefresh) {
|
|
309
|
+
ensurePairSourceRequests(state, pairKey)[linkKey] = true;
|
|
310
|
+
delete pair.portalReadySources?.[linkKey];
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
if (destination) {
|
|
314
|
+
if (group) {
|
|
315
|
+
if (!pair.destinationGroupDemands) pair.destinationGroupDemands = {};
|
|
316
|
+
pair.destinationGroupDemands[group] = true;
|
|
317
|
+
} else {
|
|
318
|
+
if (!pair.destinationLinkDemands) pair.destinationLinkDemands = {};
|
|
319
|
+
pair.destinationLinkDemands[linkKey] = true;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
if (!link?.destination || startsRefresh) {
|
|
323
|
+
ensurePairDestinationRequests(state, pairKey)[linkKey] = true;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
return state;
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
if (destination) claimDestinationBlock(pairKey, tag);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export function getBoundaryMeasurementRequest(
|
|
334
|
+
tag: TagID,
|
|
335
|
+
screenKey: ScreenKey,
|
|
336
|
+
state: LinkPairsState = pairs.get(),
|
|
337
|
+
): MeasurementRequest | null {
|
|
338
|
+
"worklet";
|
|
339
|
+
const linkKey = getLinkKeyFromTag(tag);
|
|
340
|
+
const group = getGroupKeyFromTag(tag);
|
|
341
|
+
let match: MeasurementRequest | null = null;
|
|
342
|
+
|
|
343
|
+
for (const pairKey in state) {
|
|
344
|
+
const pair = state[pairKey];
|
|
345
|
+
if (group && pair?.groups[group]?.activeId !== linkKey) continue;
|
|
346
|
+
|
|
347
|
+
const sourceRoot = getSourceScreenKeyFromPairKey(pairKey);
|
|
348
|
+
if (
|
|
349
|
+
pair?.sourceRequests?.[linkKey] &&
|
|
350
|
+
screenBelongsToScope(screenKey, sourceRoot)
|
|
351
|
+
) {
|
|
352
|
+
match = { type: "source", pairKey };
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
const destinationRoot = getDestinationScreenKeyFromPairKey(pairKey);
|
|
356
|
+
if (
|
|
357
|
+
pair?.destinationRequests?.[linkKey] &&
|
|
358
|
+
destinationRoot &&
|
|
359
|
+
screenBelongsToScope(screenKey, destinationRoot)
|
|
360
|
+
) {
|
|
361
|
+
match = { type: "destination", pairKey };
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
return match;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export function completeBoundaryMeasurement(
|
|
369
|
+
target: MeasurementRequest,
|
|
370
|
+
tag: TagID,
|
|
371
|
+
) {
|
|
372
|
+
"worklet";
|
|
373
|
+
const linkKey = getLinkKeyFromTag(tag);
|
|
374
|
+
releaseDestinationBlockWhenReady(target.pairKey, linkKey);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export function markBoundaryPortalReady(pairKey: ScreenPairKey, tag: TagID) {
|
|
378
|
+
"worklet";
|
|
379
|
+
const linkKey = getLinkKeyFromTag(tag);
|
|
380
|
+
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
381
|
+
"worklet";
|
|
382
|
+
const pair = state[pairKey];
|
|
383
|
+
if (!pair) return state;
|
|
384
|
+
if (!pair.portalReadySources) pair.portalReadySources = {};
|
|
385
|
+
pair.portalReadySources[linkKey] = true;
|
|
386
|
+
return state;
|
|
387
|
+
});
|
|
388
|
+
releaseDestinationBlockWhenReady(pairKey, linkKey);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export function abandonBoundaryMeasurement(
|
|
392
|
+
params: MeasurementRequest & { tag: TagID },
|
|
393
|
+
) {
|
|
394
|
+
"worklet";
|
|
395
|
+
const linkKey = getLinkKeyFromTag(params.tag);
|
|
396
|
+
const pair = pairs.get()[params.pairKey];
|
|
397
|
+
const hasPendingRequest =
|
|
398
|
+
params.type === "source"
|
|
399
|
+
? !!pair?.sourceRequests?.[linkKey]
|
|
400
|
+
: !!pair?.destinationRequests?.[linkKey];
|
|
401
|
+
const hasDestinationBlock = !!pair?.blockedDestinations?.[linkKey];
|
|
402
|
+
if (!hasPendingRequest && !hasDestinationBlock) return;
|
|
403
|
+
|
|
404
|
+
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
405
|
+
"worklet";
|
|
406
|
+
if (params.type === "source") {
|
|
407
|
+
delete state[params.pairKey]?.sourceRequests?.[linkKey];
|
|
408
|
+
} else {
|
|
409
|
+
delete state[params.pairKey]?.destinationRequests?.[linkKey];
|
|
410
|
+
}
|
|
411
|
+
return state;
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
releaseDestinationBlock(params.pairKey, linkKey);
|
|
415
|
+
}
|
|
@@ -62,43 +62,6 @@ function getEntry(tag: TagID, key: ScreenKey): Entry | null {
|
|
|
62
62
|
return boundaryRegistry.get()[tag]?.screens[key] ?? null;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
function getMatchingSourceScreenKey(
|
|
66
|
-
tag: TagID,
|
|
67
|
-
destinationScreenKey: ScreenKey,
|
|
68
|
-
preferredScreenKey?: ScreenKey,
|
|
69
|
-
excludedScreenKeys?: readonly ScreenKey[],
|
|
70
|
-
): ScreenKey | null {
|
|
71
|
-
"worklet";
|
|
72
|
-
const screens = boundaryRegistry.get()[tag]?.screens;
|
|
73
|
-
if (!screens) return null;
|
|
74
|
-
const isExcluded = (screenKey: ScreenKey) => {
|
|
75
|
-
"worklet";
|
|
76
|
-
for (let index = 0; index < (excludedScreenKeys?.length ?? 0); index++) {
|
|
77
|
-
if (excludedScreenKeys?.[index] === screenKey) {
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return false;
|
|
82
|
-
};
|
|
83
|
-
if (
|
|
84
|
-
preferredScreenKey &&
|
|
85
|
-
preferredScreenKey !== destinationScreenKey &&
|
|
86
|
-
!isExcluded(preferredScreenKey) &&
|
|
87
|
-
screens[preferredScreenKey]
|
|
88
|
-
) {
|
|
89
|
-
return preferredScreenKey;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
let latestScreenKey: ScreenKey | null = null;
|
|
93
|
-
for (const screenKey in screens) {
|
|
94
|
-
if (screenKey !== destinationScreenKey && !isExcluded(screenKey)) {
|
|
95
|
-
latestScreenKey = screenKey;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return latestScreenKey;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
65
|
function setEntry(tag: TagID, screenKey: ScreenKey, patch: EntryPatch) {
|
|
103
66
|
"worklet";
|
|
104
67
|
boundaryRegistry.modify(<T extends BoundaryEntriesState>(state: T): T => {
|
|
@@ -127,4 +90,4 @@ function removeEntry(tag: TagID, screenKey: ScreenKey) {
|
|
|
127
90
|
});
|
|
128
91
|
}
|
|
129
92
|
|
|
130
|
-
export { getEntry,
|
|
93
|
+
export { getEntry, removeEntry, setEntry };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
2
|
+
import { screenBelongsToScope } from "../../../factories/screen-topology";
|
|
2
3
|
import {
|
|
3
4
|
createGroupTag,
|
|
4
5
|
ensurePairGroups,
|
|
@@ -11,7 +12,6 @@ import {
|
|
|
11
12
|
getDestination as getPairDestination,
|
|
12
13
|
getLink as getPairLink,
|
|
13
14
|
getSource as getPairSource,
|
|
14
|
-
getSourceScreenKeyFromPairKey,
|
|
15
15
|
} from "../helpers/link-pairs.helpers";
|
|
16
16
|
import type {
|
|
17
17
|
BoundaryRuntimeFlags,
|
|
@@ -315,33 +315,21 @@ function setDestination(
|
|
|
315
315
|
group,
|
|
316
316
|
runtimeFlags,
|
|
317
317
|
);
|
|
318
|
+
delete state[pairKey]?.destinationRequests?.[linkKey];
|
|
318
319
|
|
|
319
320
|
return state;
|
|
320
321
|
});
|
|
321
322
|
}
|
|
322
323
|
|
|
323
324
|
function setActiveGroupId(pairKey: ScreenPairKey, group: GroupKey, tag: TagID) {
|
|
324
|
-
"worklet";
|
|
325
|
-
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
326
|
-
"worklet";
|
|
327
|
-
writeGroup(state, pairKey, group, getLinkKeyFromTag(tag));
|
|
328
|
-
return state;
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
function requestSourceMeasure(pairKey: ScreenPairKey, tag: TagID) {
|
|
333
325
|
"worklet";
|
|
334
326
|
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
335
327
|
"worklet";
|
|
336
328
|
const linkKey = getLinkKeyFromTag(tag);
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
return state;
|
|
329
|
+
writeGroup(state, pairKey, group, linkKey);
|
|
330
|
+
if (!getPairLink(state, pairKey, linkKey)?.source) {
|
|
331
|
+
ensurePairSourceRequests(state, pairKey)[linkKey] = true;
|
|
341
332
|
}
|
|
342
|
-
|
|
343
|
-
ensurePairSourceRequests(state, pairKey)[linkKey] = true;
|
|
344
|
-
|
|
345
333
|
return state;
|
|
346
334
|
});
|
|
347
335
|
}
|
|
@@ -374,14 +362,18 @@ function getResolvedLink(
|
|
|
374
362
|
const state = pairs.get();
|
|
375
363
|
const linkKey = getLinkKeyFromTag(tag);
|
|
376
364
|
const group = getGroupKeyFromTag(tag);
|
|
377
|
-
const
|
|
365
|
+
const activeId = group
|
|
366
|
+
? state[pairKey]?.groups?.[group]?.activeId
|
|
367
|
+
: undefined;
|
|
368
|
+
const resolvedLinkKey = activeId ?? linkKey;
|
|
369
|
+
const link = getPairLink(state, pairKey, resolvedLinkKey);
|
|
378
370
|
|
|
379
371
|
// Group active ids can update before the new member has a full source/destination
|
|
380
372
|
// link. As soon as the requested member has source bounds, prefer it; only
|
|
381
373
|
// fall back while the requested member has no source yet.
|
|
382
374
|
if (!group || hasSourceLink(link)) {
|
|
383
375
|
return {
|
|
384
|
-
tag,
|
|
376
|
+
tag: group ? createGroupTag(group, resolvedLinkKey) : tag,
|
|
385
377
|
link,
|
|
386
378
|
};
|
|
387
379
|
}
|
|
@@ -404,34 +396,34 @@ function getResolvedLink(
|
|
|
404
396
|
};
|
|
405
397
|
}
|
|
406
398
|
|
|
407
|
-
function
|
|
399
|
+
function getPairKeyForDestination(
|
|
408
400
|
tag: TagID,
|
|
409
401
|
screenKey: ScreenKey,
|
|
410
402
|
): ScreenPairKey | null {
|
|
411
403
|
"worklet";
|
|
412
404
|
const state = pairs.get();
|
|
413
|
-
const
|
|
405
|
+
const group = getGroupKeyFromTag(tag);
|
|
414
406
|
for (const pairKey in state) {
|
|
415
|
-
|
|
407
|
+
const resolvedLink = getResolvedLink(pairKey, tag).link;
|
|
408
|
+
if (!resolvedLink) continue;
|
|
416
409
|
if (
|
|
417
|
-
|
|
418
|
-
|
|
410
|
+
screenBelongsToScope(
|
|
411
|
+
screenKey,
|
|
412
|
+
getDestinationScreenKeyFromPairKey(pairKey),
|
|
413
|
+
) ||
|
|
414
|
+
resolvedLink.destination?.screenKey === screenKey
|
|
419
415
|
) {
|
|
420
416
|
return pairKey;
|
|
421
417
|
}
|
|
422
|
-
}
|
|
423
|
-
return null;
|
|
424
|
-
}
|
|
425
418
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
if (getResolvedLink(pairKey, tag).link) return pairKey;
|
|
419
|
+
if (!group) continue;
|
|
420
|
+
const links = state[pairKey]?.links;
|
|
421
|
+
for (const linkKey in links) {
|
|
422
|
+
const link = links[linkKey];
|
|
423
|
+
if (link?.group === group && link.destination?.screenKey === screenKey) {
|
|
424
|
+
return pairKey;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
435
427
|
}
|
|
436
428
|
return null;
|
|
437
429
|
}
|
|
@@ -457,10 +449,8 @@ export {
|
|
|
457
449
|
getDestination,
|
|
458
450
|
getLink,
|
|
459
451
|
getPairKeyForDestination,
|
|
460
|
-
getPairKeyForSource,
|
|
461
452
|
getResolvedLink,
|
|
462
453
|
getSource,
|
|
463
|
-
requestSourceMeasure,
|
|
464
454
|
setActiveGroupId,
|
|
465
455
|
setDestination,
|
|
466
456
|
setSource,
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { makeMutable } from "react-native-reanimated";
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
BoundsScreenState,
|
|
4
|
+
Entry,
|
|
5
|
+
LinkPairsState,
|
|
6
|
+
ScreenKey,
|
|
7
|
+
TagID,
|
|
8
|
+
} from "../types";
|
|
3
9
|
|
|
4
10
|
export type BoundaryEntriesState = Record<
|
|
5
11
|
TagID,
|
|
@@ -31,3 +37,6 @@ export const boundaryRegistry = makeMutable<BoundaryEntriesState>({});
|
|
|
31
37
|
* }
|
|
32
38
|
*/
|
|
33
39
|
export const pairs = makeMutable<LinkPairsState>({});
|
|
40
|
+
|
|
41
|
+
/** Bounds-only runtime values keyed by screen. Relationships live in topology. */
|
|
42
|
+
export const boundsScreens = makeMutable<BoundsScreenState>({});
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
MeasuredDimensions,
|
|
3
|
+
SharedValue,
|
|
4
|
+
StyleProps,
|
|
5
|
+
} from "react-native-reanimated";
|
|
2
6
|
import type { BoundsMethod } from "../../types/bounds.types";
|
|
3
7
|
import type { ScreenKey } from "../../types/screen.types";
|
|
4
8
|
import type {
|
|
@@ -128,6 +132,19 @@ export type LinkPairState = {
|
|
|
128
132
|
links: Record<LinkKey, TagLink>;
|
|
129
133
|
groups: Record<GroupKey, LinkGroupState>;
|
|
130
134
|
sourceRequests?: Record<LinkKey, true>;
|
|
135
|
+
destinationRequests?: Record<LinkKey, true>;
|
|
136
|
+
destinationLinkDemands?: Record<LinkKey, true>;
|
|
137
|
+
destinationGroupDemands?: Record<GroupKey, true>;
|
|
138
|
+
refreshingLinks?: Record<LinkKey, true>;
|
|
139
|
+
blockedDestinations?: Record<LinkKey, true>;
|
|
140
|
+
portalReadySources?: Record<LinkKey, true>;
|
|
131
141
|
};
|
|
132
142
|
|
|
133
143
|
export type LinkPairsState = Record<ScreenPairKey, LinkPairState>;
|
|
144
|
+
|
|
145
|
+
export type BoundsScreenNode = {
|
|
146
|
+
animationProgress: SharedValue<number>;
|
|
147
|
+
pendingLifecycleStartBlockCount: SharedValue<number>;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export type BoundsScreenState = Record<ScreenKey, BoundsScreenNode>;
|
|
@@ -36,6 +36,7 @@ export interface BlankStackStoreValue<
|
|
|
36
36
|
routes: TDescriptor["route"][];
|
|
37
37
|
scenes: BaseStackScene<TDescriptor>[];
|
|
38
38
|
scenesByKey: Record<string, BaseStackScene<TDescriptor>>;
|
|
39
|
+
paintDriverRouteKeyByRouteKey: ReadonlyMap<string, string>;
|
|
39
40
|
focusedIndex: number;
|
|
40
41
|
requestDismiss: (payload: { route: BaseStackRoute }) => boolean;
|
|
41
42
|
shouldShowFloatOverlay: boolean;
|
|
@@ -66,12 +66,15 @@ const createBoundsAccessorParts = ({
|
|
|
66
66
|
styles: (options?: BoundsComputeOptions): BoundsStyleResult => {
|
|
67
67
|
"worklet";
|
|
68
68
|
// Keep the component at its base layout for pre-animation refresh
|
|
69
|
-
// measurement, then remove generated styles again after settlement.
|
|
70
|
-
|
|
69
|
+
// measurement, then remove generated styles again after settlement. The
|
|
70
|
+
// pre-animation pass still has to reach the bounds coordinator so both
|
|
71
|
+
// endpoints are captured before generated transforms attach.
|
|
72
|
+
const shouldRenderStyles = !!props.active.animating;
|
|
73
|
+
if (!shouldRenderStyles && !props.active.willAnimate) {
|
|
71
74
|
return NO_STYLES;
|
|
72
75
|
}
|
|
73
76
|
|
|
74
|
-
|
|
77
|
+
const preparedStyles = prepareBoundStyles({
|
|
75
78
|
props,
|
|
76
79
|
options: {
|
|
77
80
|
...options,
|
|
@@ -79,6 +82,8 @@ const createBoundsAccessorParts = ({
|
|
|
79
82
|
group: normalizedIdentity.group,
|
|
80
83
|
},
|
|
81
84
|
}) as BoundsStyleResult;
|
|
85
|
+
|
|
86
|
+
return shouldRenderStyles ? preparedStyles : NO_STYLES;
|
|
82
87
|
},
|
|
83
88
|
values: getValues,
|
|
84
89
|
math: <T extends BoundsComputeOptions = BoundsComputeOptions>(
|