react-native-screen-transitions 3.12.0 → 3.13.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/shared/components/activity/variants/activity-screen.js +1 -1
- 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/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 +6 -16
- 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 +26 -8
- 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 +18 -6
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.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 +4 -1
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.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/interpolator-participation.js +9 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/interpolator-participation.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +13 -2
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js +40 -8
- 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 +2 -0
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.js +12 -0
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.js.map +1 -0
- 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/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/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/slot.provider.js +15 -6
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.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 +298 -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/screen-graph.js +45 -0
- package/lib/commonjs/shared/stores/bounds/internals/screen-graph.js.map +1 -0
- 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/module/shared/components/activity/variants/activity-screen.js +1 -1
- 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/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 +6 -16
- 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 +27 -9
- 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 +18 -6
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.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 +4 -1
- package/lib/module/shared/providers/screen/animation/animation.provider.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/interpolator-participation.js +4 -0
- package/lib/module/shared/providers/screen/animation/helpers/interpolator-participation.js.map +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +13 -2
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js +41 -9
- 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 +2 -0
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.js +7 -0
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.js.map +1 -0
- 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/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/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/slot.provider.js +13 -5
- package/lib/module/shared/providers/screen/styles/slot.provider.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 +286 -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/screen-graph.js +39 -0
- package/lib/module/shared/stores/bounds/internals/screen-graph.js.map +1 -0
- 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/typescript/native-stack/views/useHeaderConfigProps.d.ts +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/hooks/use-placeholder-styles.d.ts +2 -2
- 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/types.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts +5 -6
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/hooks/use-overlay-slot.d.ts +1 -1
- package/lib/typescript/shared/index.d.ts +651 -703
- package/lib/typescript/shared/index.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.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/interpolator-participation.d.ts +3 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/interpolator-participation.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- 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 +4 -0
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.d.ts +5 -0
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.d.ts.map +1 -0
- 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/types.d.ts +1 -0
- 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 +4 -4
- package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +10 -4
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
- package/lib/typescript/shared/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/screen-graph.d.ts +5 -0
- package/lib/typescript/shared/stores/bounds/internals/screen-graph.d.ts.map +1 -0
- 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 +13 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +9 -0
- package/lib/typescript/shared/types/screen.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/package.json +1 -1
- package/src/shared/components/activity/variants/activity-screen.tsx +1 -1
- package/src/shared/components/boundary/components/boundary-lifecycle.tsx +0 -6
- 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 +5 -20
- 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 +68 -20
- 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 +26 -9
- package/src/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +1 -1
- package/src/shared/components/boundary/types.ts +1 -1
- package/src/shared/providers/helpers/measured-bounds-writes.ts +5 -0
- package/src/shared/providers/screen/animation/animation.provider.tsx +7 -1
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +18 -3
- package/src/shared/providers/screen/animation/helpers/interpolator-participation.ts +6 -0
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +54 -32
- package/src/shared/providers/screen/descriptors/descriptors.provider.tsx +80 -14
- package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +6 -0
- package/src/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.ts +13 -0
- 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/types.ts +1 -0
- 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/use-maybe-block-visibility.tsx +40 -15
- package/src/shared/providers/screen/styles/slot.provider.tsx +19 -5
- 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 +403 -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/screen-graph.ts +45 -0
- package/src/shared/stores/bounds/internals/state.ts +10 -1
- package/src/shared/stores/bounds/types.ts +19 -1
- package/src/shared/types/screen.types.ts +10 -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/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/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/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/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
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { useAnimatedReaction, useSharedValue } from "react-native-reanimated";
|
|
2
|
-
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
3
|
-
import { getPairKeyForSource } from "../../../../stores/bounds/internals/links";
|
|
4
|
-
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
5
|
-
import type { BoundTag } from "../../../../stores/bounds/types";
|
|
6
|
-
import type { MeasureBoundary } from "../../types";
|
|
7
|
-
import { getInitialSourceCaptureSignal } from "../../utils/source-signals";
|
|
8
|
-
|
|
9
|
-
export const useInitialSourceMeasurement = (params: {
|
|
10
|
-
enabled: boolean;
|
|
11
|
-
measureBoundary: MeasureBoundary;
|
|
12
|
-
boundTag: BoundTag;
|
|
13
|
-
}) => {
|
|
14
|
-
const { enabled, measureBoundary, boundTag } = params;
|
|
15
|
-
const currentScreenKey = useDescriptorsStore(
|
|
16
|
-
(s) => s.derivations.currentScreenKey,
|
|
17
|
-
);
|
|
18
|
-
const lastSourceCaptureSignal = useSharedValue<string | null>(null);
|
|
19
|
-
|
|
20
|
-
useAnimatedReaction(
|
|
21
|
-
() => {
|
|
22
|
-
"worklet";
|
|
23
|
-
const sourcePairKey =
|
|
24
|
-
getPairKeyForSource(boundTag.tag, currentScreenKey) ?? undefined;
|
|
25
|
-
return getInitialSourceCaptureSignal({
|
|
26
|
-
enabled,
|
|
27
|
-
sourcePairKey,
|
|
28
|
-
linkId: boundTag.linkKey,
|
|
29
|
-
group: boundTag.group,
|
|
30
|
-
linkState: sourcePairKey ? pairs.get() : undefined,
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
(captureSignal) => {
|
|
34
|
-
"worklet";
|
|
35
|
-
if (!enabled || !captureSignal) {
|
|
36
|
-
lastSourceCaptureSignal.set(null);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (lastSourceCaptureSignal.get() === captureSignal.signal) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
lastSourceCaptureSignal.set(captureSignal.signal);
|
|
45
|
-
measureBoundary({
|
|
46
|
-
type: "source",
|
|
47
|
-
pairKey: captureSignal.pairKey,
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
);
|
|
51
|
-
};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { useAnimatedReaction } from "react-native-reanimated";
|
|
2
|
-
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
3
|
-
import { AnimationStore } from "../../../../stores/animation.store";
|
|
4
|
-
import {
|
|
5
|
-
getPairKeyForDestination,
|
|
6
|
-
getPairKeyForSource,
|
|
7
|
-
} from "../../../../stores/bounds/internals/links";
|
|
8
|
-
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
9
|
-
import type { BoundTag } from "../../../../stores/bounds/types";
|
|
10
|
-
import type { MeasureBoundary } from "../../types";
|
|
11
|
-
import { getRefreshBoundarySignal } from "../../utils/refresh-signals";
|
|
12
|
-
|
|
13
|
-
interface UseRefreshBoundaryParams {
|
|
14
|
-
enabled: boolean;
|
|
15
|
-
boundTag: BoundTag;
|
|
16
|
-
measureBoundary: MeasureBoundary;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const useRefreshBoundary = ({
|
|
20
|
-
enabled,
|
|
21
|
-
boundTag,
|
|
22
|
-
measureBoundary,
|
|
23
|
-
}: UseRefreshBoundaryParams) => {
|
|
24
|
-
const { linkKey, group } = boundTag;
|
|
25
|
-
const currentScreenKey = useDescriptorsStore(
|
|
26
|
-
(s) => s.derivations.currentScreenKey,
|
|
27
|
-
);
|
|
28
|
-
const nextScreenKey = useDescriptorsStore((s) => s.derivations.nextScreenKey);
|
|
29
|
-
// Source-side boundaries refresh from the next screen's lifecycle pulse.
|
|
30
|
-
// Destination-side boundaries have no next screen, so they refresh from self.
|
|
31
|
-
const refreshScreenKey = nextScreenKey ?? currentScreenKey;
|
|
32
|
-
const refreshWillAnimate = AnimationStore.getValue(
|
|
33
|
-
refreshScreenKey,
|
|
34
|
-
"willAnimate",
|
|
35
|
-
);
|
|
36
|
-
const refreshSettled = AnimationStore.getValue(
|
|
37
|
-
refreshScreenKey,
|
|
38
|
-
"progressSettled",
|
|
39
|
-
);
|
|
40
|
-
const refreshClosing = AnimationStore.getValue(refreshScreenKey, "closing");
|
|
41
|
-
|
|
42
|
-
useAnimatedReaction(
|
|
43
|
-
() => {
|
|
44
|
-
"worklet";
|
|
45
|
-
|
|
46
|
-
if (!enabled) return null;
|
|
47
|
-
|
|
48
|
-
const shouldRefresh = !!refreshWillAnimate.get();
|
|
49
|
-
const settled = !!refreshSettled.get();
|
|
50
|
-
// A group's active member can change while the transition is settled
|
|
51
|
-
// (for example, paging a destination gallery). Let that member publish
|
|
52
|
-
// fresh bounds even though there is no willAnimate lifecycle pulse yet.
|
|
53
|
-
if (!shouldRefresh && (!group || !settled)) {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
const sourcePairKey =
|
|
57
|
-
getPairKeyForSource(boundTag.tag, currentScreenKey) ?? undefined;
|
|
58
|
-
const destinationPairKey =
|
|
59
|
-
getPairKeyForDestination(boundTag.tag, currentScreenKey) ?? undefined;
|
|
60
|
-
|
|
61
|
-
return getRefreshBoundarySignal({
|
|
62
|
-
enabled,
|
|
63
|
-
currentScreenKey,
|
|
64
|
-
sourcePairKey,
|
|
65
|
-
destinationPairKey,
|
|
66
|
-
linkId: linkKey,
|
|
67
|
-
group,
|
|
68
|
-
shouldRefresh,
|
|
69
|
-
settled,
|
|
70
|
-
closing: !!refreshClosing.get(),
|
|
71
|
-
linkState: pairs.get(),
|
|
72
|
-
});
|
|
73
|
-
},
|
|
74
|
-
(refreshSignal, prevRefreshSignal) => {
|
|
75
|
-
"worklet";
|
|
76
|
-
|
|
77
|
-
if (
|
|
78
|
-
!refreshSignal ||
|
|
79
|
-
refreshSignal.signal === prevRefreshSignal?.signal
|
|
80
|
-
) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
measureBoundary({
|
|
85
|
-
type: refreshSignal.type,
|
|
86
|
-
pairKey: refreshSignal.pairKey,
|
|
87
|
-
});
|
|
88
|
-
},
|
|
89
|
-
);
|
|
90
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getActiveGroupId,
|
|
3
|
-
getLinkKeyFromTag,
|
|
4
|
-
} from "../../../stores/bounds/helpers/link-pairs.helpers";
|
|
5
|
-
import type {
|
|
6
|
-
LinkPairsState,
|
|
7
|
-
ScreenPairKey,
|
|
8
|
-
} from "../../../stores/bounds/types";
|
|
9
|
-
|
|
10
|
-
export type InitialDestinationMeasurementAction =
|
|
11
|
-
| "wait"
|
|
12
|
-
| "release"
|
|
13
|
-
| "measure"
|
|
14
|
-
| "complete";
|
|
15
|
-
|
|
16
|
-
export type InitialDestinationMeasurementSignal = {
|
|
17
|
-
pairKey: ScreenPairKey | null;
|
|
18
|
-
action: InitialDestinationMeasurementAction;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const getInitialDestinationMeasurementSignal = (params: {
|
|
22
|
-
enabled: boolean;
|
|
23
|
-
pairKey?: ScreenPairKey;
|
|
24
|
-
linkId: string;
|
|
25
|
-
group?: string;
|
|
26
|
-
destinationPresent: boolean;
|
|
27
|
-
sourcePresent: boolean;
|
|
28
|
-
linkState?: LinkPairsState;
|
|
29
|
-
}): InitialDestinationMeasurementSignal | null => {
|
|
30
|
-
"worklet";
|
|
31
|
-
const {
|
|
32
|
-
enabled,
|
|
33
|
-
pairKey,
|
|
34
|
-
linkId,
|
|
35
|
-
group,
|
|
36
|
-
destinationPresent,
|
|
37
|
-
sourcePresent,
|
|
38
|
-
linkState,
|
|
39
|
-
} = params;
|
|
40
|
-
if (!enabled) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (!pairKey) {
|
|
45
|
-
return { pairKey: null, action: "wait" };
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (!destinationPresent) {
|
|
49
|
-
return { pairKey, action: "wait" };
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (!sourcePresent) {
|
|
53
|
-
return { pairKey, action: "release" };
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const linkKey = getLinkKeyFromTag(linkId);
|
|
57
|
-
const activeGroupId =
|
|
58
|
-
group && linkState ? getActiveGroupId(linkState, pairKey, group) : null;
|
|
59
|
-
|
|
60
|
-
if (activeGroupId && activeGroupId !== linkKey) {
|
|
61
|
-
return { pairKey, action: "release" };
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const link = linkState?.[pairKey]?.links?.[linkKey];
|
|
65
|
-
|
|
66
|
-
if (!link?.destination) {
|
|
67
|
-
return { pairKey, action: "measure" };
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (!link.source) {
|
|
71
|
-
return { pairKey, action: "wait" };
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return { pairKey, action: "complete" };
|
|
75
|
-
};
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
LinkPairsState,
|
|
3
|
-
ScreenPairKey,
|
|
4
|
-
} from "../../../stores/bounds/types";
|
|
5
|
-
import type { MeasureTarget } from "../types";
|
|
6
|
-
|
|
7
|
-
const SOURCE_SIGNAL_PREFIX = "source|";
|
|
8
|
-
const DESTINATION_SIGNAL_PREFIX = "destination|";
|
|
9
|
-
|
|
10
|
-
type RefreshBoundarySignal = MeasureTarget & {
|
|
11
|
-
signal: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const buildRefreshSignal = (
|
|
15
|
-
type: MeasureTarget["type"],
|
|
16
|
-
pairKey: ScreenPairKey,
|
|
17
|
-
key: string,
|
|
18
|
-
): RefreshBoundarySignal => {
|
|
19
|
-
"worklet";
|
|
20
|
-
const prefix =
|
|
21
|
-
type === "source" ? SOURCE_SIGNAL_PREFIX : DESTINATION_SIGNAL_PREFIX;
|
|
22
|
-
return {
|
|
23
|
-
type,
|
|
24
|
-
pairKey,
|
|
25
|
-
signal: `${prefix}${pairKey}|${key}`,
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const getRefreshBoundarySignal = (params: {
|
|
30
|
-
enabled: boolean;
|
|
31
|
-
currentScreenKey: string;
|
|
32
|
-
sourcePairKey?: ScreenPairKey;
|
|
33
|
-
destinationPairKey?: ScreenPairKey;
|
|
34
|
-
linkId: string;
|
|
35
|
-
group?: string;
|
|
36
|
-
shouldRefresh: boolean;
|
|
37
|
-
settled?: boolean;
|
|
38
|
-
closing: boolean;
|
|
39
|
-
linkState?: LinkPairsState;
|
|
40
|
-
}): RefreshBoundarySignal | null => {
|
|
41
|
-
"worklet";
|
|
42
|
-
const {
|
|
43
|
-
enabled,
|
|
44
|
-
currentScreenKey,
|
|
45
|
-
sourcePairKey,
|
|
46
|
-
destinationPairKey,
|
|
47
|
-
linkId,
|
|
48
|
-
group,
|
|
49
|
-
shouldRefresh,
|
|
50
|
-
settled = false,
|
|
51
|
-
closing,
|
|
52
|
-
linkState,
|
|
53
|
-
} = params;
|
|
54
|
-
|
|
55
|
-
if (!enabled) return null;
|
|
56
|
-
|
|
57
|
-
if (!shouldRefresh && (!group || !settled)) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// A source may move while its destination is active, so refresh whichever
|
|
62
|
-
// side of the pair this boundary currently represents.
|
|
63
|
-
if (!group) {
|
|
64
|
-
if (sourcePairKey) {
|
|
65
|
-
const sourcePair = linkState?.[sourcePairKey];
|
|
66
|
-
const participates =
|
|
67
|
-
!!sourcePair?.links?.[linkId] || !!sourcePair?.sourceRequests?.[linkId];
|
|
68
|
-
|
|
69
|
-
if (!participates) {
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return buildRefreshSignal(
|
|
74
|
-
"source",
|
|
75
|
-
sourcePairKey,
|
|
76
|
-
[currentScreenKey, closing ? "closing" : "settled"].join("|"),
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const refreshDestinationPairKey = destinationPairKey;
|
|
81
|
-
|
|
82
|
-
if (!refreshDestinationPairKey) {
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (!linkState?.[refreshDestinationPairKey]?.links?.[linkId]) {
|
|
87
|
-
return null;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return buildRefreshSignal(
|
|
91
|
-
"destination",
|
|
92
|
-
refreshDestinationPairKey,
|
|
93
|
-
[currentScreenKey, closing ? "closing" : "settled"].join("|"),
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Source side:
|
|
98
|
-
// When the activeId changes, trigger a refresh to ensure the source bounds are captured.
|
|
99
|
-
if (sourcePairKey) {
|
|
100
|
-
const pair = linkState?.[sourcePairKey];
|
|
101
|
-
const groupState = pair?.groups?.[group];
|
|
102
|
-
const activeId = groupState?.activeId;
|
|
103
|
-
|
|
104
|
-
if (activeId !== linkId) {
|
|
105
|
-
return null;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// The opening member is captured by the initial handshake. A settled
|
|
109
|
-
// refresh is only needed after selection moves to another member.
|
|
110
|
-
if (
|
|
111
|
-
!shouldRefresh &&
|
|
112
|
-
(groupState?.initialId === undefined ||
|
|
113
|
-
activeId === groupState.initialId ||
|
|
114
|
-
!!pair?.links?.[linkId]?.source)
|
|
115
|
-
) {
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return buildRefreshSignal(
|
|
120
|
-
"source",
|
|
121
|
-
sourcePairKey,
|
|
122
|
-
[
|
|
123
|
-
group,
|
|
124
|
-
linkId,
|
|
125
|
-
shouldRefresh ? (closing ? "closing" : "settled") : "retarget",
|
|
126
|
-
].join("|"),
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
const refreshDestinationPairKey = destinationPairKey;
|
|
131
|
-
|
|
132
|
-
if (!refreshDestinationPairKey) return null;
|
|
133
|
-
|
|
134
|
-
// Destination side:
|
|
135
|
-
// When the activeId changes, trigger a refresh to ensure the destination bounds are captured.
|
|
136
|
-
const pair = linkState?.[refreshDestinationPairKey];
|
|
137
|
-
const groupState = pair?.groups?.[group];
|
|
138
|
-
const activeId = groupState?.activeId;
|
|
139
|
-
|
|
140
|
-
// Destination retargeting should only measure a concrete member that already
|
|
141
|
-
// participates in the pair. Missing members fall back to initialId at resolve.
|
|
142
|
-
if (activeId !== linkId) {
|
|
143
|
-
return null;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
if (
|
|
147
|
-
!shouldRefresh &&
|
|
148
|
-
(groupState?.initialId === undefined ||
|
|
149
|
-
activeId === groupState.initialId ||
|
|
150
|
-
!!pair?.links?.[linkId]?.destination)
|
|
151
|
-
) {
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return buildRefreshSignal(
|
|
156
|
-
"destination",
|
|
157
|
-
refreshDestinationPairKey,
|
|
158
|
-
[
|
|
159
|
-
group,
|
|
160
|
-
linkId,
|
|
161
|
-
shouldRefresh ? (closing ? "closing" : "settled") : "retarget",
|
|
162
|
-
].join("|"),
|
|
163
|
-
);
|
|
164
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
LinkPairsState,
|
|
3
|
-
ScreenPairKey,
|
|
4
|
-
} from "../../../stores/bounds/types";
|
|
5
|
-
|
|
6
|
-
const SOURCE_SIGNAL_PREFIX = "source|";
|
|
7
|
-
|
|
8
|
-
type SourceCaptureSignal = {
|
|
9
|
-
pairKey: ScreenPairKey;
|
|
10
|
-
signal: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const getInitialSourceCaptureSignal = (params: {
|
|
14
|
-
enabled: boolean;
|
|
15
|
-
sourcePairKey?: ScreenPairKey;
|
|
16
|
-
linkId: string;
|
|
17
|
-
group?: string;
|
|
18
|
-
linkState?: LinkPairsState;
|
|
19
|
-
}): SourceCaptureSignal | null => {
|
|
20
|
-
"worklet";
|
|
21
|
-
const { enabled, sourcePairKey, linkId, group, linkState } = params;
|
|
22
|
-
|
|
23
|
-
if (!enabled || !sourcePairKey) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const pair = linkState?.[sourcePairKey];
|
|
28
|
-
const link = pair?.links?.[linkId];
|
|
29
|
-
const hasSourceRequest = pair?.sourceRequests?.[linkId];
|
|
30
|
-
|
|
31
|
-
if ((!link?.destination && !hasSourceRequest) || link?.source) {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (group) {
|
|
36
|
-
const activeId = linkState?.[sourcePairKey]?.groups?.[group]?.activeId;
|
|
37
|
-
|
|
38
|
-
// Passive grouped sources should not measure every mounted item. Once a
|
|
39
|
-
// group has an active id, only that concrete member can auto-capture.
|
|
40
|
-
if (activeId && activeId !== linkId) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const signalParts = group ? [group, linkId] : [linkId];
|
|
46
|
-
|
|
47
|
-
return {
|
|
48
|
-
pairKey: sourcePairKey,
|
|
49
|
-
signal: `${SOURCE_SIGNAL_PREFIX}${sourcePairKey}|${signalParts.join("|")}`,
|
|
50
|
-
};
|
|
51
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { BaseStackDescriptor } from "../../../../types/stack.types";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Builds nested navigator ancestor keys from immediate parent to root.
|
|
5
|
-
*/
|
|
6
|
-
export function getAncestorKeys(current: BaseStackDescriptor): string[] {
|
|
7
|
-
const ancestors: string[] = [];
|
|
8
|
-
const nav = current.navigation as any;
|
|
9
|
-
|
|
10
|
-
if (typeof nav?.getParent !== "function") {
|
|
11
|
-
return ancestors;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
let parent = nav.getParent();
|
|
15
|
-
|
|
16
|
-
while (parent) {
|
|
17
|
-
const state = parent.getState();
|
|
18
|
-
if (state?.routes && state.index !== undefined) {
|
|
19
|
-
const focusedRoute = state.routes[state.index];
|
|
20
|
-
if (focusedRoute?.key) {
|
|
21
|
-
ancestors.push(focusedRoute.key);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
parent = parent.getParent();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return ancestors;
|
|
28
|
-
}
|