react-native-screen-transitions 3.3.0-rc.3 → 3.4.0-alpha.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/LICENSE +21 -0
- package/README.md +345 -108
- package/lib/commonjs/blank-stack/components/stack-view.js +13 -28
- package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/blank-stack/components/stack-view.native.js +13 -28
- package/lib/commonjs/blank-stack/components/stack-view.native.js.map +1 -1
- package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js +2 -20
- package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/commonjs/component-stack/components/component-screen.js +1 -1
- package/lib/commonjs/component-stack/components/component-screen.js.map +1 -1
- package/lib/commonjs/component-stack/components/stack-view.js +11 -24
- package/lib/commonjs/component-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +2 -20
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.native.js +2 -4
- package/lib/commonjs/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/commonjs/shared/animation/snap-to.js +1 -1
- package/lib/commonjs/shared/animation/snap-to.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +17 -0
- package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +45 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +101 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js +33 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +47 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +57 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +37 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +58 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +35 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/index.js +230 -0
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -0
- package/lib/commonjs/shared/{utils/bounds/types/builder.js → components/create-boundary-component/types.js} +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/types.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +21 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -0
- package/lib/commonjs/shared/components/create-transition-aware-component.js +40 -8
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/native-screen.js +5 -5
- package/lib/commonjs/shared/components/native-screen.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js +3 -2
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +53 -13
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js +9 -9
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js +25 -5
- package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/scene-view.js +34 -0
- package/lib/commonjs/shared/components/scene-view.js.map +1 -0
- package/lib/commonjs/shared/{hooks → components/screen-container/hooks}/use-backdrop-pointer-events.js +7 -5
- package/lib/commonjs/shared/components/screen-container/hooks/use-backdrop-pointer-events.js.map +1 -0
- package/lib/commonjs/shared/components/screen-container/index.js +32 -0
- package/lib/commonjs/shared/components/screen-container/index.js.map +1 -0
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +101 -0
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -0
- package/lib/commonjs/shared/components/screen-container/layers/content.js +118 -0
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -0
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +52 -0
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js +42 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +27 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js +47 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js.map +1 -0
- package/lib/commonjs/shared/{hooks/lifecycle/use-close-transition.js → components/screen-lifecycle/hooks/use-close-transition/index.js} +44 -20
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -0
- package/lib/commonjs/shared/{hooks/animation → components/screen-lifecycle/hooks}/use-high-refresh-rate.js +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js.map +1 -0
- package/lib/commonjs/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-open-transition.js +12 -3
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -0
- package/lib/commonjs/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-screen-events.js +2 -2
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-screen-events.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/index.js +36 -0
- package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -0
- package/lib/commonjs/shared/configs/index.js +3 -1
- package/lib/commonjs/shared/configs/index.js.map +1 -1
- package/lib/commonjs/shared/configs/presets.js +222 -203
- package/lib/commonjs/shared/configs/presets.js.map +1 -1
- package/lib/commonjs/shared/configs/specs.js +8 -1
- package/lib/commonjs/shared/configs/specs.js.map +1 -1
- package/lib/commonjs/shared/constants.js +19 -9
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js +219 -28
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/commonjs/shared/hooks/gestures/use-screen-gesture.js +1 -1
- package/lib/commonjs/shared/hooks/gestures/use-scroll-registry.js +13 -13
- package/lib/commonjs/shared/hooks/gestures/use-scroll-registry.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-closing-route-keys.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-navigation-helpers.js +30 -0
- package/lib/commonjs/shared/hooks/navigation/use-navigation-helpers.js.map +1 -0
- package/lib/commonjs/shared/hooks/navigation/use-optimistic-focused-index.js +20 -0
- package/lib/commonjs/shared/hooks/navigation/use-optimistic-focused-index.js.map +1 -0
- package/lib/commonjs/shared/hooks/navigation/use-previous.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-screen-state.js +4 -8
- package/lib/commonjs/shared/hooks/navigation/use-screen-state.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-stack.js +0 -19
- package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-tab-press-reset.js +32 -0
- package/lib/commonjs/shared/hooks/navigation/use-tab-press-reset.js.map +1 -0
- package/lib/commonjs/shared/hooks/reanimated/use-shared-value-ref.js +38 -0
- package/lib/commonjs/shared/hooks/reanimated/use-shared-value-ref.js.map +1 -0
- package/lib/commonjs/shared/hooks/reanimated/use-shared-value-state.js +5 -13
- package/lib/commonjs/shared/hooks/reanimated/use-shared-value-state.js.map +1 -1
- package/lib/commonjs/shared/index.js +12 -2
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/gestures.provider.js +94 -0
- package/lib/commonjs/shared/providers/gestures/gestures.provider.js.map +1 -0
- package/lib/commonjs/shared/{hooks/gestures/use-screen-gesture-handlers.js → providers/gestures/handlers/use-handlers.js} +77 -98
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -0
- package/lib/commonjs/shared/{utils/gesture/check-gesture-activation.js → providers/gestures/helpers/gesture-activation.js} +2 -2
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js.map +1 -0
- package/lib/commonjs/shared/{utils/gesture/should-defer-to-child-claim.js → providers/gestures/helpers/gesture-claims.js} +1 -1
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-claims.js.map +1 -0
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-directions.js +56 -0
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-directions.js.map +1 -0
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-physics.js +143 -0
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-physics.js.map +1 -0
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-reset.js +76 -0
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-reset.js.map +1 -0
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-targets.js +110 -0
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-targets.js.map +1 -0
- package/lib/commonjs/shared/providers/gestures/helpers/register-direction-claims.js +74 -0
- package/lib/commonjs/shared/providers/gestures/helpers/register-direction-claims.js.map +1 -0
- package/lib/commonjs/shared/providers/gestures/index.js +19 -0
- package/lib/commonjs/shared/providers/gestures/index.js.map +1 -0
- package/lib/commonjs/shared/providers/gestures/types.js +13 -0
- package/lib/commonjs/shared/providers/gestures/types.js.map +1 -0
- package/lib/commonjs/shared/{hooks → providers}/gestures/use-build-gestures.js +27 -28
- package/lib/commonjs/shared/providers/gestures/use-build-gestures.js.map +1 -0
- package/lib/commonjs/shared/providers/layout-anchor.provider.js +24 -9
- package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/register-bounds.provider.js +124 -77
- package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +46 -0
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -0
- package/lib/commonjs/shared/{utils/animation → providers/screen/animation/helpers}/derivations.js +6 -2
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -0
- package/lib/commonjs/shared/{hooks/animation/use-screen-animation.js → providers/screen/animation/helpers/pipeline.js} +70 -45
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/worklet.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/animation/index.js +26 -0
- package/lib/commonjs/shared/providers/screen/animation/index.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +14 -0
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js +91 -0
- package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +41 -0
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +31 -0
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js +28 -0
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/descriptors/index.js +25 -0
- package/lib/commonjs/shared/providers/screen/descriptors/index.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/screen-composer.js +12 -11
- package/lib/commonjs/shared/providers/screen/screen-composer.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles.provider.js +38 -31
- package/lib/commonjs/shared/providers/screen/styles.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/scroll-settle.provider.js +25 -0
- package/lib/commonjs/shared/providers/scroll-settle.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/core.provider.js +14 -8
- package/lib/commonjs/shared/providers/stack/core.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/direct.provider.js +16 -68
- package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/use-closing-route-map.js +30 -0
- package/lib/commonjs/shared/providers/stack/helpers/use-closing-route-map.js.map +1 -0
- package/lib/commonjs/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/align-routes-with-latest.js +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/use-local-routes/helpers/align-routes-with-latest.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/helpers/use-local-routes/helpers/are-descriptors-equal.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/helpers/use-local-routes/helpers/have-same-route-keys.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/helpers/use-local-routes/helpers/routes-are-identical.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/helpers/use-local-routes/index.js +101 -0
- package/lib/commonjs/shared/providers/stack/helpers/use-local-routes/index.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js +58 -0
- package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/helpers/use-stack-derived.js +37 -0
- package/lib/commonjs/shared/providers/stack/helpers/use-stack-derived.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/managed.provider.js +36 -123
- package/lib/commonjs/shared/providers/stack/managed.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/viewport.provider.js +33 -0
- package/lib/commonjs/shared/providers/viewport.provider.js.map +1 -0
- package/lib/commonjs/shared/stores/animation.store.js +33 -20
- package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/helpers/apply-measured-bounds-writes.js +43 -0
- package/lib/commonjs/shared/stores/bounds/helpers/apply-measured-bounds-writes.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/helpers/keys.js +23 -0
- package/lib/commonjs/shared/stores/bounds/helpers/keys.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/helpers/matching.js +22 -0
- package/lib/commonjs/shared/stores/bounds/helpers/matching.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/index.js +37 -0
- package/lib/commonjs/shared/stores/bounds/index.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/internals/clear.js +247 -0
- package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/internals/presence.js +128 -0
- package/lib/commonjs/shared/stores/bounds/internals/presence.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/internals/registry.js +309 -0
- package/lib/commonjs/shared/stores/bounds/internals/registry.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +123 -0
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/internals/state.js +102 -0
- package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/types.js +6 -0
- package/lib/commonjs/shared/stores/bounds/types.js.map +1 -0
- package/lib/commonjs/shared/stores/gesture.store.js +36 -16
- package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
- package/lib/commonjs/shared/types/gesture.types.js +4 -0
- package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
- package/lib/commonjs/shared/types/providers/direct-stack.types.js +6 -0
- package/lib/commonjs/shared/types/providers/direct-stack.types.js.map +1 -0
- package/lib/commonjs/shared/types/providers/managed-stack.types.js +6 -0
- package/lib/commonjs/shared/types/providers/managed-stack.types.js.map +1 -0
- package/lib/commonjs/shared/types/stack.types.js +4 -0
- package/lib/commonjs/shared/types/stack.types.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate-many.js +32 -0
- package/lib/commonjs/shared/utils/animation/animate-many.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/build-bounds-options.js +41 -0
- package/lib/commonjs/shared/utils/bounds/helpers/build-bounds-options.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js +137 -0
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/constants.js +15 -0
- package/lib/commonjs/shared/utils/bounds/helpers/constants.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/geometry.js +3 -2
- package/lib/commonjs/shared/utils/bounds/helpers/geometry.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/interpolate-style.js +2 -2
- package/lib/commonjs/shared/utils/bounds/helpers/interpolate-style.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/interpolate.js +20 -0
- package/lib/commonjs/shared/utils/bounds/helpers/interpolate.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js +67 -0
- package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js +40 -0
- package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/math.js +132 -0
- package/lib/commonjs/shared/utils/bounds/helpers/math.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js +45 -0
- package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js +25 -0
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js +154 -21
- package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/index.js +89 -190
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js +60 -0
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js +20 -0
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/types.js +6 -0
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/types.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js +295 -0
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/types/options.js +6 -0
- package/lib/commonjs/shared/utils/bounds/types/{builder.js.map → options.js.map} +1 -1
- package/lib/commonjs/shared/utils/create-provider.js +1 -23
- package/lib/commonjs/shared/utils/create-provider.js.map +1 -1
- package/lib/commonjs/shared/utils/gesture/find-collapse-target.js +12 -1
- package/lib/commonjs/shared/utils/gesture/find-collapse-target.js.map +1 -1
- package/lib/commonjs/shared/utils/gesture/resolve-ownership.js +0 -28
- package/lib/commonjs/shared/utils/gesture/resolve-ownership.js.map +1 -1
- package/lib/commonjs/shared/utils/gesture/validate-snap-points.js +21 -2
- package/lib/commonjs/shared/utils/gesture/validate-snap-points.js.map +1 -1
- package/lib/commonjs/shared/utils/logger.js +1 -3
- package/lib/commonjs/shared/utils/logger.js.map +1 -1
- package/lib/commonjs/shared/utils/navigation/compose-descriptors.js.map +1 -1
- package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js +70 -0
- package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -0
- package/lib/commonjs/shared/utils/navigation/sync-routes-with-removed.js.map +1 -1
- package/lib/commonjs/shared/utils/normalize-interpolated-style.js +68 -0
- package/lib/commonjs/shared/utils/normalize-interpolated-style.js.map +1 -0
- package/lib/commonjs/shared/utils/overlay/visibility.js +18 -0
- package/lib/commonjs/shared/utils/overlay/visibility.js.map +1 -0
- package/lib/commonjs/shared/utils/platform.js +13 -0
- package/lib/commonjs/shared/utils/platform.js.map +1 -0
- package/lib/module/blank-stack/components/stack-view.js +10 -24
- package/lib/module/blank-stack/components/stack-view.js.map +1 -1
- package/lib/module/blank-stack/components/stack-view.native.js +10 -24
- package/lib/module/blank-stack/components/stack-view.native.js.map +1 -1
- package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js +3 -20
- package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/module/component-stack/components/component-screen.js +1 -1
- package/lib/module/component-stack/components/component-screen.js.map +1 -1
- package/lib/module/component-stack/components/stack-view.js +9 -21
- package/lib/module/component-stack/components/stack-view.js.map +1 -1
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js +3 -20
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.native.js +1 -3
- package/lib/module/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/module/shared/animation/snap-to.js +1 -1
- package/lib/module/shared/animation/snap-to.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +12 -0
- package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +40 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +95 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +28 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +42 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +52 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +32 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +53 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +30 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/index.js +224 -0
- package/lib/module/shared/components/create-boundary-component/index.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/types.js +4 -0
- package/lib/module/shared/components/create-boundary-component/types.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +17 -0
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -0
- package/lib/module/shared/components/create-transition-aware-component.js +42 -10
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/native-screen.js +5 -5
- package/lib/module/shared/components/native-screen.js.map +1 -1
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js +4 -2
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/float-overlay.js +53 -13
- package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/overlay-host.js +8 -8
- package/lib/module/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/screen-overlay.js +25 -5
- package/lib/module/shared/components/overlay/variations/screen-overlay.js.map +1 -1
- package/lib/module/shared/components/scene-view.js +29 -0
- package/lib/module/shared/components/scene-view.js.map +1 -0
- package/lib/module/shared/{hooks → components/screen-container/hooks}/use-backdrop-pointer-events.js +7 -5
- package/lib/module/shared/components/screen-container/hooks/use-backdrop-pointer-events.js.map +1 -0
- package/lib/module/shared/components/screen-container/index.js +28 -0
- package/lib/module/shared/components/screen-container/index.js.map +1 -0
- package/lib/module/shared/components/screen-container/layers/backdrop.js +96 -0
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -0
- package/lib/module/shared/components/screen-container/layers/content.js +112 -0
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -0
- package/lib/module/shared/components/screen-container/layers/surface-container.js +47 -0
- package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js +36 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +22 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js +42 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js.map +1 -0
- package/lib/module/shared/{hooks/lifecycle/use-close-transition.js → components/screen-lifecycle/hooks/use-close-transition/index.js} +44 -20
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -0
- package/lib/module/shared/{hooks/animation → components/screen-lifecycle/hooks}/use-high-refresh-rate.js +1 -2
- package/lib/module/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js.map +1 -0
- package/lib/module/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-open-transition.js +12 -3
- package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -0
- package/lib/module/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-screen-events.js +2 -2
- package/lib/module/shared/components/screen-lifecycle/hooks/use-screen-events.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/index.js +31 -0
- package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -0
- package/lib/module/shared/configs/index.js +4 -2
- package/lib/module/shared/configs/index.js.map +1 -1
- package/lib/module/shared/configs/presets.js +222 -203
- package/lib/module/shared/configs/presets.js.map +1 -1
- package/lib/module/shared/configs/specs.js +7 -0
- package/lib/module/shared/configs/specs.js.map +1 -1
- package/lib/module/shared/constants.js +18 -8
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/hooks/animation/use-associated-style.js +221 -30
- package/lib/module/shared/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/module/shared/hooks/gestures/use-screen-gesture.js +1 -1
- package/lib/module/shared/hooks/gestures/use-screen-gesture.js.map +1 -1
- package/lib/module/shared/hooks/gestures/use-scroll-registry.js +13 -13
- package/lib/module/shared/hooks/gestures/use-scroll-registry.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-closing-route-keys.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-navigation-helpers.js +26 -0
- package/lib/module/shared/hooks/navigation/use-navigation-helpers.js.map +1 -0
- package/lib/module/shared/hooks/navigation/use-optimistic-focused-index.js +17 -0
- package/lib/module/shared/hooks/navigation/use-optimistic-focused-index.js.map +1 -0
- package/lib/module/shared/hooks/navigation/use-previous.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-screen-state.js +4 -8
- package/lib/module/shared/hooks/navigation/use-screen-state.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-stack.js +0 -20
- package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-tab-press-reset.js +28 -0
- package/lib/module/shared/hooks/navigation/use-tab-press-reset.js.map +1 -0
- package/lib/module/shared/hooks/reanimated/use-shared-value-ref.js +33 -0
- package/lib/module/shared/hooks/reanimated/use-shared-value-ref.js.map +1 -0
- package/lib/module/shared/hooks/reanimated/use-shared-value-state.js +6 -14
- package/lib/module/shared/hooks/reanimated/use-shared-value-state.js.map +1 -1
- package/lib/module/shared/index.js +6 -1
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/gestures/gestures.provider.js +87 -0
- package/lib/module/shared/providers/gestures/gestures.provider.js.map +1 -0
- package/lib/module/shared/{hooks/gestures/use-screen-gesture-handlers.js → providers/gestures/handlers/use-handlers.js} +64 -85
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -0
- package/lib/module/shared/{utils/gesture/check-gesture-activation.js → providers/gestures/helpers/gesture-activation.js} +2 -2
- package/lib/module/shared/providers/gestures/helpers/gesture-activation.js.map +1 -0
- package/lib/module/shared/{utils/gesture/should-defer-to-child-claim.js → providers/gestures/helpers/gesture-claims.js} +1 -1
- package/lib/module/shared/providers/gestures/helpers/gesture-claims.js.map +1 -0
- package/lib/module/shared/providers/gestures/helpers/gesture-directions.js +47 -0
- package/lib/module/shared/providers/gestures/helpers/gesture-directions.js.map +1 -0
- package/lib/module/shared/{utils/gesture/velocity.js → providers/gestures/helpers/gesture-physics.js} +56 -30
- package/lib/module/shared/providers/gestures/helpers/gesture-physics.js.map +1 -0
- package/lib/module/shared/providers/gestures/helpers/gesture-reset.js +71 -0
- package/lib/module/shared/providers/gestures/helpers/gesture-reset.js.map +1 -0
- package/lib/module/shared/providers/gestures/helpers/gesture-targets.js +104 -0
- package/lib/module/shared/providers/gestures/helpers/gesture-targets.js.map +1 -0
- package/lib/module/shared/providers/gestures/helpers/register-direction-claims.js +70 -0
- package/lib/module/shared/providers/gestures/helpers/register-direction-claims.js.map +1 -0
- package/lib/module/shared/providers/gestures/index.js +4 -0
- package/lib/module/shared/providers/gestures/index.js.map +1 -0
- package/lib/module/shared/providers/gestures/types.js +9 -0
- package/lib/module/shared/providers/gestures/types.js.map +1 -0
- package/lib/module/shared/{hooks → providers}/gestures/use-build-gestures.js +26 -27
- package/lib/module/shared/providers/gestures/use-build-gestures.js.map +1 -0
- package/lib/module/shared/providers/layout-anchor.provider.js +24 -9
- package/lib/module/shared/providers/layout-anchor.provider.js.map +1 -1
- package/lib/module/shared/providers/register-bounds.provider.js +124 -76
- package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/animation.provider.js +40 -0
- package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -0
- package/lib/module/shared/{utils/animation → providers/screen/animation/helpers}/derivations.js +6 -2
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -0
- package/lib/module/shared/{hooks/animation/use-screen-animation.js → providers/screen/animation/helpers/pipeline.js} +70 -44
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/worklet.js.map +1 -0
- package/lib/module/shared/providers/screen/animation/index.js +5 -0
- package/lib/module/shared/providers/screen/animation/index.js.map +1 -0
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js +10 -0
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -0
- package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js +84 -0
- package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -0
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +37 -0
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -0
- package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +27 -0
- package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -0
- package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js +24 -0
- package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.js.map +1 -0
- package/lib/module/shared/providers/screen/descriptors/index.js +4 -0
- package/lib/module/shared/providers/screen/descriptors/index.js.map +1 -0
- package/lib/module/shared/providers/screen/screen-composer.js +12 -11
- package/lib/module/shared/providers/screen/screen-composer.js.map +1 -1
- package/lib/module/shared/providers/screen/styles.provider.js +36 -30
- package/lib/module/shared/providers/screen/styles.provider.js.map +1 -1
- package/lib/module/shared/providers/scroll-settle.provider.js +19 -0
- package/lib/module/shared/providers/scroll-settle.provider.js.map +1 -0
- package/lib/module/shared/providers/stack/core.provider.js +14 -8
- package/lib/module/shared/providers/stack/core.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/direct.provider.js +17 -67
- package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/helpers/use-closing-route-map.js +25 -0
- package/lib/module/shared/providers/stack/helpers/use-closing-route-map.js.map +1 -0
- package/lib/module/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/align-routes-with-latest.js +2 -1
- package/lib/module/shared/providers/stack/helpers/use-local-routes/helpers/align-routes-with-latest.js.map +1 -0
- package/lib/module/shared/providers/stack/helpers/use-local-routes/helpers/are-descriptors-equal.js.map +1 -0
- package/lib/module/shared/providers/stack/helpers/use-local-routes/helpers/have-same-route-keys.js.map +1 -0
- package/lib/module/shared/providers/stack/helpers/use-local-routes/helpers/routes-are-identical.js.map +1 -0
- package/lib/module/shared/providers/stack/helpers/use-local-routes/index.js +95 -0
- package/lib/module/shared/providers/stack/helpers/use-local-routes/index.js.map +1 -0
- package/lib/module/shared/providers/stack/helpers/use-processed-routes.js +54 -0
- package/lib/module/shared/providers/stack/helpers/use-processed-routes.js.map +1 -0
- package/lib/module/shared/providers/stack/helpers/use-stack-derived.js +33 -0
- package/lib/module/shared/providers/stack/helpers/use-stack-derived.js.map +1 -0
- package/lib/module/shared/providers/stack/managed.provider.js +37 -124
- package/lib/module/shared/providers/stack/managed.provider.js.map +1 -1
- package/lib/module/shared/providers/viewport.provider.js +27 -0
- package/lib/module/shared/providers/viewport.provider.js.map +1 -0
- package/lib/module/shared/stores/animation.store.js +34 -21
- package/lib/module/shared/stores/animation.store.js.map +1 -1
- package/lib/module/shared/stores/bounds/helpers/apply-measured-bounds-writes.js +38 -0
- package/lib/module/shared/stores/bounds/helpers/apply-measured-bounds-writes.js.map +1 -0
- package/lib/module/shared/stores/bounds/helpers/keys.js +19 -0
- package/lib/module/shared/stores/bounds/helpers/keys.js.map +1 -0
- package/lib/module/shared/stores/bounds/helpers/matching.js +17 -0
- package/lib/module/shared/stores/bounds/helpers/matching.js.map +1 -0
- package/lib/module/shared/stores/bounds/index.js +33 -0
- package/lib/module/shared/stores/bounds/index.js.map +1 -0
- package/lib/module/shared/stores/bounds/internals/clear.js +242 -0
- package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -0
- package/lib/module/shared/stores/bounds/internals/presence.js +118 -0
- package/lib/module/shared/stores/bounds/internals/presence.js.map +1 -0
- package/lib/module/shared/stores/bounds/internals/registry.js +295 -0
- package/lib/module/shared/stores/bounds/internals/registry.js.map +1 -0
- package/lib/module/shared/stores/bounds/internals/resolver.js +120 -0
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -0
- package/lib/module/shared/stores/bounds/internals/state.js +93 -0
- package/lib/module/shared/stores/bounds/internals/state.js.map +1 -0
- package/lib/module/shared/stores/bounds/types.js +4 -0
- package/lib/module/shared/stores/bounds/types.js.map +1 -0
- package/lib/module/shared/stores/gesture.store.js +36 -16
- package/lib/module/shared/stores/gesture.store.js.map +1 -1
- package/lib/module/shared/types/gesture.types.js +5 -0
- package/lib/module/shared/types/gesture.types.js.map +1 -1
- package/lib/module/shared/types/providers/direct-stack.types.js +4 -0
- package/lib/module/shared/types/providers/direct-stack.types.js.map +1 -0
- package/lib/module/shared/types/providers/managed-stack.types.js +4 -0
- package/lib/module/shared/types/providers/managed-stack.types.js.map +1 -0
- package/lib/module/shared/types/stack.types.js +5 -0
- package/lib/module/shared/types/stack.types.js.map +1 -1
- package/lib/module/shared/utils/animation/animate-many.js +27 -0
- package/lib/module/shared/utils/animation/animate-many.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/build-bounds-options.js +36 -0
- package/lib/module/shared/utils/bounds/helpers/build-bounds-options.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js +132 -0
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/constants.js +11 -0
- package/lib/module/shared/utils/bounds/helpers/constants.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/geometry.js +3 -2
- package/lib/module/shared/utils/bounds/helpers/geometry.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/interpolate-style.js +2 -2
- package/lib/module/shared/utils/bounds/helpers/interpolate-style.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/interpolate.js +16 -0
- package/lib/module/shared/utils/bounds/helpers/interpolate.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/interpolators.js +62 -0
- package/lib/module/shared/utils/bounds/helpers/interpolators.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/link-accessor.js +35 -0
- package/lib/module/shared/utils/bounds/helpers/link-accessor.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/math.js +115 -0
- package/lib/module/shared/utils/bounds/helpers/math.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js +40 -0
- package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js +20 -0
- package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/style-composers.js +154 -21
- package/lib/module/shared/utils/bounds/helpers/style-composers.js.map +1 -1
- package/lib/module/shared/utils/bounds/index.js +86 -187
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js +54 -0
- package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js.map +1 -0
- package/lib/module/shared/utils/bounds/sugar/navigation/index.js +15 -0
- package/lib/module/shared/utils/bounds/sugar/navigation/index.js.map +1 -0
- package/lib/module/shared/utils/bounds/sugar/navigation/types.js +4 -0
- package/lib/module/shared/utils/bounds/sugar/navigation/types.js.map +1 -0
- package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js +290 -0
- package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js.map +1 -0
- package/lib/module/shared/utils/bounds/types/options.js +4 -0
- package/lib/module/shared/utils/bounds/types/{builder.js.map → options.js.map} +1 -1
- package/lib/module/shared/utils/create-provider.js +1 -23
- package/lib/module/shared/utils/create-provider.js.map +1 -1
- package/lib/module/shared/utils/gesture/find-collapse-target.js +12 -1
- package/lib/module/shared/utils/gesture/find-collapse-target.js.map +1 -1
- package/lib/module/shared/utils/gesture/resolve-ownership.js +0 -27
- package/lib/module/shared/utils/gesture/resolve-ownership.js.map +1 -1
- package/lib/module/shared/utils/gesture/validate-snap-points.js +20 -2
- package/lib/module/shared/utils/gesture/validate-snap-points.js.map +1 -1
- package/lib/module/shared/utils/logger.js +0 -1
- package/lib/module/shared/utils/logger.js.map +1 -1
- package/lib/module/shared/utils/navigation/compose-descriptors.js.map +1 -1
- package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js +66 -0
- package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -0
- package/lib/module/shared/utils/navigation/sync-routes-with-removed.js.map +1 -1
- package/lib/module/shared/utils/normalize-interpolated-style.js +64 -0
- package/lib/module/shared/utils/normalize-interpolated-style.js.map +1 -0
- package/lib/module/shared/utils/overlay/visibility.js +12 -0
- package/lib/module/shared/utils/overlay/visibility.js.map +1 -0
- package/lib/module/shared/utils/platform.js +9 -0
- package/lib/module/shared/utils/platform.js.map +1 -0
- package/lib/typescript/blank-stack/components/stack-view.d.ts +1 -2
- package/lib/typescript/blank-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/blank-stack/components/stack-view.native.d.ts +1 -2
- package/lib/typescript/blank-stack/components/stack-view.native.d.ts.map +1 -1
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/component-stack/components/stack-view.d.ts +1 -2
- package/lib/typescript/component-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.native.d.ts +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts +2 -0
- package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts +8 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts +23 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts +11 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts +18 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts +10 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts +8 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts +12 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts +10 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts +30 -0
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts +38 -0
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +9 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts.map +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 +3 -0
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts +13 -0
- package/lib/typescript/shared/components/scene-view.d.ts.map +1 -0
- package/lib/typescript/shared/{hooks → components/screen-container/hooks}/use-backdrop-pointer-events.d.ts +1 -0
- package/lib/typescript/shared/components/screen-container/hooks/use-backdrop-pointer-events.d.ts.map +1 -0
- package/lib/typescript/shared/components/{screen-container.d.ts → screen-container/index.d.ts} +1 -1
- package/lib/typescript/shared/components/screen-container/index.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +2 -0
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts +6 -0
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts +8 -0
- package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.d.ts +11 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts +2 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.d.ts +2 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts +7 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts.map +1 -0
- package/lib/typescript/shared/{hooks/animation → components/screen-lifecycle/hooks}/use-high-refresh-rate.d.ts +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.d.ts.map +1 -0
- package/lib/typescript/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-open-transition.d.ts +3 -3
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts.map +1 -0
- package/lib/typescript/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-screen-events.d.ts +2 -2
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-screen-events.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/index.d.ts +10 -0
- package/lib/typescript/shared/components/screen-lifecycle/index.d.ts.map +1 -0
- package/lib/typescript/shared/configs/index.d.ts +2 -0
- package/lib/typescript/shared/configs/index.d.ts.map +1 -1
- package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
- package/lib/typescript/shared/configs/specs.d.ts +1 -0
- package/lib/typescript/shared/configs/specs.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +9 -5
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts +27 -2
- package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/gestures/use-scroll-registry.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-closing-route-keys.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-history.d.ts +2 -1
- package/lib/typescript/shared/hooks/navigation/use-history.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-navigation-helpers.d.ts +4 -0
- package/lib/typescript/shared/hooks/navigation/use-navigation-helpers.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/navigation/use-optimistic-focused-index.d.ts +7 -0
- package/lib/typescript/shared/hooks/navigation/use-optimistic-focused-index.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/navigation/use-previous.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-screen-state.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -41
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-tab-press-reset.d.ts +10 -0
- package/lib/typescript/shared/hooks/navigation/use-tab-press-reset.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/reanimated/use-shared-value-ref.d.ts +8 -0
- package/lib/typescript/shared/hooks/reanimated/use-shared-value-ref.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/reanimated/use-shared-value-state.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +27 -16
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/gestures.provider.d.ts +19 -0
- package/lib/typescript/shared/providers/gestures/gestures.provider.d.ts.map +1 -0
- package/lib/typescript/shared/{hooks/gestures/use-screen-gesture-handlers.d.ts → providers/gestures/handlers/use-handlers.d.ts} +6 -4
- package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -0
- package/lib/typescript/shared/{utils/gesture/check-gesture-activation.d.ts → providers/gestures/helpers/gesture-activation.d.ts} +7 -13
- package/lib/typescript/shared/providers/gestures/helpers/gesture-activation.d.ts.map +1 -0
- package/lib/typescript/shared/{utils/gesture/should-defer-to-child-claim.d.ts → providers/gestures/helpers/gesture-claims.d.ts} +2 -2
- package/lib/typescript/shared/providers/gestures/helpers/gesture-claims.d.ts.map +1 -0
- package/lib/typescript/shared/providers/gestures/helpers/gesture-directions.d.ts +13 -0
- package/lib/typescript/shared/providers/gestures/helpers/gesture-directions.d.ts.map +1 -0
- package/lib/typescript/shared/providers/gestures/helpers/gesture-physics.d.ts +42 -0
- package/lib/typescript/shared/providers/gestures/helpers/gesture-physics.d.ts.map +1 -0
- package/lib/typescript/shared/{utils/gesture/reset-gesture-values.d.ts → providers/gestures/helpers/gesture-reset.d.ts} +6 -4
- package/lib/typescript/shared/providers/gestures/helpers/gesture-reset.d.ts.map +1 -0
- package/lib/typescript/shared/{utils/gesture/determine-snap-target.d.ts → providers/gestures/helpers/gesture-targets.d.ts} +19 -1
- package/lib/typescript/shared/providers/gestures/helpers/gesture-targets.d.ts.map +1 -0
- package/lib/typescript/shared/providers/gestures/helpers/register-direction-claims.d.ts +9 -0
- package/lib/typescript/shared/providers/gestures/helpers/register-direction-claims.d.ts.map +1 -0
- package/lib/typescript/shared/providers/gestures/index.d.ts +3 -0
- package/lib/typescript/shared/providers/gestures/index.d.ts.map +1 -0
- package/lib/typescript/shared/providers/{gestures.provider.d.ts → gestures/types.d.ts} +4 -20
- package/lib/typescript/shared/providers/gestures/types.d.ts.map +1 -0
- package/lib/typescript/shared/{hooks → providers}/gestures/use-build-gestures.d.ts +2 -2
- package/lib/typescript/shared/providers/gestures/use-build-gestures.d.ts.map +1 -0
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +7 -2
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +13 -0
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -0
- package/lib/typescript/shared/{utils/animation → providers/screen/animation/helpers}/derivations.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +11 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -0
- package/lib/typescript/shared/{utils/animation → providers/screen/animation/helpers}/worklet.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/worklet.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/animation/index.d.ts +3 -0
- package/lib/typescript/shared/providers/screen/animation/index.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts +2 -0
- package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts +26 -0
- package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +24 -0
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts +8 -0
- package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.d.ts +7 -0
- package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/descriptors/index.d.ts +2 -0
- package/lib/typescript/shared/providers/screen/descriptors/index.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles.provider.d.ts +7 -7
- package/lib/typescript/shared/providers/screen/styles.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/scroll-settle.provider.d.ts +12 -0
- package/lib/typescript/shared/providers/scroll-settle.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/core.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts +4 -32
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/helpers/use-closing-route-map.d.ts +7 -0
- package/lib/typescript/shared/providers/stack/helpers/use-closing-route-map.d.ts.map +1 -0
- package/lib/typescript/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/align-routes-with-latest.d.ts +1 -4
- package/lib/typescript/shared/providers/stack/helpers/use-local-routes/helpers/align-routes-with-latest.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/helpers/use-local-routes/helpers/are-descriptors-equal.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/helpers/use-local-routes/helpers/have-same-route-keys.d.ts +3 -0
- package/lib/typescript/shared/providers/stack/helpers/use-local-routes/helpers/have-same-route-keys.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/helpers/use-local-routes/helpers/routes-are-identical.d.ts +3 -0
- package/lib/typescript/shared/providers/stack/helpers/use-local-routes/helpers/routes-are-identical.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/helpers/{use-local-routes.d.ts → use-local-routes/index.d.ts} +3 -3
- package/lib/typescript/shared/providers/stack/helpers/use-local-routes/index.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/helpers/use-processed-routes.d.ts +17 -0
- package/lib/typescript/shared/providers/stack/helpers/use-processed-routes.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/helpers/use-stack-derived.d.ts +18 -0
- package/lib/typescript/shared/providers/stack/helpers/use-stack-derived.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts +5 -37
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/viewport.provider.d.ts +13 -0
- package/lib/typescript/shared/providers/viewport.provider.d.ts.map +1 -0
- package/lib/typescript/shared/stores/animation.store.d.ts +6 -4
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/helpers/apply-measured-bounds-writes.d.ts +19 -0
- package/lib/typescript/shared/stores/bounds/helpers/apply-measured-bounds-writes.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/helpers/keys.d.ts +3 -0
- package/lib/typescript/shared/stores/bounds/helpers/keys.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts +4 -0
- package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/index.d.ts +32 -0
- package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/internals/clear.d.ts +6 -0
- package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/internals/presence.d.ts +12 -0
- package/lib/typescript/shared/stores/bounds/internals/presence.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/internals/registry.d.ts +16 -0
- package/lib/typescript/shared/stores/bounds/internals/registry.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts +4 -0
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts +11 -0
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/types.d.ts +62 -0
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -0
- package/lib/typescript/shared/stores/gesture.store.d.ts +13 -4
- package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +85 -29
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +17 -3
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/gesture.types.d.ts +27 -8
- package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +2 -2
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/overlay.types.d.ts +8 -0
- package/lib/typescript/shared/types/overlay.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/providers/direct-stack.types.d.ts +22 -0
- package/lib/typescript/shared/types/providers/direct-stack.types.d.ts.map +1 -0
- package/lib/typescript/shared/types/providers/managed-stack.types.d.ts +45 -0
- package/lib/typescript/shared/types/providers/managed-stack.types.d.ts.map +1 -0
- package/lib/typescript/shared/types/screen.types.d.ts +72 -1
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/stack.types.d.ts +7 -0
- package/lib/typescript/shared/types/stack.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/animate-many.d.ts +13 -0
- package/lib/typescript/shared/utils/animation/animate-many.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts +14 -0
- package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts +4 -0
- package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/constants.d.ts +9 -0
- package/lib/typescript/shared/utils/bounds/helpers/constants.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/interpolate-style.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/interpolate.d.ts +2 -0
- package/lib/typescript/shared/utils/bounds/helpers/interpolate.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts +13 -0
- package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts +11 -0
- package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/math.d.ts +38 -0
- package/lib/typescript/shared/utils/bounds/helpers/math.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts +16 -0
- package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts +6 -0
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts +4 -4
- package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/index.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts +17 -0
- package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts +3 -0
- package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts +18 -0
- package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts +4 -0
- package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/types/{builder.d.ts → options.d.ts} +15 -7
- package/lib/typescript/shared/utils/bounds/types/{builder.d.ts.map → options.d.ts.map} +1 -1
- package/lib/typescript/shared/utils/create-provider.d.ts +2 -2
- package/lib/typescript/shared/utils/create-provider.d.ts.map +1 -1
- package/lib/typescript/shared/utils/gesture/find-collapse-target.d.ts.map +1 -1
- package/lib/typescript/shared/utils/gesture/resolve-ownership.d.ts +2 -10
- package/lib/typescript/shared/utils/gesture/resolve-ownership.d.ts.map +1 -1
- package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts +7 -2
- package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts.map +1 -1
- package/lib/typescript/shared/utils/logger.d.ts +0 -1
- package/lib/typescript/shared/utils/logger.d.ts.map +1 -1
- package/lib/typescript/shared/utils/navigation/compose-descriptors.d.ts +1 -4
- package/lib/typescript/shared/utils/navigation/compose-descriptors.d.ts.map +1 -1
- package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts +25 -0
- package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts.map +1 -0
- package/lib/typescript/shared/utils/navigation/sync-routes-with-removed.d.ts +1 -3
- package/lib/typescript/shared/utils/navigation/sync-routes-with-removed.d.ts.map +1 -1
- package/lib/typescript/shared/utils/normalize-interpolated-style.d.ts +17 -0
- package/lib/typescript/shared/utils/normalize-interpolated-style.d.ts.map +1 -0
- package/lib/typescript/shared/utils/overlay/visibility.d.ts +10 -0
- package/lib/typescript/shared/utils/overlay/visibility.d.ts.map +1 -0
- package/lib/typescript/shared/utils/platform.d.ts +5 -0
- package/lib/typescript/shared/utils/platform.d.ts.map +1 -0
- package/package.json +10 -2
- package/src/blank-stack/components/stack-view.native.tsx +15 -33
- package/src/blank-stack/components/stack-view.tsx +15 -33
- package/src/blank-stack/navigators/create-blank-stack-navigator.tsx +2 -28
- package/src/component-stack/components/component-screen.tsx +1 -1
- package/src/component-stack/components/stack-view.tsx +8 -29
- package/src/native-stack/navigators/createNativeStackNavigator.tsx +2 -28
- package/src/native-stack/views/NativeStackView.native.tsx +1 -4
- package/src/shared/animation/snap-to.ts +1 -1
- package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +16 -0
- package/src/shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts +50 -0
- package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +177 -0
- package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +55 -0
- package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +59 -0
- package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +83 -0
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +47 -0
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.ts +83 -0
- package/src/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.ts +40 -0
- package/src/shared/components/create-boundary-component/index.tsx +263 -0
- package/src/shared/components/create-boundary-component/types.ts +47 -0
- package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +29 -0
- package/src/shared/components/create-transition-aware-component.tsx +53 -9
- package/src/shared/components/native-screen.tsx +4 -8
- package/src/shared/components/overlay/helpers/get-active-overlay.ts +3 -2
- package/src/shared/components/overlay/variations/float-overlay.tsx +55 -13
- package/src/shared/components/overlay/variations/overlay-host.tsx +14 -9
- package/src/shared/components/overlay/variations/screen-overlay.tsx +31 -5
- package/src/shared/components/scene-view.tsx +32 -0
- package/src/shared/{hooks → components/screen-container/hooks}/use-backdrop-pointer-events.ts +9 -5
- package/src/shared/components/screen-container/index.tsx +26 -0
- package/src/shared/components/screen-container/layers/backdrop.tsx +111 -0
- package/src/shared/components/screen-container/layers/content.tsx +133 -0
- package/src/shared/components/screen-container/layers/surface-container.tsx +55 -0
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.ts +46 -0
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.ts +27 -0
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.ts +58 -0
- package/src/shared/{hooks/lifecycle/use-close-transition.ts → components/screen-lifecycle/hooks/use-close-transition/index.ts} +49 -23
- package/src/shared/{hooks/animation/use-high-refresh-rate.tsx → components/screen-lifecycle/hooks/use-high-refresh-rate.ts} +2 -2
- package/src/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-open-transition.ts +15 -4
- package/src/shared/{hooks/lifecycle → components/screen-lifecycle/hooks}/use-screen-events.ts +4 -4
- package/src/shared/components/screen-lifecycle/index.tsx +36 -0
- package/src/shared/configs/index.ts +3 -1
- package/src/shared/configs/presets.ts +189 -153
- package/src/shared/configs/specs.ts +8 -0
- package/src/shared/constants.ts +18 -6
- package/src/shared/hooks/animation/use-associated-style.ts +347 -0
- package/src/shared/hooks/gestures/use-screen-gesture.ts +1 -1
- package/src/shared/hooks/gestures/{use-scroll-registry.tsx → use-scroll-registry.ts} +11 -7
- package/src/shared/hooks/navigation/use-history.ts +1 -1
- package/src/shared/hooks/navigation/use-navigation-helpers.ts +25 -0
- package/src/shared/hooks/navigation/use-optimistic-focused-index.ts +19 -0
- package/src/shared/hooks/navigation/{use-previous.tsx → use-previous.ts} +1 -1
- package/src/shared/hooks/navigation/{use-screen-state.tsx → use-screen-state.ts} +7 -10
- package/src/shared/hooks/navigation/use-stack.tsx +1 -41
- package/src/shared/hooks/navigation/use-tab-press-reset.ts +41 -0
- package/src/shared/hooks/reanimated/use-shared-value-ref.ts +43 -0
- package/src/shared/hooks/reanimated/use-shared-value-state.ts +6 -14
- package/src/shared/index.ts +20 -1
- package/src/shared/providers/gestures/gestures.provider.tsx +127 -0
- package/src/shared/{hooks/gestures/use-screen-gesture-handlers.ts → providers/gestures/handlers/use-handlers.ts} +109 -126
- package/src/shared/{utils/gesture/check-gesture-activation.ts → providers/gestures/helpers/gesture-activation.ts} +6 -13
- package/src/shared/{utils/gesture/should-defer-to-child-claim.ts → providers/gestures/helpers/gesture-claims.ts} +1 -1
- package/src/shared/providers/gestures/helpers/gesture-directions.ts +97 -0
- package/src/shared/{utils/gesture/velocity.ts → providers/gestures/helpers/gesture-physics.ts} +97 -48
- package/src/shared/providers/gestures/helpers/gesture-reset.ts +108 -0
- package/src/shared/providers/gestures/helpers/gesture-targets.ts +167 -0
- package/src/shared/providers/gestures/helpers/register-direction-claims.ts +84 -0
- package/src/shared/providers/gestures/index.tsx +10 -0
- package/src/shared/providers/gestures/types.ts +45 -0
- package/src/shared/{hooks/gestures/use-build-gestures.tsx → providers/gestures/use-build-gestures.ts} +31 -42
- package/src/shared/providers/layout-anchor.provider.tsx +61 -27
- package/src/shared/providers/register-bounds.provider.tsx +169 -113
- package/src/shared/providers/screen/animation/animation.provider.tsx +57 -0
- package/src/shared/{utils/animation → providers/screen/animation/helpers}/derivations.ts +5 -5
- package/src/shared/{hooks/animation/use-screen-animation.tsx → providers/screen/animation/helpers/pipeline.ts} +109 -48
- package/src/shared/{utils/animation → providers/screen/animation/helpers}/worklet.ts +1 -1
- package/src/shared/providers/screen/animation/index.tsx +5 -0
- package/src/shared/providers/screen/animation/use-screen-animation.tsx +6 -0
- package/src/shared/providers/screen/descriptors/descriptors.provider.tsx +113 -0
- package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +67 -0
- package/src/shared/providers/screen/descriptors/helpers/get-ancestor-keys.ts +30 -0
- package/src/shared/providers/screen/descriptors/helpers/get-ancestor-navigator-keys.ts +29 -0
- package/src/shared/providers/screen/descriptors/index.tsx +6 -0
- package/src/shared/providers/screen/screen-composer.tsx +12 -9
- package/src/shared/providers/screen/styles.provider.tsx +122 -111
- package/src/shared/providers/scroll-settle.provider.tsx +24 -0
- package/src/shared/providers/stack/core.provider.tsx +13 -8
- package/src/shared/providers/stack/direct.provider.tsx +21 -112
- package/src/shared/providers/stack/helpers/use-closing-route-map.ts +28 -0
- package/src/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/align-routes-with-latest.ts +2 -5
- package/src/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/have-same-route-keys.ts +1 -3
- package/src/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/routes-are-identical.ts +1 -3
- package/src/shared/providers/stack/helpers/use-local-routes/index.ts +147 -0
- package/src/shared/providers/stack/helpers/use-processed-routes.ts +85 -0
- package/src/shared/providers/stack/helpers/use-stack-derived.ts +43 -0
- package/src/shared/providers/stack/managed.provider.tsx +65 -190
- package/src/shared/providers/viewport.provider.tsx +39 -0
- package/src/shared/stores/animation.store.ts +42 -20
- package/src/shared/stores/bounds/helpers/apply-measured-bounds-writes.ts +101 -0
- package/src/shared/stores/bounds/helpers/keys.ts +21 -0
- package/src/shared/stores/bounds/helpers/matching.ts +25 -0
- package/src/shared/stores/bounds/index.ts +60 -0
- package/src/shared/stores/bounds/internals/clear.ts +335 -0
- package/src/shared/stores/bounds/internals/presence.ts +146 -0
- package/src/shared/stores/bounds/internals/registry.ts +408 -0
- package/src/shared/stores/bounds/internals/resolver.ts +213 -0
- package/src/shared/stores/bounds/internals/state.ts +115 -0
- package/src/shared/stores/bounds/types.ts +76 -0
- package/src/shared/stores/gesture.store.ts +52 -27
- package/src/shared/types/animation.types.ts +92 -30
- package/src/shared/types/bounds.types.ts +25 -5
- package/src/shared/types/gesture.types.ts +29 -8
- package/src/shared/types/index.ts +11 -0
- package/src/shared/types/overlay.types.ts +12 -0
- package/src/shared/types/providers/direct-stack.types.ts +35 -0
- package/src/shared/types/providers/managed-stack.types.ts +59 -0
- package/src/shared/types/screen.types.ts +77 -1
- package/src/shared/types/stack.types.ts +8 -0
- package/src/shared/utils/animation/animate-many.ts +40 -0
- package/src/shared/utils/bounds/helpers/build-bounds-options.ts +48 -0
- package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +180 -0
- package/src/shared/utils/bounds/helpers/constants.ts +10 -0
- package/src/shared/utils/bounds/helpers/geometry.ts +4 -3
- package/src/shared/utils/bounds/helpers/interpolate-style.ts +2 -2
- package/src/shared/utils/bounds/helpers/interpolate.ts +19 -0
- package/src/shared/utils/bounds/helpers/interpolators.ts +108 -0
- package/src/shared/utils/bounds/helpers/link-accessor.ts +40 -0
- package/src/shared/utils/bounds/helpers/math.ts +161 -0
- package/src/shared/utils/bounds/helpers/navigation-accessor.ts +61 -0
- package/src/shared/utils/bounds/helpers/resolve-bound-tag.ts +26 -0
- package/src/shared/utils/bounds/helpers/style-composers.ts +132 -57
- package/src/shared/utils/bounds/index.ts +115 -254
- package/src/shared/utils/bounds/sugar/navigation/helpers.ts +74 -0
- package/src/shared/utils/bounds/sugar/navigation/index.ts +14 -0
- package/src/shared/utils/bounds/sugar/navigation/types.ts +26 -0
- package/src/shared/utils/bounds/sugar/navigation/zoom.ts +348 -0
- package/src/shared/utils/bounds/types/{builder.ts → options.ts} +26 -18
- package/src/shared/utils/create-provider.tsx +0 -27
- package/src/shared/utils/gesture/find-collapse-target.ts +10 -1
- package/src/shared/utils/gesture/resolve-ownership.ts +1 -37
- package/src/shared/utils/gesture/validate-snap-points.ts +29 -4
- package/src/shared/utils/logger.ts +0 -3
- package/src/shared/utils/navigation/compose-descriptors.ts +1 -3
- package/src/shared/utils/navigation/resolve-scene-neighbors.ts +89 -0
- package/src/shared/utils/navigation/sync-routes-with-removed.ts +1 -4
- package/src/shared/utils/normalize-interpolated-style.ts +67 -0
- package/src/shared/utils/overlay/visibility.ts +23 -0
- package/src/shared/utils/platform.ts +6 -0
- package/lib/commonjs/shared/components/screen-container.js +0 -128
- package/lib/commonjs/shared/components/screen-container.js.map +0 -1
- package/lib/commonjs/shared/components/screen-lifecycle.js +0 -29
- package/lib/commonjs/shared/components/screen-lifecycle.js.map +0 -1
- package/lib/commonjs/shared/hooks/animation/use-high-refresh-rate.js.map +0 -1
- package/lib/commonjs/shared/hooks/animation/use-screen-animation.js.map +0 -1
- package/lib/commonjs/shared/hooks/gestures/use-build-gestures.js.map +0 -1
- package/lib/commonjs/shared/hooks/gestures/use-screen-gesture-handlers.js.map +0 -1
- package/lib/commonjs/shared/hooks/lifecycle/use-close-transition.js.map +0 -1
- package/lib/commonjs/shared/hooks/lifecycle/use-open-transition.js.map +0 -1
- package/lib/commonjs/shared/hooks/lifecycle/use-screen-events.js.map +0 -1
- package/lib/commonjs/shared/hooks/use-backdrop-pointer-events.js.map +0 -1
- package/lib/commonjs/shared/providers/gestures.provider.js +0 -158
- package/lib/commonjs/shared/providers/gestures.provider.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/keys.provider.js +0 -40
- package/lib/commonjs/shared/providers/screen/keys.provider.js.map +0 -1
- package/lib/commonjs/shared/providers/stack/helpers/active-screens-limit.js +0 -23
- package/lib/commonjs/shared/providers/stack/helpers/active-screens-limit.js.map +0 -1
- package/lib/commonjs/shared/providers/stack/helpers/use-local-routes.js +0 -93
- package/lib/commonjs/shared/providers/stack/helpers/use-local-routes.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds.store.js +0 -231
- package/lib/commonjs/shared/stores/bounds.store.js.map +0 -1
- package/lib/commonjs/shared/utils/animation/derivations.js.map +0 -1
- package/lib/commonjs/shared/utils/animation/worklet.js.map +0 -1
- package/lib/commonjs/shared/utils/gesture/check-gesture-activation.js.map +0 -1
- package/lib/commonjs/shared/utils/gesture/determine-dismissal.js +0 -50
- package/lib/commonjs/shared/utils/gesture/determine-dismissal.js.map +0 -1
- package/lib/commonjs/shared/utils/gesture/determine-snap-target.js +0 -56
- package/lib/commonjs/shared/utils/gesture/determine-snap-target.js.map +0 -1
- package/lib/commonjs/shared/utils/gesture/map-gesture-to-progress.js +0 -17
- package/lib/commonjs/shared/utils/gesture/map-gesture-to-progress.js.map +0 -1
- package/lib/commonjs/shared/utils/gesture/reset-gesture-values.js +0 -56
- package/lib/commonjs/shared/utils/gesture/reset-gesture-values.js.map +0 -1
- package/lib/commonjs/shared/utils/gesture/should-defer-to-child-claim.js.map +0 -1
- package/lib/commonjs/shared/utils/gesture/velocity.js +0 -111
- package/lib/commonjs/shared/utils/gesture/velocity.js.map +0 -1
- package/lib/commonjs/shared/utils/navigation/align-routes-with-latest.js.map +0 -1
- package/lib/commonjs/shared/utils/navigation/are-descriptors-equal.js.map +0 -1
- package/lib/commonjs/shared/utils/navigation/have-same-route-keys.js.map +0 -1
- package/lib/commonjs/shared/utils/navigation/routes-are-identical.js.map +0 -1
- package/lib/commonjs/shared/utils/reset-stores-for-screen.js +0 -20
- package/lib/commonjs/shared/utils/reset-stores-for-screen.js.map +0 -1
- package/lib/module/shared/components/screen-container.js +0 -122
- package/lib/module/shared/components/screen-container.js.map +0 -1
- package/lib/module/shared/components/screen-lifecycle.js +0 -24
- package/lib/module/shared/components/screen-lifecycle.js.map +0 -1
- package/lib/module/shared/hooks/animation/use-high-refresh-rate.js.map +0 -1
- package/lib/module/shared/hooks/animation/use-screen-animation.js.map +0 -1
- package/lib/module/shared/hooks/gestures/use-build-gestures.js.map +0 -1
- package/lib/module/shared/hooks/gestures/use-screen-gesture-handlers.js.map +0 -1
- package/lib/module/shared/hooks/lifecycle/use-close-transition.js.map +0 -1
- package/lib/module/shared/hooks/lifecycle/use-open-transition.js.map +0 -1
- package/lib/module/shared/hooks/lifecycle/use-screen-events.js.map +0 -1
- package/lib/module/shared/hooks/use-backdrop-pointer-events.js.map +0 -1
- package/lib/module/shared/providers/gestures.provider.js +0 -151
- package/lib/module/shared/providers/gestures.provider.js.map +0 -1
- package/lib/module/shared/providers/screen/keys.provider.js +0 -35
- package/lib/module/shared/providers/screen/keys.provider.js.map +0 -1
- package/lib/module/shared/providers/stack/helpers/active-screens-limit.js +0 -19
- package/lib/module/shared/providers/stack/helpers/active-screens-limit.js.map +0 -1
- package/lib/module/shared/providers/stack/helpers/use-local-routes.js +0 -87
- package/lib/module/shared/providers/stack/helpers/use-local-routes.js.map +0 -1
- package/lib/module/shared/stores/bounds.store.js +0 -227
- package/lib/module/shared/stores/bounds.store.js.map +0 -1
- package/lib/module/shared/utils/animation/derivations.js.map +0 -1
- package/lib/module/shared/utils/animation/worklet.js.map +0 -1
- package/lib/module/shared/utils/bounds/types/builder.js +0 -4
- package/lib/module/shared/utils/gesture/check-gesture-activation.js.map +0 -1
- package/lib/module/shared/utils/gesture/determine-dismissal.js +0 -45
- package/lib/module/shared/utils/gesture/determine-dismissal.js.map +0 -1
- package/lib/module/shared/utils/gesture/determine-snap-target.js +0 -52
- package/lib/module/shared/utils/gesture/determine-snap-target.js.map +0 -1
- package/lib/module/shared/utils/gesture/map-gesture-to-progress.js +0 -12
- package/lib/module/shared/utils/gesture/map-gesture-to-progress.js.map +0 -1
- package/lib/module/shared/utils/gesture/reset-gesture-values.js +0 -51
- package/lib/module/shared/utils/gesture/reset-gesture-values.js.map +0 -1
- package/lib/module/shared/utils/gesture/should-defer-to-child-claim.js.map +0 -1
- package/lib/module/shared/utils/gesture/velocity.js.map +0 -1
- package/lib/module/shared/utils/navigation/align-routes-with-latest.js.map +0 -1
- package/lib/module/shared/utils/navigation/are-descriptors-equal.js.map +0 -1
- package/lib/module/shared/utils/navigation/have-same-route-keys.js.map +0 -1
- package/lib/module/shared/utils/navigation/routes-are-identical.js.map +0 -1
- package/lib/module/shared/utils/reset-stores-for-screen.js +0 -15
- package/lib/module/shared/utils/reset-stores-for-screen.js.map +0 -1
- package/lib/typescript/shared/components/screen-container.d.ts.map +0 -1
- package/lib/typescript/shared/components/screen-lifecycle.d.ts +0 -12
- package/lib/typescript/shared/components/screen-lifecycle.d.ts.map +0 -1
- package/lib/typescript/shared/hooks/animation/use-high-refresh-rate.d.ts.map +0 -1
- package/lib/typescript/shared/hooks/animation/use-screen-animation.d.ts +0 -8
- package/lib/typescript/shared/hooks/animation/use-screen-animation.d.ts.map +0 -1
- package/lib/typescript/shared/hooks/gestures/use-build-gestures.d.ts.map +0 -1
- package/lib/typescript/shared/hooks/gestures/use-screen-gesture-handlers.d.ts.map +0 -1
- package/lib/typescript/shared/hooks/lifecycle/use-close-transition.d.ts +0 -13
- package/lib/typescript/shared/hooks/lifecycle/use-close-transition.d.ts.map +0 -1
- package/lib/typescript/shared/hooks/lifecycle/use-open-transition.d.ts.map +0 -1
- package/lib/typescript/shared/hooks/lifecycle/use-screen-events.d.ts.map +0 -1
- package/lib/typescript/shared/hooks/use-backdrop-pointer-events.d.ts.map +0 -1
- package/lib/typescript/shared/providers/gestures.provider.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/keys.provider.d.ts +0 -22
- package/lib/typescript/shared/providers/screen/keys.provider.d.ts.map +0 -1
- package/lib/typescript/shared/providers/stack/helpers/active-screens-limit.d.ts +0 -9
- package/lib/typescript/shared/providers/stack/helpers/active-screens-limit.d.ts.map +0 -1
- package/lib/typescript/shared/providers/stack/helpers/use-local-routes.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds.store.d.ts +0 -43
- package/lib/typescript/shared/stores/bounds.store.d.ts.map +0 -1
- package/lib/typescript/shared/utils/animation/derivations.d.ts.map +0 -1
- package/lib/typescript/shared/utils/animation/worklet.d.ts.map +0 -1
- package/lib/typescript/shared/utils/gesture/check-gesture-activation.d.ts.map +0 -1
- package/lib/typescript/shared/utils/gesture/determine-dismissal.d.ts +0 -24
- package/lib/typescript/shared/utils/gesture/determine-dismissal.d.ts.map +0 -1
- package/lib/typescript/shared/utils/gesture/determine-snap-target.d.ts.map +0 -1
- package/lib/typescript/shared/utils/gesture/map-gesture-to-progress.d.ts +0 -5
- package/lib/typescript/shared/utils/gesture/map-gesture-to-progress.d.ts.map +0 -1
- package/lib/typescript/shared/utils/gesture/reset-gesture-values.d.ts.map +0 -1
- package/lib/typescript/shared/utils/gesture/should-defer-to-child-claim.d.ts.map +0 -1
- package/lib/typescript/shared/utils/gesture/velocity.d.ts +0 -26
- package/lib/typescript/shared/utils/gesture/velocity.d.ts.map +0 -1
- package/lib/typescript/shared/utils/navigation/align-routes-with-latest.d.ts.map +0 -1
- package/lib/typescript/shared/utils/navigation/are-descriptors-equal.d.ts.map +0 -1
- package/lib/typescript/shared/utils/navigation/have-same-route-keys.d.ts +0 -6
- package/lib/typescript/shared/utils/navigation/have-same-route-keys.d.ts.map +0 -1
- package/lib/typescript/shared/utils/navigation/routes-are-identical.d.ts +0 -6
- package/lib/typescript/shared/utils/navigation/routes-are-identical.d.ts.map +0 -1
- package/lib/typescript/shared/utils/reset-stores-for-screen.d.ts +0 -7
- package/lib/typescript/shared/utils/reset-stores-for-screen.d.ts.map +0 -1
- package/src/shared/components/screen-container.tsx +0 -132
- package/src/shared/components/screen-lifecycle.tsx +0 -32
- package/src/shared/hooks/animation/use-associated-style.tsx +0 -71
- package/src/shared/providers/gestures.provider.tsx +0 -227
- package/src/shared/providers/screen/keys.provider.tsx +0 -48
- package/src/shared/providers/stack/helpers/active-screens-limit.ts +0 -35
- package/src/shared/providers/stack/helpers/use-local-routes.tsx +0 -133
- package/src/shared/stores/bounds.store.ts +0 -257
- package/src/shared/utils/gesture/determine-dismissal.ts +0 -80
- package/src/shared/utils/gesture/determine-snap-target.ts +0 -79
- package/src/shared/utils/gesture/map-gesture-to-progress.ts +0 -11
- package/src/shared/utils/gesture/reset-gesture-values.ts +0 -67
- package/src/shared/utils/reset-stores-for-screen.ts +0 -14
- /package/lib/commonjs/shared/{utils/animation → providers/screen/animation/helpers}/worklet.js +0 -0
- /package/lib/commonjs/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/are-descriptors-equal.js +0 -0
- /package/lib/commonjs/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/have-same-route-keys.js +0 -0
- /package/lib/commonjs/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/routes-are-identical.js +0 -0
- /package/lib/module/shared/{utils/animation → providers/screen/animation/helpers}/worklet.js +0 -0
- /package/lib/module/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/are-descriptors-equal.js +0 -0
- /package/lib/module/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/have-same-route-keys.js +0 -0
- /package/lib/module/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/routes-are-identical.js +0 -0
- /package/lib/typescript/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/are-descriptors-equal.d.ts +0 -0
- /package/src/shared/hooks/navigation/{use-closing-route-keys.tsx → use-closing-route-keys.ts} +0 -0
- /package/src/shared/{utils/navigation → providers/stack/helpers/use-local-routes/helpers}/are-descriptors-equal.ts +0 -0
|
@@ -6,11 +6,15 @@ import { Platform } from "react-native";
|
|
|
6
6
|
*/
|
|
7
7
|
export const MASK_STYLE_ID = "_ROOT_MASKED";
|
|
8
8
|
export const CONTAINER_STYLE_ID = "_ROOT_CONTAINER";
|
|
9
|
+
export const NAVIGATION_MASK_HOST_FLAG_STYLE_ID = "_NAVIGATION_MASK_HOST";
|
|
10
|
+
export const NAVIGATION_MASK_STYLE_ID = "_NAVIGATION_ROOT_MASK";
|
|
11
|
+
export const NAVIGATION_CONTAINER_STYLE_ID = "_NAVIGATION_ROOT_CONTAINER";
|
|
9
12
|
|
|
10
13
|
/**
|
|
11
14
|
* Styles
|
|
12
15
|
*/
|
|
13
16
|
export const NO_STYLES = Object.freeze({});
|
|
17
|
+
export const NO_PROPS = Object.freeze({});
|
|
14
18
|
|
|
15
19
|
/**
|
|
16
20
|
* Default gesture values
|
|
@@ -18,11 +22,16 @@ export const NO_STYLES = Object.freeze({});
|
|
|
18
22
|
const DEFAULT_GESTURE_VALUES = {
|
|
19
23
|
x: 0,
|
|
20
24
|
y: 0,
|
|
25
|
+
normX: 0,
|
|
26
|
+
normY: 0,
|
|
27
|
+
dismissing: 0,
|
|
28
|
+
dragging: 0,
|
|
29
|
+
direction: null,
|
|
30
|
+
// Deprecated aliases
|
|
21
31
|
normalizedX: 0,
|
|
22
32
|
normalizedY: 0,
|
|
23
33
|
isDismissing: 0,
|
|
24
|
-
isDragging: 0
|
|
25
|
-
direction: null
|
|
34
|
+
isDragging: 0
|
|
26
35
|
};
|
|
27
36
|
|
|
28
37
|
/**
|
|
@@ -32,6 +41,7 @@ export const createScreenTransitionState = (route, meta) => ({
|
|
|
32
41
|
progress: 0,
|
|
33
42
|
closing: 0,
|
|
34
43
|
animating: 0,
|
|
44
|
+
settled: 1,
|
|
35
45
|
entering: 1,
|
|
36
46
|
gesture: {
|
|
37
47
|
...DEFAULT_GESTURE_VALUES
|
|
@@ -47,6 +57,7 @@ export const DEFAULT_SCREEN_TRANSITION_STATE = Object.freeze({
|
|
|
47
57
|
progress: 0,
|
|
48
58
|
closing: 0,
|
|
49
59
|
animating: 0,
|
|
60
|
+
settled: 1,
|
|
50
61
|
entering: 1,
|
|
51
62
|
gesture: DEFAULT_GESTURE_VALUES,
|
|
52
63
|
route: {}
|
|
@@ -79,14 +90,13 @@ export const FULLSCREEN_DIMENSIONS = dimensions => {
|
|
|
79
90
|
height: dimensions.height
|
|
80
91
|
};
|
|
81
92
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
export const GESTURE_VELOCITY_IMPACT = 0.3;
|
|
87
|
-
export const SNAP_VELOCITY_IMPACT = 0.1;
|
|
93
|
+
export const DEFAULT_GESTURE_VELOCITY_IMPACT = 0.3;
|
|
94
|
+
export const DEFAULT_GESTURE_SNAP_VELOCITY_IMPACT = 0.1;
|
|
95
|
+
export const DEFAULT_GESTURE_RELEASE_VELOCITY_MAX = 3.2;
|
|
96
|
+
export const DEFAULT_GESTURE_RELEASE_VELOCITY_SCALE = 1;
|
|
88
97
|
export const DEFAULT_GESTURE_DIRECTION = "horizontal";
|
|
89
98
|
export const DEFAULT_GESTURE_DRIVES_PROGRESS = true;
|
|
99
|
+
export const DEFAULT_GESTURE_SNAP_LOCKED = false;
|
|
90
100
|
export const DEFAULT_GESTURE_ACTIVATION_AREA = "screen";
|
|
91
101
|
export const IS_WEB = Platform.OS === "web";
|
|
92
102
|
export const TRUE = 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","MASK_STYLE_ID","CONTAINER_STYLE_ID","NO_STYLES","Object","freeze","DEFAULT_GESTURE_VALUES","x","y","normalizedX","normalizedY","isDismissing","isDragging","
|
|
1
|
+
{"version":3,"names":["Platform","MASK_STYLE_ID","CONTAINER_STYLE_ID","NAVIGATION_MASK_HOST_FLAG_STYLE_ID","NAVIGATION_MASK_STYLE_ID","NAVIGATION_CONTAINER_STYLE_ID","NO_STYLES","Object","freeze","NO_PROPS","DEFAULT_GESTURE_VALUES","x","y","normX","normY","dismissing","dragging","direction","normalizedX","normalizedY","isDismissing","isDragging","createScreenTransitionState","route","meta","progress","closing","animating","settled","entering","gesture","DEFAULT_SCREEN_TRANSITION_STATE","EMPTY_BOUND_HELPER_RESULT","EMPTY_BOUND_HELPER_RESULT_RAW","scaleX","scaleY","scale","translateX","translateY","width","height","ENTER_RANGE","EXIT_RANGE","FULLSCREEN_DIMENSIONS","dimensions","pageX","pageY","DEFAULT_GESTURE_VELOCITY_IMPACT","DEFAULT_GESTURE_SNAP_VELOCITY_IMPACT","DEFAULT_GESTURE_RELEASE_VELOCITY_MAX","DEFAULT_GESTURE_RELEASE_VELOCITY_SCALE","DEFAULT_GESTURE_DIRECTION","DEFAULT_GESTURE_DRIVES_PROGRESS","DEFAULT_GESTURE_SNAP_LOCKED","DEFAULT_GESTURE_ACTIVATION_AREA","IS_WEB","OS","TRUE","FALSE","EPSILON","ANIMATION_SNAP_THRESHOLD"],"sourceRoot":"../../../src","sources":["shared/constants.ts"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,cAAc;AAOvC;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG,cAAc;AAC3C,OAAO,MAAMC,kBAAkB,GAAG,iBAAiB;AACnD,OAAO,MAAMC,kCAAkC,GAAG,uBAAuB;AACzE,OAAO,MAAMC,wBAAwB,GAAG,uBAAuB;AAC/D,OAAO,MAAMC,6BAA6B,GAAG,4BAA4B;;AAEzE;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC1C,OAAO,MAAMC,QAAQ,GAAGF,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,CAAC;;AAEzC;AACA;AACA;AACA,MAAME,sBAAsB,GAAG;EAC9BC,CAAC,EAAE,CAAC;EACJC,CAAC,EAAE,CAAC;EACJC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAE,CAAC;EACRC,UAAU,EAAE,CAAC;EACbC,QAAQ,EAAE,CAAC;EACXC,SAAS,EAAE,IAAI;EAEf;EACAC,WAAW,EAAE,CAAC;EACdC,WAAW,EAAE,CAAC;EACdC,YAAY,EAAE,CAAC;EACfC,UAAU,EAAE;AACb,CAAU;;AAEV;AACA;AACA;AACA,OAAO,MAAMC,2BAA2B,GAAGA,CAC1CC,KAAqB,EACrBC,IAA8B,MACF;EAC5BC,QAAQ,EAAE,CAAC;EACXC,OAAO,EAAE,CAAC;EACVC,SAAS,EAAE,CAAC;EACZC,OAAO,EAAE,CAAC;EACVC,QAAQ,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AAsC,GAAG,CAAC;AACvD,OAAO,MAAMC,yBAAyB,GAAG,YAAY;AACrD,OAAO,MAAMC,+BAA+B,GAAG,IAAI;AACnD,OAAO,MAAMC,2BAA2B,GAAG,KAAK;AAChD,OAAO,MAAMC,+BAA+C,GAAG,QAAQ;AAEvE,OAAO,MAAMC,MAAM,GAAGvD,QAAQ,CAACwD,EAAE,KAAK,KAAK;AAE3C,OAAO,MAAMC,IAAI,GAAG,CAAC;AACrB,OAAO,MAAMC,KAAK,GAAG,CAAC;;AAEtB;AACA;AACA;AACA,OAAO,MAAMC,OAAO,GAAG,IAAI;;AAE3B;AACA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAG,IAAI","ignoreList":[]}
|
|
@@ -1,63 +1,254 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { NO_STYLES } from "../../constants";
|
|
3
|
+
import { useAnimatedProps, useAnimatedStyle, useSharedValue } from "react-native-reanimated";
|
|
4
|
+
import { EPSILON, NO_PROPS, NO_STYLES } from "../../constants";
|
|
5
|
+
import { useDescriptorDerivations } from "../../providers/screen/descriptors";
|
|
5
6
|
import { useScreenStyles } from "../../providers/screen/styles.provider";
|
|
7
|
+
import { AnimationStore } from "../../stores/animation.store";
|
|
8
|
+
import { BoundStore } from "../../stores/bounds";
|
|
9
|
+
const TRANSIENT_EMPTY_GRACE_FRAMES = 2;
|
|
10
|
+
const TRANSITION_PROGRESS_COMPLETE = 1 - EPSILON;
|
|
11
|
+
const IDENTITY_TRANSFORM = [{
|
|
12
|
+
translateX: 0
|
|
13
|
+
}, {
|
|
14
|
+
translateY: 0
|
|
15
|
+
}, {
|
|
16
|
+
scaleX: 1
|
|
17
|
+
}, {
|
|
18
|
+
scaleY: 1
|
|
19
|
+
}];
|
|
20
|
+
const ALWAYS_RESET_STYLE_VALUES = {
|
|
21
|
+
zIndex: 0,
|
|
22
|
+
elevation: 0
|
|
23
|
+
};
|
|
24
|
+
const hasAnyKeys = record => {
|
|
25
|
+
"worklet";
|
|
26
|
+
|
|
27
|
+
for (const _key in record) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
};
|
|
32
|
+
const collectKeyMeta = record => {
|
|
33
|
+
"worklet";
|
|
34
|
+
|
|
35
|
+
const keys = {};
|
|
36
|
+
let hasAny = false;
|
|
37
|
+
for (const key in record) {
|
|
38
|
+
keys[key] = true;
|
|
39
|
+
hasAny = true;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
keys,
|
|
43
|
+
hasAny
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
const getGroupTagParts = tag => {
|
|
47
|
+
"worklet";
|
|
48
|
+
|
|
49
|
+
const separatorIndex = tag.indexOf(":");
|
|
50
|
+
if (separatorIndex <= 0 || separatorIndex >= tag.length - 1) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
group: tag.slice(0, separatorIndex),
|
|
55
|
+
memberId: tag.slice(separatorIndex + 1)
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
const allowPreviousTransitionEvidence = tag => {
|
|
59
|
+
"worklet";
|
|
60
|
+
|
|
61
|
+
const groupTagParts = getGroupTagParts(tag);
|
|
62
|
+
if (!groupTagParts) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// For grouped boundaries, only the active member can inherit
|
|
67
|
+
// transition evidence from the previous screen.
|
|
68
|
+
const activeGroupMemberId = BoundStore.getGroupActiveId(groupTagParts.group);
|
|
69
|
+
return activeGroupMemberId !== null && activeGroupMemberId === groupTagParts.memberId;
|
|
70
|
+
};
|
|
71
|
+
const buildUnsetPatch = ({
|
|
72
|
+
previousKeys,
|
|
73
|
+
currentKeys,
|
|
74
|
+
shouldDeferUnset,
|
|
75
|
+
resetTransformOnUnset
|
|
76
|
+
}) => {
|
|
77
|
+
"worklet";
|
|
78
|
+
|
|
79
|
+
const unsetPatch = {};
|
|
80
|
+
for (const key in previousKeys) {
|
|
81
|
+
if (currentKeys[key]) continue;
|
|
82
|
+
const shouldAlwaysUnset = key in ALWAYS_RESET_STYLE_VALUES;
|
|
83
|
+
if (shouldDeferUnset && !shouldAlwaysUnset) continue;
|
|
84
|
+
if (key === "transform" && resetTransformOnUnset) {
|
|
85
|
+
unsetPatch.transform = IDENTITY_TRANSFORM;
|
|
86
|
+
} else if (key in ALWAYS_RESET_STYLE_VALUES) {
|
|
87
|
+
unsetPatch[key] = ALWAYS_RESET_STYLE_VALUES[key];
|
|
88
|
+
} else {
|
|
89
|
+
unsetPatch[key] = undefined;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return unsetPatch;
|
|
93
|
+
};
|
|
94
|
+
|
|
6
95
|
/**
|
|
7
|
-
*
|
|
96
|
+
* Resolves the animated style associated with an `id` (styleId/bound tag), while
|
|
97
|
+
* guarding against one-frame glitches during shared-boundary transitions.
|
|
98
|
+
*
|
|
99
|
+
* Why this exists:
|
|
100
|
+
* - During push/pop, links and style maps can be briefly out of sync.
|
|
101
|
+
* - Without guards, boundaries can flash raw layout for one frame.
|
|
102
|
+
* - Cleanup must be deterministic so stale transform keys do not linger.
|
|
103
|
+
*
|
|
104
|
+
* Visual model (worklet state machine):
|
|
105
|
+
*
|
|
106
|
+
* expected transition + no resolved style yet -> waiting-first-style
|
|
107
|
+
* expected transition + transient empty style map -> hold-last-style
|
|
108
|
+
* otherwise -> live
|
|
109
|
+
*
|
|
110
|
+
* - `waiting-first-style`: return `opacity: 0` until first resolved style arrives.
|
|
111
|
+
* - `hold-last-style`: reuse last resolved style through short empty-map gaps.
|
|
112
|
+
* - `live`: apply current resolved style directly.
|
|
113
|
+
*
|
|
114
|
+
* For grouped tags (`group:id`), previous-screen transition evidence is only
|
|
115
|
+
* considered for the group's active member to avoid hiding non-active siblings.
|
|
116
|
+
*
|
|
117
|
+
* Set `waitForFirstResolvedStyle` to `false` for generic shared-bound-tag usage
|
|
118
|
+
* where the transition can be driven by other style ids.
|
|
8
119
|
*/
|
|
9
120
|
export const useAssociatedStyles = ({
|
|
10
|
-
id
|
|
121
|
+
id,
|
|
122
|
+
resetTransformOnUnset = false,
|
|
123
|
+
waitForFirstResolvedStyle = true
|
|
11
124
|
} = {}) => {
|
|
12
125
|
const {
|
|
13
126
|
stylesMap,
|
|
14
127
|
ancestorStylesMaps
|
|
15
128
|
} = useScreenStyles();
|
|
16
|
-
const
|
|
17
|
-
|
|
129
|
+
const {
|
|
130
|
+
previousScreenKey,
|
|
131
|
+
currentScreenKey,
|
|
132
|
+
hasConfiguredInterpolator
|
|
133
|
+
} = useDescriptorDerivations();
|
|
134
|
+
const isAnimating = AnimationStore.getRouteAnimation(currentScreenKey, "animating");
|
|
135
|
+
const progress = AnimationStore.getRouteAnimation(currentScreenKey, "progress");
|
|
136
|
+
const isClosing = AnimationStore.getRouteAnimation(currentScreenKey, "closing");
|
|
137
|
+
const previousAppliedKeys = useSharedValue({});
|
|
138
|
+
const emptyGraceFrameCount = useSharedValue(0);
|
|
139
|
+
const lastResolvedBase = useSharedValue(null);
|
|
140
|
+
const associatedStyles = useAnimatedStyle(() => {
|
|
18
141
|
"worklet";
|
|
19
142
|
|
|
20
143
|
if (!id) {
|
|
21
|
-
|
|
22
|
-
return;
|
|
144
|
+
return NO_STYLES;
|
|
23
145
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
146
|
+
|
|
147
|
+
// Check local slot first, then fall back to parent
|
|
148
|
+
const ownSlot = stylesMap.value[id];
|
|
149
|
+
const ancestorSlot = ancestorStylesMaps.find(ancestorMap => ancestorMap.value[id])?.value[id];
|
|
150
|
+
const slot = ownSlot || ancestorSlot;
|
|
151
|
+
const base = slot?.style || NO_STYLES;
|
|
152
|
+
const {
|
|
153
|
+
keys: currentKeys,
|
|
154
|
+
hasAny: hasCurrentKeys
|
|
155
|
+
} = collectKeyMeta(base);
|
|
156
|
+
const hasPreviousKeys = hasAnyKeys(previousAppliedKeys.value);
|
|
157
|
+
const isTransitioning = isAnimating.get() !== 0 || isClosing.get() !== 0;
|
|
158
|
+
const isTransitionProgressInFlight = progress.get() < TRANSITION_PROGRESS_COMPLETE;
|
|
159
|
+
const isTransitionInFlight = isTransitioning || isTransitionProgressInFlight;
|
|
160
|
+
const canUsePreviousTransitionEvidence = resetTransformOnUnset && allowPreviousTransitionEvidence(id);
|
|
161
|
+
const hasActiveLink = resetTransformOnUnset && canUsePreviousTransitionEvidence && (BoundStore.hasPendingLink(id) || BoundStore.hasSourceLink(id, currentScreenKey) || BoundStore.hasDestinationLink(id, currentScreenKey));
|
|
162
|
+
const hasPreviousTransitionEvidence = canUsePreviousTransitionEvidence && !!previousScreenKey && (!!BoundStore.getSnapshot(id, previousScreenKey) || BoundStore.hasBoundaryPresence(id, previousScreenKey));
|
|
163
|
+
|
|
164
|
+
// Split intent:
|
|
165
|
+
// - incoming: strict signal for first-style hiding
|
|
166
|
+
// - in-flight: broad signal to keep existing styles from resetting
|
|
167
|
+
const shouldExpectIncomingStyle = resetTransformOnUnset && (hasActiveLink && canUsePreviousTransitionEvidence || hasPreviousTransitionEvidence);
|
|
168
|
+
const shouldProtectInFlightStyles = resetTransformOnUnset && (hasActiveLink || hasPreviousTransitionEvidence);
|
|
169
|
+
if (hasCurrentKeys) {
|
|
170
|
+
lastResolvedBase.value = base;
|
|
28
171
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
172
|
+
const hasPersistedResolvedStyle = !!lastResolvedBase.value;
|
|
173
|
+
const hasResolvedStyle = hasCurrentKeys || hasPersistedResolvedStyle;
|
|
174
|
+
const isTransientEmptyGap = hasConfiguredInterpolator && shouldProtectInFlightStyles && !isTransitioning && !hasCurrentKeys && (hasPreviousKeys || hasPersistedResolvedStyle);
|
|
32
175
|
|
|
33
|
-
|
|
34
|
-
|
|
176
|
+
// Keep styles stable for a couple of frames to absorb
|
|
177
|
+
// transient empty-map gaps on slower devices.
|
|
178
|
+
if (isTransientEmptyGap) {
|
|
179
|
+
emptyGraceFrameCount.value = emptyGraceFrameCount.value + 1;
|
|
180
|
+
} else {
|
|
181
|
+
emptyGraceFrameCount.value = 0;
|
|
35
182
|
}
|
|
183
|
+
const isWithinGapGrace = isTransientEmptyGap && emptyGraceFrameCount.value <= TRANSIENT_EMPTY_GRACE_FRAMES;
|
|
184
|
+
const shouldDeferUnset = resetTransformOnUnset && shouldProtectInFlightStyles && (isTransitioning || isWithinGapGrace);
|
|
36
185
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
186
|
+
/**
|
|
187
|
+
* Associated-style state machine:
|
|
188
|
+
* - waiting-first-style: transition is expected but no style has resolved yet.
|
|
189
|
+
* - hold-last-style: transient empty frame; reuse last resolved style.
|
|
190
|
+
* - live: apply current resolved style normally.
|
|
191
|
+
*/
|
|
192
|
+
let mode = "live";
|
|
193
|
+
if (waitForFirstResolvedStyle && resetTransformOnUnset && hasConfiguredInterpolator && shouldExpectIncomingStyle && isTransitionInFlight && !hasResolvedStyle) {
|
|
194
|
+
mode = "waiting-first-style";
|
|
195
|
+
} else if (shouldDeferUnset && !hasCurrentKeys && hasPersistedResolvedStyle) {
|
|
196
|
+
mode = "hold-last-style";
|
|
44
197
|
}
|
|
45
|
-
|
|
198
|
+
const resolvedBase = mode === "hold-last-style" ? lastResolvedBase.value : base;
|
|
199
|
+
const unsetPatch = buildUnsetPatch({
|
|
200
|
+
previousKeys: previousAppliedKeys.value,
|
|
201
|
+
currentKeys,
|
|
202
|
+
shouldDeferUnset,
|
|
203
|
+
resetTransformOnUnset
|
|
204
|
+
});
|
|
205
|
+
if (shouldDeferUnset) {
|
|
206
|
+
previousAppliedKeys.value = {
|
|
207
|
+
...previousAppliedKeys.value,
|
|
208
|
+
...currentKeys
|
|
209
|
+
};
|
|
210
|
+
} else {
|
|
211
|
+
previousAppliedKeys.value = currentKeys;
|
|
212
|
+
|
|
213
|
+
// Drop cached style when fully idle so future transitions
|
|
214
|
+
// start from a clean state.
|
|
215
|
+
if (!hasCurrentKeys && !shouldProtectInFlightStyles && !isTransitioning) {
|
|
216
|
+
lastResolvedBase.value = null;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (mode === "waiting-first-style") {
|
|
46
220
|
return {
|
|
47
|
-
...
|
|
221
|
+
...unsetPatch,
|
|
48
222
|
opacity: 0
|
|
49
223
|
};
|
|
50
224
|
}
|
|
51
|
-
|
|
52
|
-
|
|
225
|
+
const mergedBase = {
|
|
226
|
+
...unsetPatch,
|
|
227
|
+
...resolvedBase
|
|
228
|
+
};
|
|
229
|
+
let opacity = 1;
|
|
230
|
+
if ("opacity" in mergedBase) {
|
|
231
|
+
opacity = mergedBase.opacity;
|
|
232
|
+
}
|
|
233
|
+
if ("opacity" in mergedBase) {
|
|
234
|
+
return mergedBase;
|
|
53
235
|
}
|
|
54
236
|
return {
|
|
55
|
-
...
|
|
237
|
+
...mergedBase,
|
|
56
238
|
opacity
|
|
57
239
|
};
|
|
58
240
|
});
|
|
241
|
+
const associatedProps = useAnimatedProps(() => {
|
|
242
|
+
"worklet";
|
|
243
|
+
|
|
244
|
+
if (!id) return NO_PROPS;
|
|
245
|
+
const ownSlot = stylesMap.value[id];
|
|
246
|
+
const ancestorSlot = ancestorStylesMaps.find(ancestorMap => ancestorMap.value[id])?.value[id];
|
|
247
|
+
return (ownSlot || ancestorSlot)?.props ?? NO_PROPS;
|
|
248
|
+
});
|
|
59
249
|
return {
|
|
60
|
-
associatedStyles
|
|
250
|
+
associatedStyles,
|
|
251
|
+
associatedProps
|
|
61
252
|
};
|
|
62
253
|
};
|
|
63
254
|
//# sourceMappingURL=use-associated-style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useAnimatedProps","useAnimatedStyle","useSharedValue","EPSILON","NO_PROPS","NO_STYLES","useDescriptorDerivations","useScreenStyles","AnimationStore","BoundStore","TRANSIENT_EMPTY_GRACE_FRAMES","TRANSITION_PROGRESS_COMPLETE","IDENTITY_TRANSFORM","translateX","translateY","scaleX","scaleY","ALWAYS_RESET_STYLE_VALUES","zIndex","elevation","hasAnyKeys","record","_key","collectKeyMeta","keys","hasAny","key","getGroupTagParts","tag","separatorIndex","indexOf","length","group","slice","memberId","allowPreviousTransitionEvidence","groupTagParts","activeGroupMemberId","getGroupActiveId","buildUnsetPatch","previousKeys","currentKeys","shouldDeferUnset","resetTransformOnUnset","unsetPatch","shouldAlwaysUnset","transform","undefined","useAssociatedStyles","id","waitForFirstResolvedStyle","stylesMap","ancestorStylesMaps","previousScreenKey","currentScreenKey","hasConfiguredInterpolator","isAnimating","getRouteAnimation","progress","isClosing","previousAppliedKeys","emptyGraceFrameCount","lastResolvedBase","associatedStyles","ownSlot","value","ancestorSlot","find","ancestorMap","slot","base","style","hasCurrentKeys","hasPreviousKeys","isTransitioning","get","isTransitionProgressInFlight","isTransitionInFlight","canUsePreviousTransitionEvidence","hasActiveLink","hasPendingLink","hasSourceLink","hasDestinationLink","hasPreviousTransitionEvidence","getSnapshot","hasBoundaryPresence","shouldExpectIncomingStyle","shouldProtectInFlightStyles","hasPersistedResolvedStyle","hasResolvedStyle","isTransientEmptyGap","isWithinGapGrace","mode","resolvedBase","opacity","mergedBase","associatedProps","props"],"sourceRoot":"../../../../../src","sources":["shared/hooks/animation/use-associated-style.ts"],"mappings":";;AAAA,SAECA,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,QACR,yBAAyB;AAChC,SAASC,OAAO,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,iBAAiB;AAC9D,SAASC,wBAAwB,QAAQ,oCAAoC;AAC7E,SAASC,eAAe,QAAQ,wCAAwC;AACxE,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,UAAU,QAAQ,qBAAqB;AAShD,MAAMC,4BAA4B,GAAG,CAAC;AACtC,MAAMC,4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nC,OAAO;QAAE,GAAGhD,UAAU;QAAEkD,OAAO,EAAE;MAAE,CAAC;IACrC;IAEA,MAAMC,UAAU,GAAG;MAAE,GAAGnD,UAAU;MAAE,GAAGiD;IAAa,CAAC;IAErD,IAAIC,OAAO,GAAG,CAAC;IAEf,IAAI,SAAS,IAAIC,UAAU,EAAE;MAC5BD,OAAO,GAAGC,UAAU,CAACD,OAAiB;IACvC;IAEA,IAAI,SAAS,IAAIC,UAAU,EAAE;MAC5B,OAAOA,UAAU;IAClB;IAEA,OAAO;MAAE,GAAGA,UAAU;MAAED;IAAQ,CAAC;EAClC,CAAC,CAAC;EAEF,MAAME,eAAe,GAAGhG,gBAAgB,CAAC,MAAM;IAC9C,SAAS;;IAET,IAAI,CAACiD,EAAE,EAAE,OAAO7C,QAAQ;IAExB,MAAM4D,OAAO,GAAGb,SAAS,CAACc,KAAK,CAAChB,EAAE,CAAC;IACnC,MAAMiB,YAAY,GAAGd,kBAAkB,CAACe,IAAI,CAC1CC,WAAW,IAAKA,WAAW,CAACH,KAAK,CAAChB,EAAE,CACtC,CAAC,EAAEgB,KAAK,CAAChB,EAAE,CAAC;IAEZ,OAAO,CAACe,OAAO,IAAIE,YAAY,GAAG+B,KAAK,IAAI7F,QAAQ;EACpD,CAAC,CAAC;EAEF,OAAO;IAAE2D,gBAAgB;IAAEiC;EAAgB,CAAC;AAC7C,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useGestureContext","useScreenGesture","ctx","panGestureRef"],"sourceRoot":"../../../../../src","sources":["shared/hooks/gestures/use-screen-gesture.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,
|
|
1
|
+
{"version":3,"names":["useGestureContext","useScreenGesture","ctx","panGestureRef"],"sourceRoot":"../../../../../src","sources":["shared/hooks/gestures/use-screen-gesture.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,0BAA0B;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAGA,CAAA,KAAM;EACrC,MAAMC,GAAG,GAAGF,iBAAiB,CAAC,CAAC;EAC/B,OAAOE,GAAG,EAAEC,aAAa,IAAI,IAAI;AAClC,CAAC","ignoreList":[]}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { useMemo } from "react";
|
|
18
18
|
import { Gesture } from "react-native-gesture-handler";
|
|
19
19
|
import { useAnimatedScrollHandler } from "react-native-reanimated";
|
|
20
|
-
import { useGestureContext } from "../../providers/gestures
|
|
20
|
+
import { useGestureContext } from "../../providers/gestures";
|
|
21
21
|
import useStableCallback from "../use-stable-callback";
|
|
22
22
|
|
|
23
23
|
/** Walks up context tree to find the screen that owns a specific direction. */
|
|
@@ -79,24 +79,24 @@ export const useScrollRegistry = props => {
|
|
|
79
79
|
"worklet";
|
|
80
80
|
|
|
81
81
|
for (const scrollConfig of scrollConfigs) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
82
|
+
scrollConfig.modify(v => {
|
|
83
|
+
"worklet";
|
|
84
|
+
|
|
85
|
+
if (v) v.isTouched = true;
|
|
86
|
+
return v;
|
|
87
|
+
});
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
const clearIsTouched = () => {
|
|
91
91
|
"worklet";
|
|
92
92
|
|
|
93
93
|
for (const scrollConfig of scrollConfigs) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
94
|
+
scrollConfig.modify(v => {
|
|
95
|
+
"worklet";
|
|
96
|
+
|
|
97
|
+
if (v) v.isTouched = false;
|
|
98
|
+
return v;
|
|
99
|
+
});
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
102
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","Gesture","useAnimatedScrollHandler","useGestureContext","useStableCallback","findGestureOwnerForDirection","context","direction","current","startIsolated","isIsolated","undefined","claimedDirections","ancestorContext","findGestureOwnersForAxis","axis","directions","owners","dir","owner","includes","push","useScrollRegistry","props","scrollDirection","scrollConfigs","map","o","scrollConfig","filter","c","panGestures","panGesture","g","nativeGesture","length","setIsTouched","
|
|
1
|
+
{"version":3,"names":["useMemo","Gesture","useAnimatedScrollHandler","useGestureContext","useStableCallback","findGestureOwnerForDirection","context","direction","current","startIsolated","isIsolated","undefined","claimedDirections","ancestorContext","findGestureOwnersForAxis","axis","directions","owners","dir","owner","includes","push","useScrollRegistry","props","scrollDirection","scrollConfigs","map","o","scrollConfig","filter","c","panGestures","panGesture","g","nativeGesture","length","setIsTouched","modify","v","isTouched","clearIsTouched","gesture","Native","onTouchesDown","onTouchesUp","onTouchesCancelled","requireExternalGestureToFail","scrollHandler","onScroll","event","update","x","contentOffset","y","contentHeight","contentWidth","layoutHeight","layoutWidth","onContentSizeChange","width","height","onLayout","nativeEvent","layout"],"sourceRoot":"../../../../../src","sources":["shared/hooks/gestures/use-scroll-registry.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,OAAO;AAE/B,SAASC,OAAO,QAA0B,8BAA8B;AAExE,SAASC,wBAAwB,QAAQ,yBAAyB;AAClE,SAGCC,iBAAiB,QACX,0BAA0B;AAEjC,OAAOC,iBAAiB,MAAM,wBAAwB;;AAEtD;AACA,SAASC,4BAA4BA,CACpCC,OAA8C,EAC9CC,SAAoB,EACQ;EAC5B,IAAIC,OAAO,GAAGF,OAAO;EACrB,MAAMG,aAAa,GAAGH,OAAO,EAAEI,UAAU;EAEzC,OAAOF,OAAO,EAAE;IACf,IAAIC,aAAa,KAAKE,SAAS,IAAIH,OAAO,CAACE,UAAU,KAAKD,aAAa,EAAE;MACxE;IACD;IAEA,IAAID,OAAO,CAACI,iBAAiB,GAAGL,SAAS,CAAC,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AOtB,CAAC;IACT,CAAC;;IAED;IACA,KAAK,MAAMV,YAAY,IAAIH,aAAa,EAAE;MACzCG,YAAY,CAACS,MAAM,CAACa,MAAM,CAAC;IAC5B;EACD,CACD,CAAC;EAED,MAAMW,QAAQ,GAAGzD,iBAAiB,CAAE6C,KAAwB,IAAK;IAChE1B,KAAK,CAACsC,QAAQ,GAAGZ,KAAK,CAAC;IACvB,IAAIxB,aAAa,CAACU,MAAM,KAAK,CAAC,EAAE;IAEhC,MAAM;MAAEwB,KAAK;MAAEC;IAAO,CAAC,GAAGX,KAAK,CAACa,WAAW,CAACC,MAAM;IAElD,MAAMb,MAAM,GAAIZ,CAAM,IAAK;MAC1B,SAAS;;MACT,IAAIA,CAAC,KAAK,IAAI,EAAE;QACf,OAAO;UACNa,CAAC,EAAE,CAAC;UACJE,CAAC,EAAE,CAAC;UACJC,aAAa,EAAE,CAAC;UAChBC,YAAY,EAAE,CAAC;UACfC,YAAY,EAAEI,MAAM;UACpBH,WAAW,EAAEE,KAAK;UAClBpB,SAAS,EAAE;QACZ,CAAC;MACF;MACAD,CAAC,CAACkB,YAAY,GAAGI,MAAM;MACvBtB,CAAC,CAACmB,WAAW,GAAGE,KAAK;MACrB,OAAOrB,CAAC;IACT,CAAC;;IAED;IACA,KAAK,MAAMV,YAAY,IAAIH,aAAa,EAAE;MACzCG,YAAY,CAACS,MAAM,CAACa,MAAM,CAAC;IAC5B;EACD,CAAC,CAAC;EAEF,OAAO;IACNH,aAAa;IACbW,mBAAmB;IACnBG,QAAQ;IACR3B;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useRef","useSharedValue","useStableCallback","useClosingRouteKeys","keysRef","Set","shared","add","key","keys","current","has","modify","prev","includes","push","remove","delete","index","indexOf","splice","clear","length","ref"],"sourceRoot":"../../../../../src","sources":["shared/hooks/navigation/use-closing-route-keys.
|
|
1
|
+
{"version":3,"names":["useMemo","useRef","useSharedValue","useStableCallback","useClosingRouteKeys","keysRef","Set","shared","add","key","keys","current","has","modify","prev","includes","push","remove","delete","index","indexOf","splice","clear","length","ref"],"sourceRoot":"../../../../../src","sources":["shared/hooks/navigation/use-closing-route-keys.ts"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACvC,SAASC,cAAc,QAAQ,yBAAyB;AACxD,OAAOC,iBAAiB,MAAM,wBAAwB;AAEtD,OAAO,MAAMC,mBAAmB,GAAGA,CAAA,KAAM;EACxC,MAAMC,OAAO,GAAGJ,MAAM,CAAc,IAAIK,GAAG,CAAC,CAAC,CAAC;EAC9C,MAAMC,MAAM,GAAGL,cAAc,CAAW,EAAE,CAAC;EAE3C,MAAMM,GAAG,GAAGL,iBAAiB,CAAEM,GAAW,IAAK;IAC9C,MAAMC,IAAI,GAAGL,OAAO,CAACM,OAAO;IAC5B,IAAID,IAAI,CAACE,GAAG,CAACH,GAAG,CAAC,EAAE;MAClB;IACD;IAEAC,IAAI,CAACF,GAAG,CAACC,GAAG,CAAC;IACbF,MAAM,CAACM,MAAM,CAAEC,IAAI,IAAK;MACvB,SAAS;;MACT,IAAI,CAACA,IAAI,CAACC,QAAQ,CAACN,GAAG,CAAC,EAAE;QACxBK,IAAI,CAACE,IAAI,CAACP,GAAG,CAAC;MACf;MACA,OAAOK,IAAI;IACZ,CAAC,CAAC;EACH,CAAC,CAAC;EAEF,MAAMG,MAAM,GAAGd,iBAAiB,CAAEM,GAAW,IAAK;IACjD,MAAMC,IAAI,GAAGL,OAAO,CAACM,OAAO;IAC5BD,IAAI,CAACQ,MAAM,CAACT,GAAG,CAAC;IAEhBF,MAAM,CAACM,MAAM,CAAEC,IAAI,IAAK;MACvB,SAAS;;MACT,MAAMK,KAAK,GAAGL,IAAI,CAACM,OAAO,CAACX,GAAG,CAAC;MAC/B,IAAIU,KAAK,KAAK,CAAC,CAAC,EAAE;QACjBL,IAAI,CAACO,MAAM,CAACF,KAAK,EAAE,CAAC,CAAC;MACtB;MACA,OAAOL,IAAI;IACZ,CAAC,CAAC;EACH,CAAC,CAAC;EAEF,MAAMQ,KAAK,GAAGnB,iBAAiB,CAAC,MAAM;IACrC,MAAMO,IAAI,GAAGL,OAAO,CAACM,OAAO;IAE5BD,IAAI,CAACY,KAAK,CAAC,CAAC;IACZf,MAAM,CAACM,MAAM,CAAEC,IAAI,IAAK;MACvB,SAAS;;MACTA,IAAI,CAACS,MAAM,GAAG,CAAC;MACf,OAAOT,IAAI;IACZ,CAAC,CAAC;EACH,CAAC,CAAC;EAEF,OAAOd,OAAO,CACb,OAAO;IACNwB,GAAG,EAAEnB,OAAO;IACZE,MAAM;IACNC,GAAG;IACHS,MAAM;IACNK;EACD,CAAC,CAAC,EACF,CAACf,MAAM,EAAEC,GAAG,EAAES,MAAM,EAAEK,KAAK,CAC5B,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StackActions } from "@react-navigation/native";
|
|
4
|
+
import { useCallback } from "react";
|
|
5
|
+
import { useDescriptors } from "../../providers/screen/descriptors";
|
|
6
|
+
export function useNavigationHelpers() {
|
|
7
|
+
const {
|
|
8
|
+
current
|
|
9
|
+
} = useDescriptors();
|
|
10
|
+
const dismissScreen = useCallback(() => {
|
|
11
|
+
const state = current.navigation.getState();
|
|
12
|
+
const routeIndex = state.routes.findIndex(route => route.key === current.route.key);
|
|
13
|
+
const routeStillPresent = routeIndex !== -1;
|
|
14
|
+
if (!routeStillPresent || routeIndex === 0) return false;
|
|
15
|
+
current.navigation.dispatch({
|
|
16
|
+
...StackActions.pop(),
|
|
17
|
+
source: current.route.key,
|
|
18
|
+
target: state.key
|
|
19
|
+
});
|
|
20
|
+
return true;
|
|
21
|
+
}, [current]);
|
|
22
|
+
return {
|
|
23
|
+
dismissScreen
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=use-navigation-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StackActions","useCallback","useDescriptors","useNavigationHelpers","current","dismissScreen","state","navigation","getState","routeIndex","routes","findIndex","route","key","routeStillPresent","dispatch","pop","source","target"],"sourceRoot":"../../../../../src","sources":["shared/hooks/navigation/use-navigation-helpers.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,0BAA0B;AACvD,SAASC,WAAW,QAAQ,OAAO;AACnC,SAASC,cAAc,QAAQ,oCAAoC;AAEnE,OAAO,SAASC,oBAAoBA,CAAA,EAAG;EACtC,MAAM;IAAEC;EAAQ,CAAC,GAAGF,cAAc,CAAC,CAAC;EAEpC,MAAMG,aAAa,GAAGJ,WAAW,CAAC,MAAe;IAChD,MAAMK,KAAK,GAAGF,OAAO,CAACG,UAAU,CAACC,QAAQ,CAAC,CAAC;IAC3C,MAAMC,UAAU,GAAGH,KAAK,CAACI,MAAM,CAACC,SAAS,CACvCC,KAAK,IAAKA,KAAK,CAACC,GAAG,KAAKT,OAAO,CAACQ,KAAK,CAACC,GACxC,CAAC;IACD,MAAMC,iBAAiB,GAAGL,UAAU,KAAK,CAAC,CAAC;IAC3C,IAAI,CAACK,iBAAiB,IAAIL,UAAU,KAAK,CAAC,EAAE,OAAO,KAAK;IAExDL,OAAO,CAACG,UAAU,CAACQ,QAAQ,CAAC;MAC3B,GAAGf,YAAY,CAACgB,GAAG,CAAC,CAAC;MACrBC,MAAM,EAAEb,OAAO,CAACQ,KAAK,CAACC,GAAG;MACzBK,MAAM,EAAEZ,KAAK,CAACO;IACf,CAAC,CAAC;IACF,OAAO,IAAI;EACZ,CAAC,EAAE,CAACT,OAAO,CAAC,CAAC;EAEb,OAAO;IAAEC;EAAc,CAAC;AACzB","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useDerivedValue } from "react-native-reanimated";
|
|
4
|
+
import { useSharedValueState } from "../reanimated/use-shared-value-state";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Returns a JS-focused index derived from optimisticFocusedIndex and clamped to route count.
|
|
8
|
+
* Keeps callers aligned on focus behavior during transitions with closing screens.
|
|
9
|
+
*/
|
|
10
|
+
export function useOptimisticFocusedIndex(optimisticFocusedIndex, routeCount) {
|
|
11
|
+
return useSharedValueState(useDerivedValue(() => {
|
|
12
|
+
const globalIndex = optimisticFocusedIndex.get();
|
|
13
|
+
if (routeCount <= 0) return 0;
|
|
14
|
+
return Math.max(0, Math.min(globalIndex, routeCount - 1));
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=use-optimistic-focused-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useDerivedValue","useSharedValueState","useOptimisticFocusedIndex","optimisticFocusedIndex","routeCount","globalIndex","get","Math","max","min"],"sourceRoot":"../../../../../src","sources":["shared/hooks/navigation/use-optimistic-focused-index.ts"],"mappings":";;AAAA,SAA4BA,eAAe,QAAQ,yBAAyB;AAC5E,SAASC,mBAAmB,QAAQ,sCAAsC;;AAE1E;AACA;AACA;AACA;AACA,OAAO,SAASC,yBAAyBA,CACxCC,sBAA4C,EAC5CC,UAAkB,EACT;EACT,OAAOH,mBAAmB,CACzBD,eAAe,CAAC,MAAM;IACrB,MAAMK,WAAW,GAAGF,sBAAsB,CAACG,GAAG,CAAC,CAAC;IAChD,IAAIF,UAAU,IAAI,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAOG,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,GAAG,CAACJ,WAAW,EAAED,UAAU,GAAG,CAAC,CAAC,CAAC;EAC1D,CAAC,CACF,CAAC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useRef","usePrevious","value","ref","current"],"sourceRoot":"../../../../../src","sources":["shared/hooks/navigation/use-previous.
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","usePrevious","value","ref","current"],"sourceRoot":"../../../../../src","sources":["shared/hooks/navigation/use-previous.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,OAAO,MAAMC,WAAW,GAAOC,KAAQ,IAAe;EACrD,MAAMC,GAAG,GAAGH,MAAM,CAAI,IAAI,CAAC;EAE3BD,SAAS,CAAC,MAAM;IACfI,GAAG,CAACC,OAAO,GAAGF,KAAK;EACpB,CAAC,CAAC;EAEF,OAAOC,GAAG,CAACC,OAAO;AACnB,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useCallback, useMemo } from "react";
|
|
4
|
-
import { useDerivedValue } from "react-native-reanimated";
|
|
5
4
|
import { snapDescriptorToIndex } from "../../animation/snap-to";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { useDescriptors } from "../../providers/screen/descriptors";
|
|
6
|
+
import { useOptimisticFocusedIndex } from "./use-optimistic-focused-index";
|
|
8
7
|
import { useStack } from "./use-stack";
|
|
9
8
|
/**
|
|
10
9
|
* Hook to access screen state information.
|
|
@@ -20,12 +19,9 @@ export function useScreenState() {
|
|
|
20
19
|
} = useStack();
|
|
21
20
|
const {
|
|
22
21
|
current
|
|
23
|
-
} =
|
|
22
|
+
} = useDescriptors();
|
|
24
23
|
const index = useMemo(() => routeKeys.indexOf(current.route.key), [routeKeys, current.route.key]);
|
|
25
|
-
const focusedIndex =
|
|
26
|
-
const globalIndex = optimisticFocusedIndex.get();
|
|
27
|
-
return Math.max(0, Math.min(globalIndex, routeKeys.length - 1));
|
|
28
|
-
}));
|
|
24
|
+
const focusedIndex = useOptimisticFocusedIndex(optimisticFocusedIndex, routeKeys.length);
|
|
29
25
|
const focusedScene = useMemo(() => {
|
|
30
26
|
return scenes[focusedIndex] ?? scenes[scenes.length - 1];
|
|
31
27
|
}, [scenes, focusedIndex]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useMemo","
|
|
1
|
+
{"version":3,"names":["useCallback","useMemo","snapDescriptorToIndex","useDescriptors","useOptimisticFocusedIndex","useStack","useScreenState","routes","scenes","routeKeys","optimisticFocusedIndex","current","index","indexOf","route","key","focusedIndex","length","focusedScene","snapTo","targetIndex","descriptor","options","focusedRoute","meta","navigation"],"sourceRoot":"../../../../../src","sources":["shared/hooks/navigation/use-screen-state.ts"],"mappings":";;AACA,SAASA,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAC5C,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAECC,cAAc,QACR,oCAAoC;AAG3C,SAASC,yBAAyB,QAAQ,gCAAgC;AAC1E,SAAiCC,QAAQ,QAAQ,aAAa;AAgD9D;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAA,EAEA;EAC7B,MAAM;IAAEC,MAAM;IAAEC,MAAM;IAAEC,SAAS;IAAEC;EAAuB,CAAC,GAC1DL,QAAQ,CAAoB,CAAC;EAC9B,MAAM;IAAEM;EAAQ,CAAC,GAAGR,cAAc,CAAiB,CAAC;EAEpD,MAAMS,KAAK,GAAGX,OAAO,CACpB,MAAMQ,SAAS,CAACI,OAAO,CAACF,OAAO,CAACG,KAAK,CAACC,GAAG,CAAC,EAC1C,CAACN,SAAS,EAAEE,OAAO,CAACG,KAAK,CAACC,GAAG,CAC9B,CAAC;EAED,MAAMC,YAAY,GAAGZ,yBAAyB,CAC7CM,sBAAsB,EACtBD,SAAS,CAACQ,MACX,CAAC;EAED,MAAMC,YAAY,GAAGjB,OAAO,CAAC,MAAM;IAClC,OAAOO,MAAM,CAACQ,YAAY,CAAC,IAAIR,MAAM,CAACA,MAAM,CAACS,MAAM,GAAG,CAAC,CAAC;EACzD,CAAC,EAAE,CAACT,MAAM,EAAEQ,YAAY,CAAC,CAAC;EAE1B,MAAMG,MAAM,GAAGnB,WAAW,CACxBoB,WAAmB,IAAK;IACxB,MAA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