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,16 @@
|
|
|
1
|
+
export {
|
|
2
|
+
createScreenTopology,
|
|
3
|
+
screenTopology,
|
|
4
|
+
} from "./create-screen-topology";
|
|
5
|
+
export type {
|
|
6
|
+
ActiveScreenRegistration,
|
|
7
|
+
ScreenRelationships,
|
|
8
|
+
ScreenTopology,
|
|
9
|
+
ScreenTopologyRegistration,
|
|
10
|
+
} from "./types";
|
|
11
|
+
export { useScreenRelationships } from "./use-screen-relationships";
|
|
12
|
+
export {
|
|
13
|
+
registerWorkletScreen,
|
|
14
|
+
screenBelongsToScope,
|
|
15
|
+
unregisterWorkletScreen,
|
|
16
|
+
} from "./worklet";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type ScreenTopologyRegistration = {
|
|
2
|
+
screenKey: string;
|
|
3
|
+
parentScreenKey?: string;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export type ActiveScreenRegistration = {
|
|
7
|
+
parentScreenKey: string;
|
|
8
|
+
screenKey: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type ScreenRelationships = Readonly<{
|
|
12
|
+
parentScreenKey: string | null;
|
|
13
|
+
activeChildScreenKey: string | null;
|
|
14
|
+
}>;
|
|
15
|
+
|
|
16
|
+
export type ScreenTopology = {
|
|
17
|
+
register(registration: ScreenTopologyRegistration): void;
|
|
18
|
+
unregister(screenKey: string): void;
|
|
19
|
+
activate(registration: ActiveScreenRegistration): () => void;
|
|
20
|
+
getRelationships(screenKey: string): ScreenRelationships;
|
|
21
|
+
subscribe(screenKey: string, listener: () => void): () => void;
|
|
22
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useCallback, useSyncExternalStore } from "react";
|
|
2
|
+
import { screenTopology } from "./create-screen-topology";
|
|
3
|
+
|
|
4
|
+
export const useScreenRelationships = (screenKey: string) => {
|
|
5
|
+
const subscribe = useCallback(
|
|
6
|
+
(listener: () => void) => screenTopology.subscribe(screenKey, listener),
|
|
7
|
+
[screenKey],
|
|
8
|
+
);
|
|
9
|
+
const getSnapshot = useCallback(
|
|
10
|
+
() => screenTopology.getRelationships(screenKey),
|
|
11
|
+
[screenKey],
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
15
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { makeMutable } from "react-native-reanimated";
|
|
2
|
+
import type { ScreenTopologyRegistration } from "./types";
|
|
3
|
+
|
|
4
|
+
type WorkletScreenNode = {
|
|
5
|
+
parentScreenKey?: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
type WorkletScreenTopology = Record<string, WorkletScreenNode>;
|
|
9
|
+
|
|
10
|
+
const toStorageKey = (screenKey: string) => {
|
|
11
|
+
"worklet";
|
|
12
|
+
return `screen:${screenKey}`;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const workletScreenTopology = makeMutable<WorkletScreenTopology>({});
|
|
16
|
+
|
|
17
|
+
export const registerWorkletScreen = ({
|
|
18
|
+
screenKey,
|
|
19
|
+
parentScreenKey,
|
|
20
|
+
}: ScreenTopologyRegistration) => {
|
|
21
|
+
"worklet";
|
|
22
|
+
workletScreenTopology.modify(
|
|
23
|
+
<T extends WorkletScreenTopology>(value: T): T => {
|
|
24
|
+
"worklet";
|
|
25
|
+
(value as WorkletScreenTopology)[toStorageKey(screenKey)] = {
|
|
26
|
+
parentScreenKey,
|
|
27
|
+
};
|
|
28
|
+
return value;
|
|
29
|
+
},
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const unregisterWorkletScreen = (screenKey: string) => {
|
|
34
|
+
"worklet";
|
|
35
|
+
workletScreenTopology.modify(
|
|
36
|
+
<T extends WorkletScreenTopology>(value: T): T => {
|
|
37
|
+
"worklet";
|
|
38
|
+
const storageKey = toStorageKey(screenKey);
|
|
39
|
+
delete value[storageKey];
|
|
40
|
+
return value;
|
|
41
|
+
},
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const screenBelongsToScope = (
|
|
46
|
+
screenKey: string,
|
|
47
|
+
scopeScreenKey: string,
|
|
48
|
+
): boolean => {
|
|
49
|
+
"worklet";
|
|
50
|
+
if (screenKey === scopeScreenKey) return true;
|
|
51
|
+
|
|
52
|
+
const state = workletScreenTopology.get();
|
|
53
|
+
let parentScreenKey = state[toStorageKey(screenKey)]?.parentScreenKey;
|
|
54
|
+
while (parentScreenKey) {
|
|
55
|
+
if (parentScreenKey === scopeScreenKey) return true;
|
|
56
|
+
parentScreenKey = state[toStorageKey(parentScreenKey)]?.parentScreenKey;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return false;
|
|
60
|
+
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { Route } from "@react-navigation/native";
|
|
2
2
|
import { useCallback, useMemo } from "react";
|
|
3
3
|
import { snapDescriptorToIndex } from "../../animation/snap-to";
|
|
4
|
-
import {
|
|
5
|
-
type BaseDescriptor,
|
|
6
|
-
useDescriptorsStore,
|
|
7
|
-
} from "../../providers/screen/descriptors";
|
|
4
|
+
import { useDescriptorsStore } from "../../providers/screen/descriptors";
|
|
8
5
|
import type { ScreenTransitionConfig } from "../../types/screen.types";
|
|
9
6
|
import type { BaseStackNavigation } from "../../types/stack.types";
|
|
10
7
|
import { type StackContextValue, useStack } from "./use-stack";
|
|
@@ -65,9 +62,7 @@ export function useScreenState<
|
|
|
65
62
|
>(): ScreenState<TNavigation> {
|
|
66
63
|
const { routes, scenes, routeKeys, focusedIndex } =
|
|
67
64
|
useStack<StackContextValue>();
|
|
68
|
-
const current = useDescriptorsStore(
|
|
69
|
-
(store) => store.current,
|
|
70
|
-
) as BaseDescriptor;
|
|
65
|
+
const current = useDescriptorsStore((store) => store.current);
|
|
71
66
|
|
|
72
67
|
const index = useMemo(
|
|
73
68
|
() => routeKeys.indexOf(current.route.key),
|
|
@@ -5,12 +5,10 @@ import {
|
|
|
5
5
|
useCallback,
|
|
6
6
|
useContext,
|
|
7
7
|
useLayoutEffect,
|
|
8
|
-
useMemo,
|
|
9
8
|
useRef,
|
|
10
9
|
useSyncExternalStore,
|
|
11
10
|
} from "react";
|
|
12
|
-
import {
|
|
13
|
-
import { syncStackProgressValues } from "../../providers/screen/animation/helpers/stack-progress";
|
|
11
|
+
import type { StackProgressEntry } from "../../providers/screen/animation/helpers/stack-progress";
|
|
14
12
|
import type { StackCoreContextValue } from "../../providers/stack/core.provider";
|
|
15
13
|
import { AnimationStore } from "../../stores/animation.store";
|
|
16
14
|
import type { OverlayProps } from "../../types/overlay.types";
|
|
@@ -50,6 +48,7 @@ export interface StackContextValue extends StackCoreContextValue {
|
|
|
50
48
|
|
|
51
49
|
interface StackStoreApi {
|
|
52
50
|
getSnapshot: () => StackContextValue;
|
|
51
|
+
getStackProgressEntries: () => readonly StackProgressEntry[];
|
|
53
52
|
subscribe: (listener: () => void) => () => void;
|
|
54
53
|
}
|
|
55
54
|
|
|
@@ -58,14 +57,24 @@ interface MutableStackStoreApi extends StackStoreApi {
|
|
|
58
57
|
setSnapshot: (snapshot: StackContextValue) => boolean;
|
|
59
58
|
}
|
|
60
59
|
|
|
60
|
+
const createStackProgressEntries = (
|
|
61
|
+
routeKeys: readonly string[],
|
|
62
|
+
): readonly StackProgressEntry[] =>
|
|
63
|
+
routeKeys.map((routeKey) => ({
|
|
64
|
+
routeKey,
|
|
65
|
+
visualProgress: AnimationStore.getValue(routeKey, "visualProgress"),
|
|
66
|
+
}));
|
|
67
|
+
|
|
61
68
|
const createStackStore = (
|
|
62
69
|
initialSnapshot: StackContextValue,
|
|
63
70
|
): MutableStackStoreApi => {
|
|
64
71
|
let snapshot = initialSnapshot;
|
|
72
|
+
let stackProgressEntries = createStackProgressEntries(snapshot.routeKeys);
|
|
65
73
|
const listeners = new Set<() => void>();
|
|
66
74
|
|
|
67
75
|
return {
|
|
68
76
|
getSnapshot: () => snapshot,
|
|
77
|
+
getStackProgressEntries: () => stackProgressEntries,
|
|
69
78
|
notify: () => {
|
|
70
79
|
for (const listener of listeners) {
|
|
71
80
|
listener();
|
|
@@ -76,6 +85,11 @@ const createStackStore = (
|
|
|
76
85
|
return false;
|
|
77
86
|
}
|
|
78
87
|
|
|
88
|
+
if (!Object.is(snapshot.routeKeys, nextSnapshot.routeKeys)) {
|
|
89
|
+
stackProgressEntries = createStackProgressEntries(
|
|
90
|
+
nextSnapshot.routeKeys,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
79
93
|
snapshot = nextSnapshot;
|
|
80
94
|
return true;
|
|
81
95
|
},
|
|
@@ -91,30 +105,6 @@ const createStackStore = (
|
|
|
91
105
|
const StackContext = createContext<StackStoreApi | null>(null);
|
|
92
106
|
StackContext.displayName = "Stack";
|
|
93
107
|
|
|
94
|
-
function StackProgressOwner({ routeKeys }: { routeKeys: string[] }) {
|
|
95
|
-
const visualProgressValues = useMemo(
|
|
96
|
-
() =>
|
|
97
|
-
routeKeys.map((routeKey) =>
|
|
98
|
-
AnimationStore.getValue(routeKey, "visualProgress"),
|
|
99
|
-
),
|
|
100
|
-
[routeKeys],
|
|
101
|
-
);
|
|
102
|
-
|
|
103
|
-
const stackProgressValues = useMemo(
|
|
104
|
-
() =>
|
|
105
|
-
routeKeys.map((routeKey) =>
|
|
106
|
-
AnimationStore.getValue(routeKey, "stackProgress"),
|
|
107
|
-
),
|
|
108
|
-
[routeKeys],
|
|
109
|
-
);
|
|
110
|
-
|
|
111
|
-
useDerivedValue(() => {
|
|
112
|
-
syncStackProgressValues(visualProgressValues, stackProgressValues);
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
108
|
export function StackProvider({
|
|
119
109
|
children,
|
|
120
110
|
value,
|
|
@@ -144,10 +134,17 @@ export function StackProvider({
|
|
|
144
134
|
});
|
|
145
135
|
|
|
146
136
|
return (
|
|
147
|
-
<StackContext.Provider value={store}>
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
137
|
+
<StackContext.Provider value={store}>{children}</StackContext.Provider>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function useStackProgressEntries(): readonly StackProgressEntry[] {
|
|
142
|
+
const store = useStackStore();
|
|
143
|
+
|
|
144
|
+
return useSyncExternalStore(
|
|
145
|
+
store.subscribe,
|
|
146
|
+
store.getStackProgressEntries,
|
|
147
|
+
store.getStackProgressEntries,
|
|
151
148
|
);
|
|
152
149
|
}
|
|
153
150
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
2
|
+
import { completeBoundaryMeasurement } from "../../stores/bounds/internals/coordinator";
|
|
2
3
|
import { setEntry } from "../../stores/bounds/internals/entries";
|
|
3
4
|
import { setDestination, setSource } from "../../stores/bounds/internals/links";
|
|
4
5
|
import type { ScreenPairKey } from "../../stores/bounds/types";
|
|
@@ -70,4 +71,8 @@ export const applyMeasuredBoundsWrites = (
|
|
|
70
71
|
{ handoff },
|
|
71
72
|
);
|
|
72
73
|
}
|
|
74
|
+
|
|
75
|
+
if (linkWrite) {
|
|
76
|
+
completeBoundaryMeasurement(linkWrite, entryTag);
|
|
77
|
+
}
|
|
73
78
|
};
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { type ReactNode,
|
|
2
|
-
import { useSharedValue } from "react-native-reanimated";
|
|
1
|
+
import { type ReactNode, useMemo } from "react";
|
|
3
2
|
import { createBoundsAccessor } from "../../../utils/bounds";
|
|
4
3
|
import createProvider from "../../../utils/create-provider";
|
|
5
4
|
import { useDescriptorsStore } from "../descriptors";
|
|
5
|
+
import { useCurrentScreenRelationships } from "../use-current-screen-relationships";
|
|
6
6
|
import { useScreenAnimationPipeline } from "./helpers/pipeline";
|
|
7
|
-
import type {
|
|
8
|
-
RegisterScreenAnimationDescendant,
|
|
9
|
-
ScreenAnimationAncestorDescendantRegistrar,
|
|
10
|
-
ScreenAnimationDescendantSources,
|
|
11
|
-
ScreenAnimationSource,
|
|
12
|
-
ScreenAnimationTransitionSource,
|
|
13
|
-
} from "./types";
|
|
7
|
+
import type { ScreenAnimationTransitionSource } from "./types";
|
|
14
8
|
|
|
15
9
|
type Props = {
|
|
16
10
|
children: ReactNode;
|
|
@@ -19,203 +13,76 @@ type Props = {
|
|
|
19
13
|
export type ScreenAnimationContextValue = ReturnType<
|
|
20
14
|
typeof useScreenAnimationPipeline
|
|
21
15
|
> & {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
transitionSources: readonly ScreenAnimationTransitionSource[];
|
|
17
|
+
transitionOriginIndex: number;
|
|
18
|
+
transitionSourcesThroughSelf: readonly ScreenAnimationTransitionSource[];
|
|
19
|
+
transitionSourcesFromSelf: readonly ScreenAnimationTransitionSource[];
|
|
26
20
|
};
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
);
|
|
55
|
-
const parentAncestorDescendantScreenAnimationRegistrars = useParentStore(
|
|
56
|
-
(parentContext) =>
|
|
57
|
-
parentContext?.ancestorDescendantScreenAnimationRegistrars,
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
const {
|
|
61
|
-
screenInterpolatorProps,
|
|
62
|
-
screenInterpolatorPropsRevision,
|
|
63
|
-
selectedInterpolatorOptions,
|
|
64
|
-
nextInterpolator,
|
|
65
|
-
currentInterpolator,
|
|
66
|
-
} = useScreenAnimationPipeline();
|
|
67
|
-
|
|
68
|
-
const selfScreenAnimationSource = useMemo<ScreenAnimationSource>(
|
|
69
|
-
() => ({
|
|
70
|
-
screenInterpolatorProps,
|
|
71
|
-
screenInterpolatorPropsRevision,
|
|
22
|
+
const EMPTY_TRANSITION_SOURCES: readonly ScreenAnimationTransitionSource[] = [];
|
|
23
|
+
|
|
24
|
+
const createScreenAnimationProvider = createProvider("ScreenAnimation", {
|
|
25
|
+
global: true,
|
|
26
|
+
})<Props, ScreenAnimationContextValue>;
|
|
27
|
+
|
|
28
|
+
export const {
|
|
29
|
+
ScreenAnimationProvider,
|
|
30
|
+
useOptionalScreenAnimationStore,
|
|
31
|
+
useScreenAnimationStore,
|
|
32
|
+
}: ReturnType<typeof createScreenAnimationProvider> =
|
|
33
|
+
createScreenAnimationProvider((_props) => {
|
|
34
|
+
const currentScreenKey = useDescriptorsStore(
|
|
35
|
+
(store) => store.derivations.currentScreenKey,
|
|
36
|
+
);
|
|
37
|
+
const relationships = useCurrentScreenRelationships();
|
|
38
|
+
const pipeline = useScreenAnimationPipeline();
|
|
39
|
+
|
|
40
|
+
const screenAnimationSource = useMemo<ScreenAnimationTransitionSource>(
|
|
41
|
+
() => ({
|
|
42
|
+
screenInterpolatorProps: pipeline.screenInterpolatorProps,
|
|
43
|
+
screenInterpolatorPropsRevision:
|
|
44
|
+
pipeline.screenInterpolatorPropsRevision,
|
|
45
|
+
boundsAccessor: createBoundsAccessor(() => {
|
|
46
|
+
"worklet";
|
|
47
|
+
return pipeline.screenInterpolatorProps.get();
|
|
72
48
|
}),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
? [...currentSources, { source, depth }]
|
|
114
|
-
: currentSources.map((currentSource, index) =>
|
|
115
|
-
index === existingIndex
|
|
116
|
-
? { source, depth }
|
|
117
|
-
: currentSource,
|
|
118
|
-
);
|
|
119
|
-
|
|
120
|
-
return nextSources.sort((a, b) => a.depth - b.depth) as T;
|
|
121
|
-
},
|
|
122
|
-
);
|
|
123
|
-
|
|
124
|
-
return () => {
|
|
125
|
-
descendantScreenAnimationSources.modify(
|
|
126
|
-
<T extends ScreenAnimationDescendantSources["value"]>(
|
|
127
|
-
currentSources: T,
|
|
128
|
-
): T => {
|
|
129
|
-
"worklet";
|
|
130
|
-
return currentSources.filter(
|
|
131
|
-
(currentSource) => currentSource.source !== source,
|
|
132
|
-
) as T;
|
|
133
|
-
},
|
|
134
|
-
);
|
|
135
|
-
};
|
|
136
|
-
},
|
|
137
|
-
[descendantScreenAnimationSources],
|
|
138
|
-
);
|
|
139
|
-
|
|
140
|
-
const ancestorScreenAnimationSources = useMemo(() => {
|
|
141
|
-
if (
|
|
142
|
-
!parentScreenInterpolatorProps ||
|
|
143
|
-
!parentScreenInterpolatorPropsRevision ||
|
|
144
|
-
!parentAncestorScreenAnimationSources
|
|
145
|
-
) {
|
|
146
|
-
return [];
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return [
|
|
150
|
-
{
|
|
151
|
-
screenInterpolatorProps: parentScreenInterpolatorProps,
|
|
152
|
-
screenInterpolatorPropsRevision:
|
|
153
|
-
parentScreenInterpolatorPropsRevision,
|
|
154
|
-
},
|
|
155
|
-
...parentAncestorScreenAnimationSources,
|
|
156
|
-
];
|
|
157
|
-
}, [
|
|
158
|
-
parentScreenInterpolatorProps,
|
|
159
|
-
parentScreenInterpolatorPropsRevision,
|
|
160
|
-
parentAncestorScreenAnimationSources,
|
|
161
|
-
]);
|
|
162
|
-
|
|
163
|
-
const ancestorDescendantScreenAnimationRegistrars = useMemo(() => {
|
|
164
|
-
if (!parentRegisterDescendantScreenAnimationSource) {
|
|
165
|
-
return [];
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// Each provider exposes its own descendant registrar and forwards ancestor
|
|
169
|
-
// registrars, letting a mounted child register with every ancestor scope.
|
|
170
|
-
return [
|
|
171
|
-
{
|
|
172
|
-
register: parentRegisterDescendantScreenAnimationSource,
|
|
173
|
-
depth: 1,
|
|
174
|
-
},
|
|
175
|
-
...(parentAncestorDescendantScreenAnimationRegistrars ?? []).map(
|
|
176
|
-
(registrar) => ({
|
|
177
|
-
register: registrar.register,
|
|
178
|
-
depth: registrar.depth + 1,
|
|
179
|
-
}),
|
|
180
|
-
),
|
|
181
|
-
];
|
|
182
|
-
}, [
|
|
183
|
-
parentRegisterDescendantScreenAnimationSource,
|
|
184
|
-
parentAncestorDescendantScreenAnimationRegistrars,
|
|
185
|
-
]);
|
|
186
|
-
|
|
187
|
-
useLayoutEffect(() => {
|
|
188
|
-
const cleanups = ancestorDescendantScreenAnimationRegistrars.map(
|
|
189
|
-
(registrar) =>
|
|
190
|
-
registrar.register(
|
|
191
|
-
selfScreenAnimationTransitionSource,
|
|
192
|
-
registrar.depth,
|
|
193
|
-
),
|
|
194
|
-
);
|
|
195
|
-
|
|
196
|
-
return () => {
|
|
197
|
-
for (const cleanup of cleanups) {
|
|
198
|
-
cleanup();
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
}, [
|
|
202
|
-
ancestorDescendantScreenAnimationRegistrars,
|
|
203
|
-
selfScreenAnimationTransitionSource,
|
|
204
|
-
]);
|
|
205
|
-
|
|
206
|
-
return {
|
|
207
|
-
key: currentScreenKey,
|
|
208
|
-
value: {
|
|
209
|
-
screenInterpolatorProps,
|
|
210
|
-
screenInterpolatorPropsRevision,
|
|
211
|
-
selectedInterpolatorOptions,
|
|
212
|
-
nextInterpolator,
|
|
213
|
-
currentInterpolator,
|
|
214
|
-
ancestorScreenAnimationSources,
|
|
215
|
-
descendantScreenAnimationSources,
|
|
216
|
-
registerDescendantScreenAnimationSource,
|
|
217
|
-
ancestorDescendantScreenAnimationRegistrars,
|
|
218
|
-
},
|
|
219
|
-
};
|
|
220
|
-
},
|
|
221
|
-
);
|
|
49
|
+
}),
|
|
50
|
+
[
|
|
51
|
+
pipeline.screenInterpolatorProps,
|
|
52
|
+
pipeline.screenInterpolatorPropsRevision,
|
|
53
|
+
],
|
|
54
|
+
);
|
|
55
|
+
const ancestorSources =
|
|
56
|
+
useOptionalScreenAnimationStore(
|
|
57
|
+
relationships.parentScreenKey,
|
|
58
|
+
(store) => store.transitionSourcesThroughSelf,
|
|
59
|
+
) ?? EMPTY_TRANSITION_SOURCES;
|
|
60
|
+
const descendantSources =
|
|
61
|
+
useOptionalScreenAnimationStore(
|
|
62
|
+
relationships.activeChildScreenKey,
|
|
63
|
+
(store) => store.transitionSourcesFromSelf,
|
|
64
|
+
) ?? EMPTY_TRANSITION_SOURCES;
|
|
65
|
+
const transitionSourcesThroughSelf = useMemo(
|
|
66
|
+
() => [...ancestorSources, screenAnimationSource],
|
|
67
|
+
[ancestorSources, screenAnimationSource],
|
|
68
|
+
);
|
|
69
|
+
const transitionSourcesFromSelf = useMemo(
|
|
70
|
+
() => [screenAnimationSource, ...descendantSources],
|
|
71
|
+
[screenAnimationSource, descendantSources],
|
|
72
|
+
);
|
|
73
|
+
const transitionSources = useMemo(
|
|
74
|
+
() => [...transitionSourcesThroughSelf, ...descendantSources],
|
|
75
|
+
[transitionSourcesThroughSelf, descendantSources],
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
key: currentScreenKey,
|
|
80
|
+
value: {
|
|
81
|
+
...pipeline,
|
|
82
|
+
transitionSources,
|
|
83
|
+
transitionOriginIndex: ancestorSources.length,
|
|
84
|
+
transitionSourcesThroughSelf,
|
|
85
|
+
transitionSourcesFromSelf,
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
});
|
package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts
CHANGED
|
@@ -3,13 +3,8 @@ import type {
|
|
|
3
3
|
ScreenInterpolationProps,
|
|
4
4
|
ScreenTransitionTarget,
|
|
5
5
|
} from "../../../../../types/animation.types";
|
|
6
|
-
import { createBoundsAccessor } from "../../../../../utils/bounds";
|
|
7
6
|
import type { ScreenAnimationContextValue } from "../../animation.provider";
|
|
8
|
-
import type {
|
|
9
|
-
ScreenAnimationDescendantSources,
|
|
10
|
-
ScreenAnimationSource,
|
|
11
|
-
ScreenAnimationTransitionSource,
|
|
12
|
-
} from "../../types";
|
|
7
|
+
import type { ScreenAnimationTransitionSource } from "../../types";
|
|
13
8
|
|
|
14
9
|
type TransitionSourceIndex = number;
|
|
15
10
|
|
|
@@ -17,10 +12,7 @@ export type TransitionAccessorSource = ScreenAnimationTransitionSource;
|
|
|
17
12
|
|
|
18
13
|
type TransitionAccessorStore = Pick<
|
|
19
14
|
ScreenAnimationContextValue,
|
|
20
|
-
| "
|
|
21
|
-
| "screenInterpolatorPropsRevision"
|
|
22
|
-
| "ancestorScreenAnimationSources"
|
|
23
|
-
| "descendantScreenAnimationSources"
|
|
15
|
+
"transitionSources" | "transitionOriginIndex"
|
|
24
16
|
>;
|
|
25
17
|
|
|
26
18
|
const resolveTargetIndex = (
|
|
@@ -48,29 +40,9 @@ const resolveTargetIndex = (
|
|
|
48
40
|
export const createTransitionAccessor = (
|
|
49
41
|
sources: readonly TransitionAccessorSource[],
|
|
50
42
|
originIndex = 0,
|
|
51
|
-
descendantSources?: ScreenAnimationDescendantSources,
|
|
52
43
|
) => {
|
|
53
44
|
"worklet";
|
|
54
45
|
|
|
55
|
-
const getSources = (): readonly TransitionAccessorSource[] => {
|
|
56
|
-
"worklet";
|
|
57
|
-
if (!descendantSources) {
|
|
58
|
-
return sources;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const descendants = descendantSources.get();
|
|
62
|
-
if (descendants.length === 0) {
|
|
63
|
-
return sources;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const currentSources = sources.slice();
|
|
67
|
-
for (let index = 0; index < descendants.length; index++) {
|
|
68
|
-
currentSources.push(descendants[index].source);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return currentSources;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
46
|
const buildScope = (
|
|
75
47
|
sourceIndex: TransitionSourceIndex,
|
|
76
48
|
currentSources: readonly TransitionAccessorSource[],
|
|
@@ -104,64 +76,21 @@ export const createTransitionAccessor = (
|
|
|
104
76
|
|
|
105
77
|
return (target?: ScreenTransitionTarget): ScreenInterpolationProps | null => {
|
|
106
78
|
"worklet";
|
|
107
|
-
const
|
|
108
|
-
const targetIndex = resolveTargetIndex(
|
|
109
|
-
target,
|
|
110
|
-
originIndex,
|
|
111
|
-
currentSources.length,
|
|
112
|
-
);
|
|
79
|
+
const targetIndex = resolveTargetIndex(target, originIndex, sources.length);
|
|
113
80
|
if (targetIndex === -1) {
|
|
114
81
|
return null;
|
|
115
82
|
}
|
|
116
83
|
|
|
117
|
-
return buildScope(targetIndex,
|
|
84
|
+
return buildScope(targetIndex, sources);
|
|
118
85
|
};
|
|
119
86
|
};
|
|
120
87
|
|
|
121
|
-
const buildSourceBoundsAccessor = (source: ScreenAnimationSource) => {
|
|
122
|
-
"worklet";
|
|
123
|
-
return createBoundsAccessor(() => {
|
|
124
|
-
"worklet";
|
|
125
|
-
return source.screenInterpolatorProps.get();
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
|
-
|
|
129
88
|
export const useBuildTransitionAccessor = ({
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
ancestorScreenAnimationSources,
|
|
133
|
-
descendantScreenAnimationSources,
|
|
89
|
+
transitionSources,
|
|
90
|
+
transitionOriginIndex,
|
|
134
91
|
}: TransitionAccessorStore) => {
|
|
135
|
-
return useMemo(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
const transitionSources: TransitionAccessorSource[] =
|
|
142
|
-
ancestorScreenAnimationSources.map((source) => ({
|
|
143
|
-
...source,
|
|
144
|
-
boundsAccessor: buildSourceBoundsAccessor(source),
|
|
145
|
-
}));
|
|
146
|
-
|
|
147
|
-
const selfTransitionSource = {
|
|
148
|
-
...selfSource,
|
|
149
|
-
boundsAccessor: buildSourceBoundsAccessor(selfSource),
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
transitionSources.reverse();
|
|
153
|
-
const originIndex = transitionSources.length;
|
|
154
|
-
transitionSources.push(selfTransitionSource);
|
|
155
|
-
|
|
156
|
-
return createTransitionAccessor(
|
|
157
|
-
transitionSources,
|
|
158
|
-
originIndex,
|
|
159
|
-
descendantScreenAnimationSources,
|
|
160
|
-
);
|
|
161
|
-
}, [
|
|
162
|
-
screenInterpolatorProps,
|
|
163
|
-
screenInterpolatorPropsRevision,
|
|
164
|
-
ancestorScreenAnimationSources,
|
|
165
|
-
descendantScreenAnimationSources,
|
|
166
|
-
]);
|
|
92
|
+
return useMemo(
|
|
93
|
+
() => createTransitionAccessor(transitionSources, transitionOriginIndex),
|
|
94
|
+
[transitionSources, transitionOriginIndex],
|
|
95
|
+
);
|
|
167
96
|
};
|