react-native-screen-transitions 3.11.3 → 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/blank-stack/components/stack-view.js +1 -2
- package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/component-stack/components/stack-view.js +1 -2
- package/lib/commonjs/component-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.native.js +2 -3
- package/lib/commonjs/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js +1 -1
- package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js.map +1 -1
- 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 +32 -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 +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/components/overlay/helpers/create-overlay-interpolator-frame.js +30 -0
- package/lib/commonjs/shared/components/overlay/helpers/create-overlay-interpolator-frame.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js +40 -22
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/helpers/retain-ready-overlay-resources.js +21 -0
- package/lib/commonjs/shared/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/helpers/run-overlay-slot-interpolator.js +41 -0
- package/lib/commonjs/shared/components/overlay/helpers/run-overlay-slot-interpolator.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/hooks/use-overlay-slot.js +85 -0
- package/lib/commonjs/shared/components/overlay/hooks/use-overlay-slot.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +14 -65
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js +89 -16
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +4 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.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 +14 -8
- 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 -8
- 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/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/animation/use-screen-animation.js +8 -2
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.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/gestures.provider.js +9 -5
- 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 +1 -3
- package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/ownership/{use-walk-up-and-register-shadowing-claims.js → gesture-ownership-bridge.js} +36 -50
- package/lib/commonjs/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.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 +3 -1
- package/lib/commonjs/shared/providers/screen/styles/constants.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/transition-visual-state.js +20 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/transition-visual-state.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 +14 -15
- 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 +34 -11
- 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/slot.provider.js +31 -33
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.js +18 -0
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/blank-stack.provider.js +2 -1
- package/lib/commonjs/shared/providers/stack/blank-stack.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/commonjs/shared/utils/create-provider.js +119 -10
- package/lib/commonjs/shared/utils/create-provider.js.map +1 -1
- package/lib/module/blank-stack/components/stack-view.js +1 -2
- package/lib/module/blank-stack/components/stack-view.js.map +1 -1
- package/lib/module/component-stack/components/stack-view.js +1 -2
- package/lib/module/component-stack/components/stack-view.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.native.js +2 -3
- package/lib/module/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/module/shared/adapters/with-screen-transitions/stack-layout.js +1 -1
- package/lib/module/shared/adapters/with-screen-transitions/stack-layout.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 +33 -12
- 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/components/overlay/helpers/create-overlay-interpolator-frame.js +25 -0
- package/lib/module/shared/components/overlay/helpers/create-overlay-interpolator-frame.js.map +1 -0
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js +37 -21
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/module/shared/components/overlay/helpers/retain-ready-overlay-resources.js +17 -0
- package/lib/module/shared/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -0
- package/lib/module/shared/components/overlay/helpers/run-overlay-slot-interpolator.js +36 -0
- package/lib/module/shared/components/overlay/helpers/run-overlay-slot-interpolator.js.map +1 -0
- package/lib/module/shared/components/overlay/hooks/use-overlay-slot.js +80 -0
- package/lib/module/shared/components/overlay/hooks/use-overlay-slot.js.map +1 -0
- package/lib/module/shared/components/overlay/variations/float-overlay.js +15 -66
- package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/overlay-host.js +90 -18
- package/lib/module/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +4 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.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 +14 -8
- 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 -8
- 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/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/animation/use-screen-animation.js +8 -2
- package/lib/module/shared/providers/screen/animation/use-screen-animation.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/gestures.provider.js +10 -6
- 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 +1 -3
- package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/ownership/{use-walk-up-and-register-shadowing-claims.js → gesture-ownership-bridge.js} +35 -49
- package/lib/module/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.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 +3 -1
- package/lib/module/shared/providers/screen/styles/constants.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/transition-visual-state.js +18 -0
- package/lib/module/shared/providers/screen/styles/helpers/transition-visual-state.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 +14 -15
- 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 +35 -12
- 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/slot.provider.js +30 -33
- package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.js +14 -0
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.js.map +1 -0
- package/lib/module/shared/providers/stack/blank-stack.provider.js +2 -1
- package/lib/module/shared/providers/stack/blank-stack.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/types/animation.types.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 +119 -10
- package/lib/module/shared/utils/create-provider.js.map +1 -1
- package/lib/typescript/blank-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/blank-stack/types.d.ts +1 -1
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/component-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/component-stack/types.d.ts +1 -1
- package/lib/typescript/component-stack/types.d.ts.map +1 -1
- package/lib/typescript/native-stack/types.d.ts +1 -1
- package/lib/typescript/native-stack/types.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.native.d.ts.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/helpers/create-overlay-interpolator-frame.d.ts +7 -0
- package/lib/typescript/shared/components/overlay/helpers/create-overlay-interpolator-frame.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts +17 -7
- package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/helpers/retain-ready-overlay-resources.d.ts +11 -0
- package/lib/typescript/shared/components/overlay/helpers/retain-ready-overlay-resources.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/helpers/run-overlay-slot-interpolator.d.ts +8 -0
- package/lib/typescript/shared/components/overlay/helpers/run-overlay-slot-interpolator.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/hooks/use-overlay-slot.d.ts +15 -0
- package/lib/typescript/shared/components/overlay/hooks/use-overlay-slot.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +7 -6
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +658 -710
- 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 +4 -0
- 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 -1
- 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/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/animation/use-screen-animation.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/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/ownership/gesture-ownership-bridge.d.ts +3 -0
- package/lib/typescript/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.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/transition-visual-state.d.ts +7 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/transition-visual-state.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-interpolated-style-maps.d.ts +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 +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 +6 -5
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.d.ts +3 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/blank-stack.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/animation.types.d.ts +8 -0
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +1 -1
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/overlay.types.d.ts +26 -11
- package/lib/typescript/shared/types/overlay.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +11 -2
- 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/lib/typescript/shared/utils/create-provider.d.ts +21 -6
- package/lib/typescript/shared/utils/create-provider.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/blank-stack/components/stack-view.tsx +1 -4
- package/src/blank-stack/types.ts +8 -2
- package/src/component-stack/components/stack-view.tsx +1 -4
- package/src/component-stack/types.ts +8 -2
- package/src/native-stack/types.ts +8 -2
- package/src/native-stack/views/NativeStackView.native.tsx +3 -9
- package/src/shared/adapters/with-screen-transitions/stack-layout.tsx +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 +75 -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 +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/components/overlay/helpers/create-overlay-interpolator-frame.ts +29 -0
- package/src/shared/components/overlay/helpers/get-active-overlay.ts +62 -20
- package/src/shared/components/overlay/helpers/retain-ready-overlay-resources.ts +38 -0
- package/src/shared/components/overlay/helpers/run-overlay-slot-interpolator.ts +48 -0
- package/src/shared/components/overlay/hooks/use-overlay-slot.ts +103 -0
- package/src/shared/components/overlay/variations/float-overlay.tsx +22 -64
- package/src/shared/components/overlay/variations/overlay-host.tsx +135 -28
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition-intent.ts +5 -1
- package/src/shared/index.ts +1 -0
- package/src/shared/providers/helpers/measured-bounds-writes.ts +5 -0
- package/src/shared/providers/screen/animation/animation.provider.tsx +31 -12
- package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +15 -9
- 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/animation/use-screen-animation.tsx +12 -2
- 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/gestures.provider.tsx +18 -7
- package/src/shared/providers/screen/gestures/hooks/use-screen-gesture-config.ts +4 -4
- package/src/shared/providers/screen/gestures/ownership/{use-walk-up-and-register-shadowing-claims.ts → gesture-ownership-bridge.tsx} +44 -54
- 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 +2 -0
- package/src/shared/providers/screen/styles/helpers/transition-visual-state.ts +26 -0
- package/src/shared/providers/screen/styles/helpers/visibility-block-ownership.ts +16 -0
- package/src/shared/providers/screen/styles/hooks/slot-resolvers.tsx +17 -5
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +51 -12
- package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +40 -15
- package/src/shared/providers/screen/styles/slot.provider.tsx +60 -70
- package/src/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.ts +22 -0
- package/src/shared/providers/stack/blank-stack.provider.tsx +6 -1
- 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/animation.types.ts +8 -0
- package/src/shared/types/index.ts +1 -1
- package/src/shared/types/overlay.types.ts +41 -14
- package/src/shared/types/screen.types.ts +12 -2
- 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 +221 -19
- 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/ownership/use-walk-up-and-register-shadowing-claims.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/components/floating-overlay-layer.js +0 -28
- package/lib/commonjs/shared/providers/screen/styles/components/floating-overlay-layer.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +0 -53
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.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/ownership/use-walk-up-and-register-shadowing-claims.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/components/floating-overlay-layer.js +0 -24
- package/lib/module/shared/providers/screen/styles/components/floating-overlay-layer.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +0 -47
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.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/ownership/use-walk-up-and-register-shadowing-claims.d.ts +0 -14
- package/lib/typescript/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts +0 -7
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts +0 -6
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.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/styles/components/floating-overlay-layer.tsx +0 -29
- package/src/shared/providers/screen/styles/stores/slot-references.store.ts +0 -72
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
* - `children`: passed-through children keep their identity across
|
|
15
15
|
* provider-local renders. Factories that wrap children should use a
|
|
16
16
|
* module-level memoized component for the wrapper.
|
|
17
|
+
*
|
|
18
|
+
* Providers created with `global: true` return a `key` from their factory.
|
|
19
|
+
* Their generated store hook accepts that key to subscribe to the original
|
|
20
|
+
* provider store from outside its React context.
|
|
17
21
|
*/
|
|
18
22
|
import {
|
|
19
23
|
createContext,
|
|
@@ -41,6 +45,27 @@ type ProviderStoreHook<ContextValue, Guarded extends boolean> = {
|
|
|
41
45
|
): Selected;
|
|
42
46
|
};
|
|
43
47
|
|
|
48
|
+
type GlobalProviderStoreHook<ContextValue> = {
|
|
49
|
+
(key: string): ContextValue | null;
|
|
50
|
+
<Selected>(
|
|
51
|
+
key: string,
|
|
52
|
+
selector: (value: ContextValue) => Selected,
|
|
53
|
+
): Selected | null;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
type ResolvedProviderStoreHook<
|
|
57
|
+
ContextValue,
|
|
58
|
+
Guarded extends boolean,
|
|
59
|
+
Global extends boolean,
|
|
60
|
+
> = ProviderStoreHook<ContextValue, Guarded> &
|
|
61
|
+
(Global extends true ? GlobalProviderStoreHook<ContextValue> : unknown);
|
|
62
|
+
|
|
63
|
+
type ProviderFactoryResult<ContextValue, Global extends boolean> = {
|
|
64
|
+
value?: ContextValue;
|
|
65
|
+
enabled?: boolean;
|
|
66
|
+
children?: ReactNode;
|
|
67
|
+
} & (Global extends true ? { key: string } : { key?: never });
|
|
68
|
+
|
|
44
69
|
export type ProviderFactoryInternals<ContextValue> = {
|
|
45
70
|
useParentStore: ProviderStoreHook<ContextValue, false>;
|
|
46
71
|
};
|
|
@@ -56,6 +81,12 @@ interface MutableProviderStoreApi<ContextValue>
|
|
|
56
81
|
setSnapshot: (snapshot: ContextValue | null) => boolean;
|
|
57
82
|
}
|
|
58
83
|
|
|
84
|
+
interface ProviderStoreRegistry<ContextValue> {
|
|
85
|
+
getStore: (key: string) => ProviderStoreApi<ContextValue> | null;
|
|
86
|
+
register: (key: string, store: ProviderStoreApi<ContextValue>) => () => void;
|
|
87
|
+
subscribe: (key: string, listener: () => void) => () => void;
|
|
88
|
+
}
|
|
89
|
+
|
|
59
90
|
const NullProviderStore: ProviderStoreApi<never> = {
|
|
60
91
|
getSnapshot: () => null,
|
|
61
92
|
subscribe: () => () => {},
|
|
@@ -127,40 +158,186 @@ const createProviderStore = <ContextValue,>(
|
|
|
127
158
|
};
|
|
128
159
|
};
|
|
129
160
|
|
|
161
|
+
const createProviderStoreRegistry = <
|
|
162
|
+
ContextValue,
|
|
163
|
+
>(): ProviderStoreRegistry<ContextValue> => {
|
|
164
|
+
type Registration = {
|
|
165
|
+
store: ProviderStoreApi<ContextValue>;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
const listenersByKey = new Map<string, Set<() => void>>();
|
|
169
|
+
const registrationsByKey = new Map<string, Registration[]>();
|
|
170
|
+
|
|
171
|
+
const getStore = (key: string) => {
|
|
172
|
+
const registrations = registrationsByKey.get(key);
|
|
173
|
+
return registrations?.[registrations.length - 1]?.store ?? null;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
const notify = (key: string) => {
|
|
177
|
+
for (const listener of listenersByKey.get(key) ?? []) {
|
|
178
|
+
listener();
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
return {
|
|
183
|
+
getStore,
|
|
184
|
+
register: (key, store) => {
|
|
185
|
+
const registration: Registration = { store };
|
|
186
|
+
const registrations = registrationsByKey.get(key) ?? [];
|
|
187
|
+
registrationsByKey.set(key, [...registrations, registration]);
|
|
188
|
+
notify(key);
|
|
189
|
+
|
|
190
|
+
return () => {
|
|
191
|
+
const currentRegistrations = registrationsByKey.get(key);
|
|
192
|
+
if (!currentRegistrations?.includes(registration)) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const previousStore = getStore(key);
|
|
197
|
+
const nextRegistrations = currentRegistrations.filter(
|
|
198
|
+
(currentRegistration) => currentRegistration !== registration,
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
if (nextRegistrations.length === 0) {
|
|
202
|
+
registrationsByKey.delete(key);
|
|
203
|
+
} else {
|
|
204
|
+
registrationsByKey.set(key, nextRegistrations);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (getStore(key) !== previousStore) {
|
|
208
|
+
notify(key);
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
},
|
|
212
|
+
subscribe: (key, listener) => {
|
|
213
|
+
const listeners = listenersByKey.get(key) ?? new Set<() => void>();
|
|
214
|
+
listeners.add(listener);
|
|
215
|
+
listenersByKey.set(key, listeners);
|
|
216
|
+
|
|
217
|
+
return () => {
|
|
218
|
+
listeners.delete(listener);
|
|
219
|
+
if (listeners.size === 0) {
|
|
220
|
+
listenersByKey.delete(key);
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
|
|
130
227
|
export default function createProvider<
|
|
131
228
|
ProviderName extends string,
|
|
132
229
|
Guarded extends boolean = true,
|
|
133
|
-
|
|
230
|
+
Global extends boolean = false,
|
|
231
|
+
>(name: ProviderName, options?: { guarded?: Guarded; global?: Global }) {
|
|
134
232
|
return <ProviderProps extends object, ContextValue>(
|
|
135
233
|
factory: (
|
|
136
234
|
props: ProviderProps,
|
|
137
235
|
internals: ProviderFactoryInternals<ContextValue>,
|
|
138
|
-
) =>
|
|
139
|
-
value?: ContextValue;
|
|
140
|
-
enabled?: boolean;
|
|
141
|
-
children?: ReactNode;
|
|
142
|
-
},
|
|
236
|
+
) => ProviderFactoryResult<ContextValue, Global>,
|
|
143
237
|
) => {
|
|
144
|
-
const { guarded = true } = options ?? {};
|
|
238
|
+
const { guarded = true, global = false } = options ?? {};
|
|
145
239
|
const providerDisplayName = `${name}Provider`;
|
|
240
|
+
const globalRegistry = global
|
|
241
|
+
? createProviderStoreRegistry<ContextValue>()
|
|
242
|
+
: null;
|
|
243
|
+
const keyByStore = global
|
|
244
|
+
? new WeakMap<ProviderStoreApi<ContextValue>, string>()
|
|
245
|
+
: null;
|
|
146
246
|
|
|
147
247
|
const StoreContext = createContext<ProviderStoreApi<ContextValue> | null>(
|
|
148
248
|
null,
|
|
149
249
|
);
|
|
150
250
|
StoreContext.displayName = `${name}Store`;
|
|
151
251
|
|
|
152
|
-
const
|
|
252
|
+
const useRegisteredStore = (
|
|
253
|
+
key: string | null,
|
|
254
|
+
fallbackStore: ProviderStoreApi<ContextValue> | null = null,
|
|
255
|
+
) => {
|
|
256
|
+
const subscribe = useCallback(
|
|
257
|
+
(listener: () => void) => {
|
|
258
|
+
if (key === null || !globalRegistry) {
|
|
259
|
+
return () => {};
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
return globalRegistry.subscribe(key, listener);
|
|
263
|
+
},
|
|
264
|
+
[key],
|
|
265
|
+
);
|
|
266
|
+
const getSnapshot = useCallback(
|
|
267
|
+
() =>
|
|
268
|
+
key !== null && globalRegistry
|
|
269
|
+
? (globalRegistry.getStore(key) ?? fallbackStore)
|
|
270
|
+
: null,
|
|
271
|
+
[key, fallbackStore],
|
|
272
|
+
);
|
|
273
|
+
|
|
274
|
+
return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
const createStoreHook = (strict: boolean, allowGlobalLookup: boolean) => {
|
|
278
|
+
if (!allowGlobalLookup || !globalRegistry) {
|
|
279
|
+
return <Selected,>(
|
|
280
|
+
selector?: (value: ContextValue | null) => Selected,
|
|
281
|
+
): Selected | ContextValue | null => {
|
|
282
|
+
const store = useContext(StoreContext);
|
|
283
|
+
const resolvedStore =
|
|
284
|
+
store ?? (NullProviderStore as ProviderStoreApi<ContextValue>);
|
|
285
|
+
const selectorRef = useRef(selector);
|
|
286
|
+
selectorRef.current = selector;
|
|
287
|
+
|
|
288
|
+
const getSelectedSnapshot = useCallback(() => {
|
|
289
|
+
if (strict && store === null) {
|
|
290
|
+
throw new Error(
|
|
291
|
+
`${name} store must be used within a ${name}Provider`,
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const snapshot = resolvedStore.getSnapshot();
|
|
296
|
+
|
|
297
|
+
if (strict && snapshot === null) {
|
|
298
|
+
throw new Error(
|
|
299
|
+
`${name} store must be used within an enabled ${name}Provider`,
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
return selectorRef.current
|
|
304
|
+
? selectorRef.current(snapshot)
|
|
305
|
+
: snapshot;
|
|
306
|
+
}, [resolvedStore, store]);
|
|
307
|
+
|
|
308
|
+
return useSyncExternalStore(
|
|
309
|
+
resolvedStore.subscribe,
|
|
310
|
+
getSelectedSnapshot,
|
|
311
|
+
getSelectedSnapshot,
|
|
312
|
+
);
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
|
|
153
316
|
return <Selected,>(
|
|
154
|
-
|
|
317
|
+
selectorOrKey?: string | ((value: ContextValue | null) => Selected),
|
|
318
|
+
globalSelector?: (value: ContextValue) => Selected,
|
|
155
319
|
): Selected | ContextValue | null => {
|
|
156
|
-
const
|
|
320
|
+
const isGlobalLookup = typeof selectorOrKey === "string";
|
|
321
|
+
const key = isGlobalLookup ? selectorOrKey : null;
|
|
322
|
+
const selector = (isGlobalLookup ? globalSelector : selectorOrKey) as
|
|
323
|
+
| ((value: ContextValue | null) => Selected)
|
|
324
|
+
| undefined;
|
|
325
|
+
const contextStore = useContext(StoreContext);
|
|
326
|
+
const matchingContextStore =
|
|
327
|
+
key !== null &&
|
|
328
|
+
contextStore !== null &&
|
|
329
|
+
keyByStore?.get(contextStore) === key
|
|
330
|
+
? contextStore
|
|
331
|
+
: null;
|
|
332
|
+
const registeredStore = useRegisteredStore(key, matchingContextStore);
|
|
333
|
+
const store = isGlobalLookup ? registeredStore : contextStore;
|
|
157
334
|
const resolvedStore =
|
|
158
335
|
store ?? (NullProviderStore as ProviderStoreApi<ContextValue>);
|
|
159
|
-
const selectorRef = useRef
|
|
336
|
+
const selectorRef = useRef(selector);
|
|
160
337
|
selectorRef.current = selector;
|
|
161
338
|
|
|
162
339
|
const getSelectedSnapshot = useCallback(() => {
|
|
163
|
-
if (strict && store === null) {
|
|
340
|
+
if (!isGlobalLookup && strict && store === null) {
|
|
164
341
|
throw new Error(
|
|
165
342
|
`${name} store must be used within a ${name}Provider`,
|
|
166
343
|
);
|
|
@@ -168,14 +345,20 @@ export default function createProvider<
|
|
|
168
345
|
|
|
169
346
|
const snapshot = resolvedStore.getSnapshot();
|
|
170
347
|
|
|
171
|
-
if (
|
|
348
|
+
if (isGlobalLookup && snapshot === null) {
|
|
349
|
+
return null;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
if (!isGlobalLookup && strict && snapshot === null) {
|
|
172
353
|
throw new Error(
|
|
173
354
|
`${name} store must be used within an enabled ${name}Provider`,
|
|
174
355
|
);
|
|
175
356
|
}
|
|
176
357
|
|
|
177
|
-
return
|
|
178
|
-
|
|
358
|
+
return typeof selectorRef.current === "function"
|
|
359
|
+
? selectorRef.current(snapshot)
|
|
360
|
+
: snapshot;
|
|
361
|
+
}, [isGlobalLookup, resolvedStore, store]);
|
|
179
362
|
|
|
180
363
|
return useSyncExternalStore(
|
|
181
364
|
resolvedStore.subscribe,
|
|
@@ -185,9 +368,9 @@ export default function createProvider<
|
|
|
185
368
|
};
|
|
186
369
|
};
|
|
187
370
|
|
|
188
|
-
const useStoreSelector = createStoreHook(guarded);
|
|
371
|
+
const useStoreSelector = createStoreHook(guarded, global);
|
|
189
372
|
const factoryInternals: ProviderFactoryInternals<ContextValue> = {
|
|
190
|
-
useParentStore: createStoreHook(false) as ProviderStoreHook<
|
|
373
|
+
useParentStore: createStoreHook(false, false) as ProviderStoreHook<
|
|
191
374
|
ContextValue,
|
|
192
375
|
false
|
|
193
376
|
>,
|
|
@@ -197,6 +380,7 @@ export default function createProvider<
|
|
|
197
380
|
const {
|
|
198
381
|
children = (props as { children?: ReactNode }).children,
|
|
199
382
|
enabled = true,
|
|
383
|
+
key,
|
|
200
384
|
value,
|
|
201
385
|
} = factory(props, factoryInternals);
|
|
202
386
|
|
|
@@ -216,6 +400,23 @@ export default function createProvider<
|
|
|
216
400
|
storeRef.current = createProviderStore<ContextValue>(snapshotValue);
|
|
217
401
|
}
|
|
218
402
|
const store = storeRef.current;
|
|
403
|
+
if (keyByStore && typeof key === "string") {
|
|
404
|
+
keyByStore.set(store, key);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
useLayoutEffect(() => {
|
|
408
|
+
if (!globalRegistry) {
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
if (typeof key !== "string") {
|
|
413
|
+
throw new Error(
|
|
414
|
+
`${name}Provider must return a key when global mode is enabled`,
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
return globalRegistry.register(key, store);
|
|
419
|
+
}, [key, store]);
|
|
219
420
|
|
|
220
421
|
pendingNotifyRef.current =
|
|
221
422
|
store.setSnapshot(snapshotValue) || pendingNotifyRef.current;
|
|
@@ -241,9 +442,10 @@ export default function createProvider<
|
|
|
241
442
|
} as {
|
|
242
443
|
[P in ProviderName as `${P}Provider`]: React.FC<ProviderProps>;
|
|
243
444
|
} & {
|
|
244
|
-
[P in ProviderName as `use${P}Store`]:
|
|
445
|
+
[P in ProviderName as `use${P}Store`]: ResolvedProviderStoreHook<
|
|
245
446
|
ContextValue,
|
|
246
|
-
Guarded
|
|
447
|
+
Guarded,
|
|
448
|
+
Global
|
|
247
449
|
>;
|
|
248
450
|
};
|
|
249
451
|
};
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useInitialDestinationMeasurement = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
-
var _useStack = require("../../../../hooks/navigation/use-stack");
|
|
10
|
-
var _descriptors = require("../../../../providers/screen/descriptors");
|
|
11
|
-
var _animation = require("../../../../stores/animation.store");
|
|
12
|
-
var _linkPairs = require("../../../../stores/bounds/helpers/link-pairs.helpers");
|
|
13
|
-
var _entries = require("../../../../stores/bounds/internals/entries");
|
|
14
|
-
var _links = require("../../../../stores/bounds/internals/links");
|
|
15
|
-
var _state = require("../../../../stores/bounds/internals/state");
|
|
16
|
-
var _system = require("../../../../stores/system.store");
|
|
17
|
-
var _logger = require("../../../../utils/logger");
|
|
18
|
-
var _destinationSignals = require("../../utils/destination-signals");
|
|
19
|
-
// A missed layout should be retried on the next frame. The previous 100 ms
|
|
20
|
-
// interval made each ordinary Android layout miss visibly delay navigation.
|
|
21
|
-
const HANDSHAKE_RETRY_DELAY_MS = 16;
|
|
22
|
-
/**
|
|
23
|
-
* A destination whose initial handshake never completes must not hold the
|
|
24
|
-
* transition gate forever. After this budget, release the block with a warning
|
|
25
|
-
* so the open proceeds without that boundary.
|
|
26
|
-
*/
|
|
27
|
-
const MAX_HANDSHAKE_RETRIES = 20;
|
|
28
|
-
const useInitialDestinationMeasurement = ({
|
|
29
|
-
boundTag,
|
|
30
|
-
enabled,
|
|
31
|
-
measureBoundary
|
|
32
|
-
}) => {
|
|
33
|
-
const {
|
|
34
|
-
tag,
|
|
35
|
-
linkKey,
|
|
36
|
-
group
|
|
37
|
-
} = boundTag;
|
|
38
|
-
const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
|
|
39
|
-
const nextScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.nextScreenKey);
|
|
40
|
-
const destinationPairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.destinationPairKey);
|
|
41
|
-
const destinationEnabled = enabled && !nextScreenKey;
|
|
42
|
-
const canReceiveDestination = destinationEnabled && !!destinationPairKey;
|
|
43
|
-
const preferredSourceScreenKey = destinationPairKey ? (0, _linkPairs.getSourceScreenKeyFromPairKey)(destinationPairKey) : undefined;
|
|
44
|
-
const stackScenes = (0, _useStack.useStack)(store => store.scenes);
|
|
45
|
-
// A retained closing screen can still have registered boundaries, but it
|
|
46
|
-
// cannot own a new transition link.
|
|
47
|
-
const closingSourceScreenKeys = (0, _react.useMemo)(() => stackScenes.filter(scene => scene.activity === "closing").map(scene => scene.route.key), [stackScenes]);
|
|
48
|
-
const progress = _animation.AnimationStore.getValue(currentScreenKey, "transitionProgress");
|
|
49
|
-
const {
|
|
50
|
-
actions: {
|
|
51
|
-
blockLifecycleStart,
|
|
52
|
-
unblockLifecycleStart
|
|
53
|
-
}
|
|
54
|
-
} = _system.SystemStore.getBag(currentScreenKey);
|
|
55
|
-
const isBlockingLifecycleStart = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
56
|
-
const retryToken = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
57
|
-
const handshakeRetries = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
58
|
-
const hasGivenUp = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
59
|
-
const hasFinishedInitialMeasurement = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
60
|
-
const releaseLifecycleStartBlock = (0, _react.useCallback)(() => {
|
|
61
|
-
"worklet";
|
|
62
|
-
|
|
63
|
-
(0, _reactNativeReanimated.cancelAnimation)(retryToken);
|
|
64
|
-
if (!isBlockingLifecycleStart.get()) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
hasFinishedInitialMeasurement.set(1);
|
|
68
|
-
isBlockingLifecycleStart.set(0);
|
|
69
|
-
unblockLifecycleStart();
|
|
70
|
-
}, [hasFinishedInitialMeasurement, isBlockingLifecycleStart, retryToken, unblockLifecycleStart]);
|
|
71
|
-
const claimLifecycleStartBlock = (0, _react.useCallback)(() => {
|
|
72
|
-
"worklet";
|
|
73
|
-
|
|
74
|
-
if (!canReceiveDestination || hasFinishedInitialMeasurement.get() || !(0, _entries.getMatchingSourceScreenKey)(tag, currentScreenKey)) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// The progress check and block claim must share one UI-thread operation.
|
|
79
|
-
// Otherwise a JS-thread layout effect can observe zero, enqueue the block,
|
|
80
|
-
// and let the opening animation start before that block reaches the UI thread.
|
|
81
|
-
if (progress.get() > 0 || isBlockingLifecycleStart.get()) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
blockLifecycleStart();
|
|
85
|
-
isBlockingLifecycleStart.set(1);
|
|
86
|
-
}, [blockLifecycleStart, canReceiveDestination, currentScreenKey, hasFinishedInitialMeasurement, isBlockingLifecycleStart, progress, tag]);
|
|
87
|
-
(0, _react.useLayoutEffect)(() => {
|
|
88
|
-
if (!canReceiveDestination) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
(0, _reactNativeReanimated.runOnUI)(claimLifecycleStartBlock)();
|
|
92
|
-
return () => {
|
|
93
|
-
// This is an abandonment fallback, not a second release. Run it on the UI
|
|
94
|
-
// runtime so it serializes with the handshake's guarded release.
|
|
95
|
-
(0, _reactNativeReanimated.runOnUI)(releaseLifecycleStartBlock)();
|
|
96
|
-
};
|
|
97
|
-
}, [claimLifecycleStartBlock, canReceiveDestination, releaseLifecycleStartBlock]);
|
|
98
|
-
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
99
|
-
"worklet";
|
|
100
|
-
|
|
101
|
-
if (!canReceiveDestination || hasFinishedInitialMeasurement.get() || isBlockingLifecycleStart.get() <= 0) {
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
if (progress.get() > 0) {
|
|
105
|
-
return null;
|
|
106
|
-
}
|
|
107
|
-
const retryTick = retryToken.get();
|
|
108
|
-
const sourceScreenKey = (0, _entries.getMatchingSourceScreenKey)(tag, currentScreenKey, preferredSourceScreenKey, closingSourceScreenKeys);
|
|
109
|
-
const pairKey = sourceScreenKey ? (0, _linkPairs.createScreenPairKey)(sourceScreenKey, currentScreenKey) : undefined;
|
|
110
|
-
const signal = (0, _destinationSignals.getInitialDestinationMeasurementSignal)({
|
|
111
|
-
enabled: destinationEnabled,
|
|
112
|
-
pairKey,
|
|
113
|
-
linkId: linkKey,
|
|
114
|
-
group,
|
|
115
|
-
destinationPresent: (0, _entries.getEntry)(tag, currentScreenKey) !== null,
|
|
116
|
-
sourcePresent: sourceScreenKey !== null,
|
|
117
|
-
linkState: _state.pairs.get()
|
|
118
|
-
});
|
|
119
|
-
return [signal?.pairKey ?? null, signal?.action ?? null, retryTick];
|
|
120
|
-
}, (next, previous) => {
|
|
121
|
-
"worklet";
|
|
122
|
-
|
|
123
|
-
if (!next || hasFinishedInitialMeasurement.get()) {
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
const [measurePairKey, action, retryTick] = next;
|
|
127
|
-
if (!action) {
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
const previousMeasurePairKey = previous?.[0];
|
|
131
|
-
const previousAction = previous?.[1];
|
|
132
|
-
const previousRetryTick = previous?.[2];
|
|
133
|
-
const shouldHandleSignal = measurePairKey !== previousMeasurePairKey || action !== previousAction || retryTick !== previousRetryTick;
|
|
134
|
-
if (!shouldHandleSignal) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
if (hasGivenUp.get()) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
if (action === "release") {
|
|
141
|
-
releaseLifecycleStartBlock();
|
|
142
|
-
handshakeRetries.set(0);
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
if (action === "measure" && measurePairKey) {
|
|
146
|
-
measureBoundary({
|
|
147
|
-
type: "destination",
|
|
148
|
-
pairKey: measurePairKey
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
const link = measurePairKey ? (0, _links.getLink)(measurePairKey, linkKey) : null;
|
|
152
|
-
const linkComplete = !!link?.source && !!link.destination;
|
|
153
|
-
if (linkComplete || action === "complete") {
|
|
154
|
-
(0, _reactNativeReanimated.cancelAnimation)(retryToken);
|
|
155
|
-
handshakeRetries.set(0);
|
|
156
|
-
hasFinishedInitialMeasurement.set(1);
|
|
157
|
-
releaseLifecycleStartBlock();
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
if (handshakeRetries.get() >= MAX_HANDSHAKE_RETRIES) {
|
|
161
|
-
hasGivenUp.set(1);
|
|
162
|
-
releaseLifecycleStartBlock();
|
|
163
|
-
_logger.logger.warn(`Boundary "${linkKey}" never formed a complete source/destination link after ${MAX_HANDSHAKE_RETRIES} attempts; releasing the transition gate without it. One side is likely off-viewport or unmounted.`);
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// Keep the lifecycle blocked while registration, measurement, or source
|
|
168
|
-
// attachment settles. The retry token also retries rejected destination bounds.
|
|
169
|
-
handshakeRetries.set(handshakeRetries.get() + 1);
|
|
170
|
-
(0, _reactNativeReanimated.cancelAnimation)(retryToken);
|
|
171
|
-
retryToken.set((0, _reactNativeReanimated.withDelay)(HANDSHAKE_RETRY_DELAY_MS, (0, _reactNativeReanimated.withTiming)(retryToken.get() + 1, {
|
|
172
|
-
duration: 0
|
|
173
|
-
})));
|
|
174
|
-
});
|
|
175
|
-
};
|
|
176
|
-
exports.useInitialDestinationMeasurement = useInitialDestinationMeasurement;
|
|
177
|
-
//# sourceMappingURL=use-initial-destination-measurement.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_useStack","_descriptors","_animation","_linkPairs","_entries","_links","_state","_system","_logger","_destinationSignals","HANDSHAKE_RETRY_DELAY_MS","MAX_HANDSHAKE_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","measureBoundary","tag","linkKey","group","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","destinationPairKey","destinationEnabled","canReceiveDestination","preferredSourceScreenKey","getSourceScreenKeyFromPairKey","undefined","stackScenes","useStack","store","scenes","closingSourceScreenKeys","useMemo","filter","scene","activity","map","route","key","progress","AnimationStore","getValue","actions","blockLifecycleStart","unblockLifecycleStart","SystemStore","getBag","isBlockingLifecycleStart","useSharedValue","retryToken","handshakeRetries","hasGivenUp","hasFinishedInitialMeasurement","releaseLifecycleStartBlock","useCallback","cancelAnimation","get","set","claimLifecycleStartBlock","getMatchingSourceScreenKey","useLayoutEffect","runOnUI","useAnimatedReaction","retryTick","sourceScreenKey","pairKey","createScreenPairKey","signal","getInitialDestinationMeasurementSignal","linkId","destinationPresent","getEntry","sourcePresent","linkState","pairs","action","next","previous","measurePairKey","previousMeasurePairKey","previousAction","previousRetryTick","shouldHandleSignal","type","link","getLink","linkComplete","source","destination","logger","warn","withDelay","withTiming","duration","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAQA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAIA,IAAAM,QAAA,GAAAN,OAAA;AAIA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAEA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AAEA,IAAAW,mBAAA,GAAAX,OAAA;AAEA;AACA;AACA,MAA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AM,KAAK,UAAU,EAAE;MAC1C,IAAApB,sCAAe,EAACN,UAAU,CAAC;MAC3BC,gBAAgB,CAACO,GAAG,CAAC,CAAC,CAAC;MACvBL,6BAA6B,CAACK,GAAG,CAAC,CAAC,CAAC;MACpCJ,0BAA0B,CAAC,CAAC;MAC5B;IACD;IAEA,IAAIH,gBAAgB,CAACM,GAAG,CAAC,CAAC,IAAIhD,qBAAqB,EAAE;MACpD2C,UAAU,CAACM,GAAG,CAAC,CAAC,CAAC;MACjBJ,0BAA0B,CAAC,CAAC;MAC5BoC,cAAM,CAACC,IAAI,CACV,aAAa5E,OAAO,2DAA2DN,qBAAqB,oGACrG,CAAC;MACD;IACD;;IAEA;IACA;IACA0C,gBAAgB,CAACO,GAAG,CAACP,gBAAgB,CAACM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAChD,IAAAD,sCAAe,EAACN,UAAU,CAAC;IAC3BA,UAAU,CAACQ,GAAG,CACb,IAAAkC,gCAAS,EACRpF,wBAAwB,EACxB,IAAAqF,iCAAU,EAAC3C,UAAU,CAACO,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;MAAEqC,QAAQ,EAAE;IAAE,CAAC,CACjD,CACD,CAAC;EACF,CACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAArF,gCAAA,GAAAA,gCAAA","ignoreList":[]}
|
package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useInitialSourceMeasurement = void 0;
|
|
7
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
var _descriptors = require("../../../../providers/screen/descriptors");
|
|
9
|
-
var _links = require("../../../../stores/bounds/internals/links");
|
|
10
|
-
var _state = require("../../../../stores/bounds/internals/state");
|
|
11
|
-
var _sourceSignals = require("../../utils/source-signals");
|
|
12
|
-
const useInitialSourceMeasurement = params => {
|
|
13
|
-
const {
|
|
14
|
-
enabled,
|
|
15
|
-
measureBoundary,
|
|
16
|
-
boundTag
|
|
17
|
-
} = params;
|
|
18
|
-
const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
|
|
19
|
-
const lastSourceCaptureSignal = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
20
|
-
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
21
|
-
"worklet";
|
|
22
|
-
|
|
23
|
-
const sourcePairKey = (0, _links.getPairKeyForSource)(boundTag.tag, currentScreenKey) ?? undefined;
|
|
24
|
-
return (0, _sourceSignals.getInitialSourceCaptureSignal)({
|
|
25
|
-
enabled,
|
|
26
|
-
sourcePairKey,
|
|
27
|
-
linkId: boundTag.linkKey,
|
|
28
|
-
group: boundTag.group,
|
|
29
|
-
linkState: sourcePairKey ? _state.pairs.get() : undefined
|
|
30
|
-
});
|
|
31
|
-
}, captureSignal => {
|
|
32
|
-
"worklet";
|
|
33
|
-
|
|
34
|
-
if (!enabled || !captureSignal) {
|
|
35
|
-
lastSourceCaptureSignal.set(null);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (lastSourceCaptureSignal.get() === captureSignal.signal) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
lastSourceCaptureSignal.set(captureSignal.signal);
|
|
42
|
-
measureBoundary({
|
|
43
|
-
type: "source",
|
|
44
|
-
pairKey: captureSignal.pairKey
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
exports.useInitialSourceMeasurement = useInitialSourceMeasurement;
|
|
49
|
-
//# sourceMappingURL=use-initial-source-measurement.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_descriptors","_links","_state","_sourceSignals","useInitialSourceMeasurement","params","enabled","measureBoundary","boundTag","currentScreenKey","useDescriptorsStore","s","derivations","lastSourceCaptureSignal","useSharedValue","useAnimatedReaction","sourcePairKey","getPairKeyForSource","tag","undefined","getInitialSourceCaptureSignal","linkId","linkKey","group","linkState","pairs","get","captureSignal","set","signal","type","pairKey","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAGA,IAAAI,cAAA,GAAAJ,OAAA;AAEO,MAAMK,2BAA2B,GAAIC,MAI3C,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,eAAe;IAAEC;EAAS,CAAC,GAAGH,MAAM;EACrD,MAAMI,gBAAgB,GAAG,IAAAC,gCAAmB,EAC1CC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACH,gBACtB,CAAC;EACD,MAAMI,uBAAuB,GAAG,IAAAC,qCAAc,EAAgB,IAAI,CAAC;EAEnE,IAAAC,0CAAmB,EAClB,MAAM;IACL,SAAS;;IACT,MAAMC,aAAa,GAClB,IAAAC,0BAAmB,EAACT,QAAQ,CAACU,GAAG,EAAET,gBAAgB,CAAC,IAAIU,SAAS;IACjE,OAAO,IAAAC,4CAA6B,EAAC;MACpCd,OAAO;MACPU,aAAa;MACbK,MAAM,EAAEb,QAAQ,CAACc,OAAO;MACxBC,KAAK,EAAEf,QAAQ,CAACe,KAAK;MACrBC,SAAS,EAAER,aAAa,GAAGS,YAAK,CAACC,GAAG,CAAC,CAAC,GAAGP;IAC1C,CAAC,CAAC;EACH,CAAC,EACAQ,aAAa,IAAK;IAClB,SAAS;;IACT,IAAI,CAACrB,OAAO,IAAI,CAACqB,aAAa,EAAE;MAC/Bd,uBAAuB,CAACe,GAAG,CAAC,IAAI,CAAC;MACjC;IACD;IAEA,IAAIf,uBAAuB,CAACa,GAAG,CAAC,CAAC,KAAKC,aAAa,CAACE,MAAM,EAAE;MAC3D;IACD;IAEAhB,uBAAuB,CAACe,GAAG,CAACD,aAAa,CAACE,MAAM,CAAC;IACjDtB,eAAe,CAAC;MACfuB,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAA5B,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useRefreshBoundary = void 0;
|
|
7
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
var _descriptors = require("../../../../providers/screen/descriptors");
|
|
9
|
-
var _animation = require("../../../../stores/animation.store");
|
|
10
|
-
var _links = require("../../../../stores/bounds/internals/links");
|
|
11
|
-
var _state = require("../../../../stores/bounds/internals/state");
|
|
12
|
-
var _refreshSignals = require("../../utils/refresh-signals");
|
|
13
|
-
const useRefreshBoundary = ({
|
|
14
|
-
enabled,
|
|
15
|
-
boundTag,
|
|
16
|
-
measureBoundary
|
|
17
|
-
}) => {
|
|
18
|
-
const {
|
|
19
|
-
linkKey,
|
|
20
|
-
group
|
|
21
|
-
} = boundTag;
|
|
22
|
-
const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
|
|
23
|
-
const nextScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.nextScreenKey);
|
|
24
|
-
// Source-side boundaries refresh from the next screen's lifecycle pulse.
|
|
25
|
-
// Destination-side boundaries have no next screen, so they refresh from self.
|
|
26
|
-
const refreshScreenKey = nextScreenKey ?? currentScreenKey;
|
|
27
|
-
const refreshWillAnimate = _animation.AnimationStore.getValue(refreshScreenKey, "willAnimate");
|
|
28
|
-
const refreshSettled = _animation.AnimationStore.getValue(refreshScreenKey, "progressSettled");
|
|
29
|
-
const refreshClosing = _animation.AnimationStore.getValue(refreshScreenKey, "closing");
|
|
30
|
-
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
31
|
-
"worklet";
|
|
32
|
-
|
|
33
|
-
if (!enabled) return null;
|
|
34
|
-
const shouldRefresh = !!refreshWillAnimate.get();
|
|
35
|
-
const settled = !!refreshSettled.get();
|
|
36
|
-
// A group's active member can change while the transition is settled
|
|
37
|
-
// (for example, paging a destination gallery). Let that member publish
|
|
38
|
-
// fresh bounds even though there is no willAnimate lifecycle pulse yet.
|
|
39
|
-
if (!shouldRefresh && (!group || !settled)) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
const sourcePairKey = (0, _links.getPairKeyForSource)(boundTag.tag, currentScreenKey) ?? undefined;
|
|
43
|
-
const destinationPairKey = (0, _links.getPairKeyForDestination)(boundTag.tag, currentScreenKey) ?? undefined;
|
|
44
|
-
return (0, _refreshSignals.getRefreshBoundarySignal)({
|
|
45
|
-
enabled,
|
|
46
|
-
currentScreenKey,
|
|
47
|
-
sourcePairKey,
|
|
48
|
-
destinationPairKey,
|
|
49
|
-
linkId: linkKey,
|
|
50
|
-
group,
|
|
51
|
-
shouldRefresh,
|
|
52
|
-
settled,
|
|
53
|
-
closing: !!refreshClosing.get(),
|
|
54
|
-
linkState: _state.pairs.get()
|
|
55
|
-
});
|
|
56
|
-
}, (refreshSignal, prevRefreshSignal) => {
|
|
57
|
-
"worklet";
|
|
58
|
-
|
|
59
|
-
if (!refreshSignal || refreshSignal.signal === prevRefreshSignal?.signal) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
measureBoundary({
|
|
63
|
-
type: refreshSignal.type,
|
|
64
|
-
pairKey: refreshSignal.pairKey
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
exports.useRefreshBoundary = useRefreshBoundary;
|
|
69
|
-
//# sourceMappingURL=use-refresh-boundary.js.map
|
package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_descriptors","_animation","_links","_state","_refreshSignals","useRefreshBoundary","enabled","boundTag","measureBoundary","linkKey","group","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","refreshScreenKey","refreshWillAnimate","AnimationStore","getValue","refreshSettled","refreshClosing","useAnimatedReaction","shouldRefresh","get","settled","sourcePairKey","getPairKeyForSource","tag","undefined","destinationPairKey","getPairKeyForDestination","getRefreshBoundarySignal","linkId","closing","linkState","pairs","refreshSignal","prevRefreshSignal","signal","type","pairKey","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAIA,IAAAI,MAAA,GAAAJ,OAAA;AAGA,IAAAK,eAAA,GAAAL,OAAA;AAQO,MAAMM,kBAAkB,GAAGA,CAAC;EAClCC,OAAO;EACPC,QAAQ;EACRC;AACyB,CAAC,KAAK;EAC/B,MAAM;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGH,QAAQ;EACnC,MAAMI,gBAAgB,GAAG,IAAAC,gCAAmB,EAC1CC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACH,gBACtB,CAAC;EACD,MAAMI,aAAa,GAAG,IAAAH,gCAAmB,EAAEC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,aAAa,CAAC;EAC7E;EACA;EACA,MAAMC,gBAAgB,GAAGD,aAAa,IAAIJ,gBAAgB;EAC1D,MAAMM,kBAAkB,GAAGC,yBAAc,CAACC,QAAQ,CACjDH,gBAAgB,EAChB,aACD,CAAC;EACD,MAAMI,cAAc,GAAGF,yBAAc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