react-native-screen-transitions 3.1.0 → 3.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/blank-stack/components/screens.js +2 -2
- package/lib/commonjs/blank-stack/components/screens.js.map +1 -1
- package/lib/commonjs/blank-stack/components/stack-view.js +42 -51
- package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/{shared/components → blank-stack}/controllers/blank-stack-lifecycle.js +17 -8
- package/lib/commonjs/blank-stack/controllers/blank-stack-lifecycle.js.map +1 -0
- package/lib/commonjs/component-stack/components/component-view.js +63 -0
- package/lib/commonjs/component-stack/components/component-view.js.map +1 -0
- package/lib/commonjs/component-stack/components/screens.js +64 -0
- package/lib/commonjs/component-stack/components/screens.js.map +1 -0
- package/lib/commonjs/component-stack/controllers/component-stack-lifecycle.js +82 -0
- package/lib/commonjs/component-stack/controllers/component-stack-lifecycle.js.map +1 -0
- package/lib/commonjs/component-stack/hooks/use-component-navigation-builder.js +321 -0
- package/lib/commonjs/component-stack/hooks/use-component-navigation-builder.js.map +1 -0
- package/lib/commonjs/component-stack/hooks/use-component-navigation.js +28 -0
- package/lib/commonjs/component-stack/hooks/use-component-navigation.js.map +1 -0
- package/lib/commonjs/component-stack/index.js +20 -0
- package/lib/commonjs/component-stack/index.js.map +1 -0
- package/lib/commonjs/component-stack/navigators/create-component-navigator.js +97 -0
- package/lib/commonjs/component-stack/navigators/create-component-navigator.js.map +1 -0
- package/lib/commonjs/component-stack/types.js.map +1 -0
- package/lib/commonjs/{shared/components → native-stack}/controllers/native-stack-lifecycle.js +18 -9
- package/lib/commonjs/native-stack/controllers/native-stack-lifecycle.js.map +1 -0
- package/lib/commonjs/native-stack/views/NativeStackView.native.js +120 -121
- package/lib/commonjs/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js +64 -0
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/index.js +15 -0
- package/lib/commonjs/shared/components/overlay/index.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/variations/container-overlay.js +99 -0
- package/lib/commonjs/shared/components/overlay/variations/container-overlay.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +51 -0
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js +124 -0
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js +47 -0
- package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js.map +1 -0
- package/lib/commonjs/shared/components/root-transition-aware.js +2 -2
- package/lib/commonjs/shared/components/root-transition-aware.js.map +1 -1
- package/lib/commonjs/shared/constants.js +2 -31
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js +2 -2
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/commonjs/shared/hooks/animation/use-high-refresh-rate.js +30 -0
- package/lib/commonjs/shared/hooks/animation/use-high-refresh-rate.js.map +1 -0
- package/lib/commonjs/shared/hooks/animation/use-screen-animation.js +16 -9
- package/lib/commonjs/shared/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/shared/hooks/gestures/use-build-gestures.js +1 -1
- package/lib/commonjs/shared/hooks/gestures/use-build-gestures.js.map +1 -1
- package/lib/commonjs/shared/hooks/gestures/use-scroll-registry.js.map +1 -1
- package/lib/commonjs/{blank-stack/utils/with-stack-navigation/hooks → shared/hooks/navigation}/use-closing-route-keys.js +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-closing-route-keys.js.map +1 -0
- package/lib/commonjs/shared/hooks/navigation/use-previous.js.map +1 -0
- package/lib/commonjs/shared/hooks/navigation/use-stack.js +37 -0
- package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -0
- package/lib/commonjs/shared/providers/gestures.provider.js +1 -1
- package/lib/commonjs/shared/providers/gestures.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/register-bounds.provider.js +11 -5
- package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/{keys.provider.js → screen/keys.provider.js} +12 -0
- package/lib/commonjs/shared/providers/screen/keys.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/{screen-transition.provider.js → screen/screen-composer.js} +7 -7
- package/lib/commonjs/shared/providers/screen/screen-composer.js.map +1 -0
- package/lib/commonjs/shared/providers/{transition-styles.provider.js → screen/styles.provider.js} +12 -13
- package/lib/commonjs/shared/providers/screen/styles.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/core.provider.js +61 -0
- package/lib/commonjs/shared/providers/stack/core.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/direct.provider.js +158 -0
- package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -0
- package/lib/commonjs/{blank-stack/utils/with-stack-navigation/helpers/calculate-active-screens-limit.js → shared/providers/stack/helpers/active-screens-limit.js} +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/active-screens-limit.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/helpers/use-local-routes.js +93 -0
- package/lib/commonjs/shared/providers/stack/helpers/use-local-routes.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/managed.provider.js +155 -0
- package/lib/commonjs/shared/providers/stack/managed.provider.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds.store.js.map +1 -1
- package/lib/commonjs/shared/types/index.js +19 -0
- package/lib/commonjs/shared/types/index.js.map +1 -0
- package/lib/commonjs/shared/types/overlay.types.js +6 -0
- package/lib/commonjs/shared/types/overlay.types.js.map +1 -0
- package/lib/commonjs/shared/types/screen.types.js +6 -0
- package/lib/commonjs/shared/types/screen.types.js.map +1 -0
- package/lib/commonjs/shared/types/{core.types.js → stack.types.js} +1 -1
- package/lib/commonjs/shared/types/{core.types.js.map → stack.types.js.map} +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/create-provider.js +16 -13
- package/lib/commonjs/shared/utils/create-provider.js.map +1 -1
- package/lib/commonjs/shared/utils/gesture/check-gesture-activation.js.map +1 -1
- package/lib/commonjs/shared/utils/navigation/align-routes-with-latest.js +51 -0
- package/lib/commonjs/shared/utils/navigation/align-routes-with-latest.js.map +1 -0
- package/lib/commonjs/shared/utils/navigation/are-descriptors-equal.js.map +1 -0
- package/lib/commonjs/shared/utils/navigation/compose-descriptors.js.map +1 -0
- package/lib/commonjs/shared/utils/navigation/have-same-route-keys.js.map +1 -0
- package/lib/commonjs/shared/utils/navigation/routes-are-identical.js.map +1 -0
- package/lib/commonjs/shared/utils/navigation/sync-routes-with-removed.js +95 -0
- package/lib/commonjs/shared/utils/navigation/sync-routes-with-removed.js.map +1 -0
- package/lib/commonjs/shared/utils/read-shared-value.js +17 -0
- package/lib/commonjs/shared/utils/read-shared-value.js.map +1 -0
- package/lib/commonjs/shared/utils/reset-stores-for-screen.js +2 -1
- package/lib/commonjs/shared/utils/reset-stores-for-screen.js.map +1 -1
- package/lib/module/blank-stack/components/screens.js +2 -2
- package/lib/module/blank-stack/components/screens.js.map +1 -1
- package/lib/module/blank-stack/components/stack-view.js +41 -50
- package/lib/module/blank-stack/components/stack-view.js.map +1 -1
- package/lib/module/{shared/components → blank-stack}/controllers/blank-stack-lifecycle.js +18 -9
- package/lib/module/blank-stack/controllers/blank-stack-lifecycle.js.map +1 -0
- package/lib/module/component-stack/components/component-view.js +58 -0
- package/lib/module/component-stack/components/component-view.js.map +1 -0
- package/lib/module/component-stack/components/screens.js +58 -0
- package/lib/module/component-stack/components/screens.js.map +1 -0
- package/lib/module/component-stack/controllers/component-stack-lifecycle.js +76 -0
- package/lib/module/component-stack/controllers/component-stack-lifecycle.js.map +1 -0
- package/lib/module/component-stack/hooks/use-component-navigation-builder.js +316 -0
- package/lib/module/component-stack/hooks/use-component-navigation-builder.js.map +1 -0
- package/lib/module/component-stack/hooks/use-component-navigation.js +25 -0
- package/lib/module/component-stack/hooks/use-component-navigation.js.map +1 -0
- package/lib/module/component-stack/index.js +5 -0
- package/lib/module/component-stack/index.js.map +1 -0
- package/lib/module/component-stack/navigators/create-component-navigator.js +91 -0
- package/lib/module/component-stack/navigators/create-component-navigator.js.map +1 -0
- package/lib/module/component-stack/types.js.map +1 -0
- package/lib/module/{shared/components → native-stack}/controllers/native-stack-lifecycle.js +18 -9
- package/lib/module/native-stack/controllers/native-stack-lifecycle.js.map +1 -0
- package/lib/module/native-stack/views/NativeStackView.native.js +121 -122
- package/lib/module/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js +59 -0
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js.map +1 -0
- package/lib/module/shared/components/overlay/index.js +11 -0
- package/lib/module/shared/components/overlay/index.js.map +1 -0
- package/lib/module/shared/components/overlay/variations/container-overlay.js +97 -0
- package/lib/module/shared/components/overlay/variations/container-overlay.js.map +1 -0
- package/lib/module/shared/components/overlay/variations/float-overlay.js +48 -0
- package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -0
- package/lib/module/shared/components/overlay/variations/overlay-host.js +120 -0
- package/lib/module/shared/components/overlay/variations/overlay-host.js.map +1 -0
- package/lib/module/shared/components/overlay/variations/screen-overlay.js +44 -0
- package/lib/module/shared/components/overlay/variations/screen-overlay.js.map +1 -0
- package/lib/module/shared/components/root-transition-aware.js +2 -2
- package/lib/module/shared/components/root-transition-aware.js.map +1 -1
- package/lib/module/shared/constants.js +0 -29
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/hooks/animation/use-associated-style.js +2 -2
- package/lib/module/shared/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/module/shared/hooks/animation/use-high-refresh-rate.js +24 -0
- package/lib/module/shared/hooks/animation/use-high-refresh-rate.js.map +1 -0
- package/lib/module/shared/hooks/animation/use-screen-animation.js +16 -9
- package/lib/module/shared/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/module/shared/hooks/gestures/use-build-gestures.js +1 -1
- package/lib/module/shared/hooks/gestures/use-build-gestures.js.map +1 -1
- package/lib/module/shared/hooks/gestures/use-scroll-registry.js.map +1 -1
- package/lib/module/{blank-stack/utils/with-stack-navigation/hooks → shared/hooks/navigation}/use-closing-route-keys.js +1 -1
- package/lib/module/shared/hooks/navigation/use-closing-route-keys.js.map +1 -0
- package/lib/module/shared/hooks/navigation/use-previous.js.map +1 -0
- package/lib/module/shared/hooks/navigation/use-stack.js +33 -0
- package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -0
- package/lib/module/shared/providers/gestures.provider.js +1 -1
- package/lib/module/shared/providers/gestures.provider.js.map +1 -1
- package/lib/module/shared/providers/register-bounds.provider.js +11 -5
- package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/module/shared/providers/{keys.provider.js → screen/keys.provider.js} +12 -0
- package/lib/module/shared/providers/screen/keys.provider.js.map +1 -0
- package/lib/module/shared/providers/{screen-transition.provider.js → screen/screen-composer.js} +6 -6
- package/lib/module/shared/providers/screen/screen-composer.js.map +1 -0
- package/lib/module/shared/providers/{transition-styles.provider.js → screen/styles.provider.js} +10 -10
- package/lib/module/shared/providers/screen/styles.provider.js.map +1 -0
- package/lib/module/shared/providers/stack/core.provider.js +55 -0
- package/lib/module/shared/providers/stack/core.provider.js.map +1 -0
- package/lib/module/shared/providers/stack/direct.provider.js +153 -0
- package/lib/module/shared/providers/stack/direct.provider.js.map +1 -0
- package/lib/module/{blank-stack/utils/with-stack-navigation/helpers/calculate-active-screens-limit.js → shared/providers/stack/helpers/active-screens-limit.js} +1 -1
- package/lib/module/shared/providers/stack/helpers/active-screens-limit.js.map +1 -0
- package/lib/module/shared/providers/stack/helpers/use-local-routes.js +87 -0
- package/lib/module/shared/providers/stack/helpers/use-local-routes.js.map +1 -0
- package/lib/module/shared/providers/stack/managed.provider.js +150 -0
- package/lib/module/shared/providers/stack/managed.provider.js.map +1 -0
- package/lib/module/shared/stores/bounds.store.js.map +1 -1
- package/lib/module/shared/types/index.js +4 -0
- package/lib/module/shared/types/index.js.map +1 -0
- package/lib/module/shared/types/overlay.types.js +4 -0
- package/lib/module/shared/types/overlay.types.js.map +1 -0
- package/lib/module/shared/types/screen.types.js +4 -0
- package/lib/module/shared/types/screen.types.js.map +1 -0
- package/lib/module/shared/types/stack.types.js +4 -0
- package/lib/{commonjs/shared/types/utils.types.js.map → module/shared/types/stack.types.js.map} +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/create-provider.js +16 -13
- package/lib/module/shared/utils/create-provider.js.map +1 -1
- package/lib/module/shared/utils/gesture/check-gesture-activation.js.map +1 -1
- package/lib/module/shared/utils/navigation/align-routes-with-latest.js +46 -0
- package/lib/module/shared/utils/navigation/align-routes-with-latest.js.map +1 -0
- package/lib/module/shared/utils/navigation/are-descriptors-equal.js.map +1 -0
- package/lib/module/shared/utils/navigation/compose-descriptors.js.map +1 -0
- package/lib/module/shared/utils/navigation/have-same-route-keys.js.map +1 -0
- package/lib/module/shared/utils/navigation/routes-are-identical.js.map +1 -0
- package/lib/module/shared/utils/navigation/sync-routes-with-removed.js +90 -0
- package/lib/module/shared/utils/navigation/sync-routes-with-removed.js.map +1 -0
- package/lib/module/shared/utils/read-shared-value.js +14 -0
- package/lib/module/shared/utils/read-shared-value.js.map +1 -0
- package/lib/module/shared/utils/reset-stores-for-screen.js +2 -2
- package/lib/module/shared/utils/reset-stores-for-screen.js.map +1 -1
- package/lib/typescript/blank-stack/components/stack-view.d.ts +2 -1
- package/lib/typescript/blank-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/{shared/components → blank-stack}/controllers/blank-stack-lifecycle.d.ts +2 -1
- package/lib/typescript/blank-stack/controllers/blank-stack-lifecycle.d.ts.map +1 -0
- package/lib/typescript/blank-stack/types.d.ts +9 -50
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/component-stack/components/component-view.d.ts +4 -0
- package/lib/typescript/component-stack/components/component-view.d.ts.map +1 -0
- package/lib/typescript/component-stack/components/screens.d.ts +9 -0
- package/lib/typescript/component-stack/components/screens.d.ts.map +1 -0
- package/lib/typescript/component-stack/controllers/component-stack-lifecycle.d.ts +10 -0
- package/lib/typescript/component-stack/controllers/component-stack-lifecycle.d.ts.map +1 -0
- package/lib/typescript/component-stack/hooks/use-component-navigation-builder.d.ts +19 -0
- package/lib/typescript/component-stack/hooks/use-component-navigation-builder.d.ts.map +1 -0
- package/lib/typescript/component-stack/hooks/use-component-navigation.d.ts +19 -0
- package/lib/typescript/component-stack/hooks/use-component-navigation.d.ts.map +1 -0
- package/lib/typescript/component-stack/index.d.ts +4 -0
- package/lib/typescript/component-stack/index.d.ts.map +1 -0
- package/lib/typescript/component-stack/navigators/create-component-navigator.d.ts +35 -0
- package/lib/typescript/component-stack/navigators/create-component-navigator.d.ts.map +1 -0
- package/lib/typescript/component-stack/types.d.ts +206 -0
- package/lib/typescript/component-stack/types.d.ts.map +1 -0
- package/lib/typescript/native-stack/controllers/native-stack-lifecycle.d.ts.map +1 -0
- package/lib/typescript/native-stack/index.d.ts +1 -1
- package/lib/typescript/native-stack/index.d.ts.map +1 -1
- package/lib/typescript/native-stack/types.d.ts +9 -6
- package/lib/typescript/native-stack/types.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.native.d.ts +2 -10
- package/lib/typescript/native-stack/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts +20 -0
- package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/index.d.ts +9 -0
- package/lib/typescript/shared/components/overlay/index.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/variations/container-overlay.d.ts +8 -0
- package/lib/typescript/shared/components/overlay/variations/container-overlay.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts +6 -0
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +12 -0
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts +6 -0
- package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts.map +1 -0
- package/lib/typescript/shared/configs/index.d.ts.map +1 -1
- package/lib/typescript/shared/configs/presets.d.ts +1 -1
- package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +1 -16
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/animation/use-high-refresh-rate.d.ts +6 -0
- package/lib/typescript/shared/hooks/animation/use-high-refresh-rate.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/animation/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/gestures/use-build-gestures.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 -0
- package/lib/typescript/shared/hooks/navigation/use-previous.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +71 -0
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -0
- package/lib/typescript/shared/index.d.ts +31 -33
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures.provider.d.ts +4 -2
- package/lib/typescript/shared/providers/gestures.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/keys.provider.d.ts +29 -0
- package/lib/typescript/shared/providers/screen/keys.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts +13 -0
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles.provider.d.ts +13 -0
- package/lib/typescript/shared/providers/screen/styles.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/core.provider.d.ts +11 -0
- package/lib/typescript/shared/providers/stack/core.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts +34 -0
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/helpers/active-screens-limit.d.ts +9 -0
- package/lib/typescript/shared/providers/stack/helpers/active-screens-limit.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/helpers/use-local-routes.d.ts +19 -0
- package/lib/typescript/shared/providers/stack/helpers/use-local-routes.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts +39 -0
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts.map +1 -0
- package/lib/typescript/shared/stores/animation.store.d.ts +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/gesture.store.d.ts +2 -2
- package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +3 -3
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/gesture.types.d.ts +0 -1
- package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +8 -0
- package/lib/typescript/shared/types/index.d.ts.map +1 -0
- package/lib/typescript/shared/types/overlay.types.d.ts +50 -0
- package/lib/typescript/shared/types/overlay.types.d.ts.map +1 -0
- package/lib/typescript/shared/types/{core.types.d.ts → screen.types.d.ts} +31 -6
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -0
- package/lib/typescript/shared/types/stack.types.d.ts +52 -0
- package/lib/typescript/shared/types/stack.types.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/style-composers.d.ts +2 -1
- package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles.d.ts +1 -2
- package/lib/typescript/shared/utils/bounds/helpers/styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/index.d.ts +1 -9
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/builder.d.ts +9 -8
- package/lib/typescript/shared/utils/bounds/types/builder.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/geometry.d.ts +2 -1
- package/lib/typescript/shared/utils/bounds/types/geometry.d.ts.map +1 -1
- package/lib/typescript/shared/utils/create-provider.d.ts.map +1 -1
- package/lib/typescript/shared/utils/gesture/check-gesture-activation.d.ts +1 -1
- package/lib/typescript/shared/utils/gesture/check-gesture-activation.d.ts.map +1 -1
- package/lib/typescript/shared/utils/navigation/align-routes-with-latest.d.ts +13 -0
- package/lib/typescript/shared/utils/navigation/align-routes-with-latest.d.ts.map +1 -0
- package/lib/typescript/shared/utils/navigation/are-descriptors-equal.d.ts +2 -0
- package/lib/typescript/shared/utils/navigation/are-descriptors-equal.d.ts.map +1 -0
- package/lib/typescript/shared/utils/navigation/compose-descriptors.d.ts +6 -0
- package/lib/typescript/shared/utils/navigation/compose-descriptors.d.ts.map +1 -0
- package/lib/typescript/shared/utils/navigation/have-same-route-keys.d.ts +6 -0
- package/lib/typescript/shared/utils/navigation/have-same-route-keys.d.ts.map +1 -0
- package/lib/typescript/shared/utils/navigation/routes-are-identical.d.ts +6 -0
- package/lib/typescript/shared/utils/navigation/routes-are-identical.d.ts.map +1 -0
- package/lib/typescript/shared/utils/navigation/sync-routes-with-removed.d.ts +21 -0
- package/lib/typescript/shared/utils/navigation/sync-routes-with-removed.d.ts.map +1 -0
- package/lib/typescript/shared/utils/read-shared-value.d.ts +7 -0
- package/lib/typescript/shared/utils/read-shared-value.d.ts.map +1 -0
- package/lib/typescript/shared/utils/reset-stores-for-screen.d.ts +4 -3
- package/lib/typescript/shared/utils/reset-stores-for-screen.d.ts.map +1 -1
- package/package.json +7 -2
- package/src/blank-stack/components/screens.tsx +2 -2
- package/src/blank-stack/components/stack-view.tsx +59 -67
- package/src/{shared/components → blank-stack}/controllers/blank-stack-lifecycle.tsx +18 -11
- package/src/blank-stack/types.ts +10 -62
- package/src/component-stack/components/component-view.tsx +72 -0
- package/src/component-stack/components/screens.tsx +86 -0
- package/src/component-stack/controllers/component-stack-lifecycle.tsx +80 -0
- package/src/component-stack/hooks/use-component-navigation-builder.tsx +388 -0
- package/src/component-stack/hooks/use-component-navigation.tsx +22 -0
- package/src/component-stack/index.ts +16 -0
- package/src/component-stack/navigators/create-component-navigator.tsx +104 -0
- package/src/component-stack/types.ts +209 -0
- package/src/{shared/components → native-stack}/controllers/native-stack-lifecycle.tsx +18 -11
- package/src/native-stack/index.ts +1 -0
- package/src/native-stack/types.ts +11 -7
- package/src/native-stack/views/NativeStackView.native.tsx +42 -69
- package/src/shared/__tests__/sync-routes-with-removed.test.ts +283 -0
- package/src/shared/components/create-transition-aware-component.tsx +5 -6
- package/src/shared/components/overlay/helpers/get-active-overlay.ts +64 -0
- package/src/shared/components/overlay/index.ts +9 -0
- package/src/shared/components/overlay/variations/container-overlay.tsx +98 -0
- package/src/shared/components/overlay/variations/float-overlay.tsx +44 -0
- package/src/shared/components/overlay/variations/overlay-host.tsx +148 -0
- package/src/shared/components/overlay/variations/screen-overlay.tsx +51 -0
- package/src/shared/components/root-transition-aware.tsx +2 -2
- package/src/shared/configs/presets.ts +1 -1
- package/src/shared/constants.ts +1 -33
- package/src/shared/hooks/animation/use-associated-style.tsx +2 -2
- package/src/shared/hooks/animation/use-high-refresh-rate.tsx +28 -0
- package/src/shared/hooks/animation/use-screen-animation.tsx +19 -15
- package/src/shared/hooks/gestures/use-build-gestures.tsx +1 -2
- package/src/shared/hooks/gestures/use-scroll-registry.tsx +3 -4
- package/src/{blank-stack/utils/with-stack-navigation/hooks → shared/hooks/navigation}/use-closing-route-keys.tsx +1 -1
- package/src/shared/hooks/navigation/use-stack.tsx +100 -0
- package/src/shared/index.ts +7 -3
- package/src/shared/providers/gestures.provider.tsx +6 -2
- package/src/shared/providers/register-bounds.provider.tsx +13 -6
- package/src/shared/providers/screen/keys.provider.tsx +72 -0
- package/src/shared/providers/screen/screen-composer.tsx +38 -0
- package/src/shared/providers/{transition-styles.provider.tsx → screen/styles.provider.tsx} +14 -13
- package/src/shared/providers/stack/core.provider.tsx +64 -0
- package/src/shared/providers/stack/direct.provider.tsx +228 -0
- package/src/{blank-stack/utils/with-stack-navigation/helpers/calculate-active-screens-limit.ts → shared/providers/stack/helpers/active-screens-limit.ts} +10 -4
- package/src/shared/providers/stack/helpers/use-local-routes.tsx +133 -0
- package/src/shared/providers/stack/managed.provider.tsx +226 -0
- package/src/shared/stores/animation.store.ts +1 -1
- package/src/shared/stores/bounds.store.ts +4 -5
- package/src/shared/stores/gesture.store.ts +2 -2
- package/src/shared/types/animation.types.ts +3 -3
- package/src/shared/types/gesture.types.ts +0 -2
- package/src/shared/types/index.ts +47 -0
- package/src/shared/types/overlay.types.ts +62 -0
- package/src/shared/types/{core.types.ts → screen.types.ts} +40 -7
- package/src/shared/types/stack.types.ts +59 -0
- package/src/shared/utils/bounds/helpers/geometry.ts +1 -1
- package/src/shared/utils/bounds/helpers/style-composers.ts +1 -1
- package/src/shared/utils/bounds/helpers/styles.ts +1 -2
- package/src/shared/utils/bounds/index.ts +1 -9
- package/src/shared/utils/bounds/types/builder.ts +8 -8
- package/src/shared/utils/bounds/types/geometry.ts +1 -1
- package/src/shared/utils/create-provider.tsx +14 -16
- package/src/shared/utils/gesture/check-gesture-activation.ts +1 -1
- package/src/shared/utils/navigation/align-routes-with-latest.ts +68 -0
- package/src/{blank-stack/utils/with-stack-navigation/helpers → shared/utils/navigation}/are-descriptors-equal.ts +5 -5
- package/src/shared/utils/navigation/compose-descriptors.ts +21 -0
- package/src/{blank-stack/utils/with-stack-navigation/helpers → shared/utils/navigation}/have-same-route-keys.ts +6 -4
- package/src/{blank-stack/utils/with-stack-navigation/helpers → shared/utils/navigation}/routes-are-identical.ts +6 -4
- package/src/shared/utils/navigation/sync-routes-with-removed.ts +132 -0
- package/src/shared/utils/read-shared-value.ts +15 -0
- package/src/shared/utils/reset-stores-for-screen.ts +4 -3
- package/lib/commonjs/blank-stack/components/overlay.js +0 -156
- package/lib/commonjs/blank-stack/components/overlay.js.map +0 -1
- package/lib/commonjs/blank-stack/hooks/use-overlay-animation.js +0 -72
- package/lib/commonjs/blank-stack/hooks/use-overlay-animation.js.map +0 -1
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/helpers/are-descriptors-equal.js.map +0 -1
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/helpers/calculate-active-screens-limit.js.map +0 -1
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/helpers/compose-descriptors.js.map +0 -1
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/helpers/have-same-route-keys.js.map +0 -1
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/helpers/routes-are-identical.js.map +0 -1
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/hooks/use-closing-route-keys.js.map +0 -1
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/hooks/use-previous.js.map +0 -1
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/hooks/use-stack-navigation-state.js +0 -196
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/hooks/use-stack-navigation-state.js.map +0 -1
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/index.js +0 -61
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/index.js.map +0 -1
- package/lib/commonjs/blank-stack/utils/with-stack-navigation/types.js.map +0 -1
- package/lib/commonjs/native-stack/views/FooterComponent.js +0 -17
- package/lib/commonjs/native-stack/views/FooterComponent.js.map +0 -1
- package/lib/commonjs/shared/components/controllers/blank-stack-lifecycle.js.map +0 -1
- package/lib/commonjs/shared/components/controllers/native-stack-lifecycle.js.map +0 -1
- package/lib/commonjs/shared/providers/flags.provider.js +0 -25
- package/lib/commonjs/shared/providers/flags.provider.js.map +0 -1
- package/lib/commonjs/shared/providers/keys.provider.js.map +0 -1
- package/lib/commonjs/shared/providers/routes.provider.js +0 -48
- package/lib/commonjs/shared/providers/routes.provider.js.map +0 -1
- package/lib/commonjs/shared/providers/screen-transition.provider.js.map +0 -1
- package/lib/commonjs/shared/providers/transition-styles.provider.js.map +0 -1
- package/lib/commonjs/shared/types/utils.types.js +0 -2
- package/lib/commonjs/shared/utils/animation/compute-stack-progress.js +0 -20
- package/lib/commonjs/shared/utils/animation/compute-stack-progress.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/constants.js +0 -42
- package/lib/commonjs/shared/utils/bounds/constants.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/is-bounds-equal.js +0 -19
- package/lib/commonjs/shared/utils/bounds/helpers/is-bounds-equal.js.map +0 -1
- package/lib/commonjs/shared/utils/gesture/apply-offset-rules.js +0 -224
- package/lib/commonjs/shared/utils/gesture/apply-offset-rules.js.map +0 -1
- package/lib/commonjs/shared/utils/reanimated/version.js +0 -12
- package/lib/commonjs/shared/utils/reanimated/version.js.map +0 -1
- package/lib/module/blank-stack/components/overlay.js +0 -152
- package/lib/module/blank-stack/components/overlay.js.map +0 -1
- package/lib/module/blank-stack/hooks/use-overlay-animation.js +0 -68
- package/lib/module/blank-stack/hooks/use-overlay-animation.js.map +0 -1
- package/lib/module/blank-stack/utils/with-stack-navigation/helpers/are-descriptors-equal.js.map +0 -1
- package/lib/module/blank-stack/utils/with-stack-navigation/helpers/calculate-active-screens-limit.js.map +0 -1
- package/lib/module/blank-stack/utils/with-stack-navigation/helpers/compose-descriptors.js.map +0 -1
- package/lib/module/blank-stack/utils/with-stack-navigation/helpers/have-same-route-keys.js.map +0 -1
- package/lib/module/blank-stack/utils/with-stack-navigation/helpers/routes-are-identical.js.map +0 -1
- package/lib/module/blank-stack/utils/with-stack-navigation/hooks/use-closing-route-keys.js.map +0 -1
- package/lib/module/blank-stack/utils/with-stack-navigation/hooks/use-previous.js.map +0 -1
- package/lib/module/blank-stack/utils/with-stack-navigation/hooks/use-stack-navigation-state.js +0 -190
- package/lib/module/blank-stack/utils/with-stack-navigation/hooks/use-stack-navigation-state.js.map +0 -1
- package/lib/module/blank-stack/utils/with-stack-navigation/index.js +0 -55
- package/lib/module/blank-stack/utils/with-stack-navigation/index.js.map +0 -1
- package/lib/module/blank-stack/utils/with-stack-navigation/types.js.map +0 -1
- package/lib/module/native-stack/views/FooterComponent.js +0 -13
- package/lib/module/native-stack/views/FooterComponent.js.map +0 -1
- package/lib/module/shared/components/controllers/blank-stack-lifecycle.js.map +0 -1
- package/lib/module/shared/components/controllers/native-stack-lifecycle.js.map +0 -1
- package/lib/module/shared/providers/flags.provider.js +0 -19
- package/lib/module/shared/providers/flags.provider.js.map +0 -1
- package/lib/module/shared/providers/keys.provider.js.map +0 -1
- package/lib/module/shared/providers/routes.provider.js +0 -42
- package/lib/module/shared/providers/routes.provider.js.map +0 -1
- package/lib/module/shared/providers/screen-transition.provider.js.map +0 -1
- package/lib/module/shared/providers/transition-styles.provider.js.map +0 -1
- package/lib/module/shared/types/core.types.js +0 -4
- package/lib/module/shared/types/core.types.js.map +0 -1
- package/lib/module/shared/types/utils.types.js +0 -2
- package/lib/module/shared/types/utils.types.js.map +0 -1
- package/lib/module/shared/utils/animation/compute-stack-progress.js +0 -15
- package/lib/module/shared/utils/animation/compute-stack-progress.js.map +0 -1
- package/lib/module/shared/utils/bounds/constants.js +0 -37
- package/lib/module/shared/utils/bounds/constants.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/is-bounds-equal.js +0 -14
- package/lib/module/shared/utils/bounds/helpers/is-bounds-equal.js.map +0 -1
- package/lib/module/shared/utils/gesture/apply-offset-rules.js +0 -219
- package/lib/module/shared/utils/gesture/apply-offset-rules.js.map +0 -1
- package/lib/module/shared/utils/reanimated/version.js +0 -7
- package/lib/module/shared/utils/reanimated/version.js.map +0 -1
- package/lib/typescript/blank-stack/components/overlay.d.ts +0 -5
- package/lib/typescript/blank-stack/components/overlay.d.ts.map +0 -1
- package/lib/typescript/blank-stack/hooks/use-overlay-animation.d.ts +0 -12
- package/lib/typescript/blank-stack/hooks/use-overlay-animation.d.ts.map +0 -1
- package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/are-descriptors-equal.d.ts +0 -3
- package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/are-descriptors-equal.d.ts.map +0 -1
- package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/calculate-active-screens-limit.d.ts +0 -4
- package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/calculate-active-screens-limit.d.ts.map +0 -1
- package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/compose-descriptors.d.ts +0 -4
- package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/compose-descriptors.d.ts.map +0 -1
- package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/have-same-route-keys.d.ts +0 -3
- package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/have-same-route-keys.d.ts.map +0 -1
- package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/routes-are-identical.d.ts +0 -3
- package/lib/typescript/blank-stack/utils/with-stack-navigation/helpers/routes-are-identical.d.ts.map +0 -1
- package/lib/typescript/blank-stack/utils/with-stack-navigation/hooks/use-closing-route-keys.d.ts.map +0 -1
- package/lib/typescript/blank-stack/utils/with-stack-navigation/hooks/use-previous.d.ts.map +0 -1
- package/lib/typescript/blank-stack/utils/with-stack-navigation/hooks/use-stack-navigation-state.d.ts +0 -20
- package/lib/typescript/blank-stack/utils/with-stack-navigation/hooks/use-stack-navigation-state.d.ts.map +0 -1
- package/lib/typescript/blank-stack/utils/with-stack-navigation/index.d.ts +0 -4
- package/lib/typescript/blank-stack/utils/with-stack-navigation/index.d.ts.map +0 -1
- package/lib/typescript/blank-stack/utils/with-stack-navigation/types.d.ts +0 -22
- package/lib/typescript/blank-stack/utils/with-stack-navigation/types.d.ts.map +0 -1
- package/lib/typescript/native-stack/views/FooterComponent.d.ts +0 -7
- package/lib/typescript/native-stack/views/FooterComponent.d.ts.map +0 -1
- package/lib/typescript/shared/components/controllers/blank-stack-lifecycle.d.ts.map +0 -1
- package/lib/typescript/shared/components/controllers/native-stack-lifecycle.d.ts.map +0 -1
- package/lib/typescript/shared/providers/flags.provider.d.ts +0 -10
- package/lib/typescript/shared/providers/flags.provider.d.ts.map +0 -1
- package/lib/typescript/shared/providers/keys.provider.d.ts +0 -18
- package/lib/typescript/shared/providers/keys.provider.d.ts.map +0 -1
- package/lib/typescript/shared/providers/routes.provider.d.ts +0 -19
- package/lib/typescript/shared/providers/routes.provider.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen-transition.provider.d.ts +0 -14
- package/lib/typescript/shared/providers/screen-transition.provider.d.ts.map +0 -1
- package/lib/typescript/shared/providers/transition-styles.provider.d.ts +0 -14
- package/lib/typescript/shared/providers/transition-styles.provider.d.ts.map +0 -1
- package/lib/typescript/shared/types/core.types.d.ts.map +0 -1
- package/lib/typescript/shared/types/utils.types.d.ts +0 -5
- package/lib/typescript/shared/types/utils.types.d.ts.map +0 -1
- package/lib/typescript/shared/utils/animation/compute-stack-progress.d.ts +0 -3
- package/lib/typescript/shared/utils/animation/compute-stack-progress.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/constants.d.ts +0 -7
- package/lib/typescript/shared/utils/bounds/constants.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/is-bounds-equal.d.ts +0 -7
- package/lib/typescript/shared/utils/bounds/helpers/is-bounds-equal.d.ts.map +0 -1
- package/lib/typescript/shared/utils/gesture/apply-offset-rules.d.ts +0 -38
- package/lib/typescript/shared/utils/gesture/apply-offset-rules.d.ts.map +0 -1
- package/lib/typescript/shared/utils/reanimated/version.d.ts +0 -2
- package/lib/typescript/shared/utils/reanimated/version.d.ts.map +0 -1
- package/src/blank-stack/components/overlay.tsx +0 -169
- package/src/blank-stack/hooks/use-overlay-animation.tsx +0 -86
- package/src/blank-stack/utils/with-stack-navigation/helpers/compose-descriptors.ts +0 -17
- package/src/blank-stack/utils/with-stack-navigation/hooks/use-stack-navigation-state.tsx +0 -267
- package/src/blank-stack/utils/with-stack-navigation/index.tsx +0 -74
- package/src/blank-stack/utils/with-stack-navigation/types.ts +0 -35
- package/src/native-stack/views/FooterComponent.tsx +0 -10
- package/src/shared/providers/flags.provider.tsx +0 -21
- package/src/shared/providers/keys.provider.tsx +0 -57
- package/src/shared/providers/routes.provider.tsx +0 -54
- package/src/shared/providers/screen-transition.provider.tsx +0 -41
- package/src/shared/types/utils.types.ts +0 -4
- package/src/shared/utils/animation/compute-stack-progress.ts +0 -16
- package/src/shared/utils/bounds/constants.ts +0 -40
- package/src/shared/utils/bounds/helpers/is-bounds-equal.ts +0 -24
- package/src/shared/utils/gesture/apply-offset-rules.ts +0 -312
- package/src/shared/utils/reanimated/version.ts +0 -5
- /package/lib/commonjs/{blank-stack/utils/with-stack-navigation → component-stack}/types.js +0 -0
- /package/lib/commonjs/{blank-stack/utils/with-stack-navigation/hooks → shared/hooks/navigation}/use-previous.js +0 -0
- /package/lib/commonjs/{blank-stack/utils/with-stack-navigation/helpers → shared/utils/navigation}/are-descriptors-equal.js +0 -0
- /package/lib/commonjs/{blank-stack/utils/with-stack-navigation/helpers → shared/utils/navigation}/compose-descriptors.js +0 -0
- /package/lib/commonjs/{blank-stack/utils/with-stack-navigation/helpers → shared/utils/navigation}/have-same-route-keys.js +0 -0
- /package/lib/commonjs/{blank-stack/utils/with-stack-navigation/helpers → shared/utils/navigation}/routes-are-identical.js +0 -0
- /package/lib/module/{blank-stack/utils/with-stack-navigation → component-stack}/types.js +0 -0
- /package/lib/module/{blank-stack/utils/with-stack-navigation/hooks → shared/hooks/navigation}/use-previous.js +0 -0
- /package/lib/module/{blank-stack/utils/with-stack-navigation/helpers → shared/utils/navigation}/are-descriptors-equal.js +0 -0
- /package/lib/module/{blank-stack/utils/with-stack-navigation/helpers → shared/utils/navigation}/compose-descriptors.js +0 -0
- /package/lib/module/{blank-stack/utils/with-stack-navigation/helpers → shared/utils/navigation}/have-same-route-keys.js +0 -0
- /package/lib/module/{blank-stack/utils/with-stack-navigation/helpers → shared/utils/navigation}/routes-are-identical.js +0 -0
- /package/lib/typescript/{shared/components → native-stack}/controllers/native-stack-lifecycle.d.ts +0 -0
- /package/lib/typescript/{blank-stack/utils/with-stack-navigation/hooks → shared/hooks/navigation}/use-closing-route-keys.d.ts +0 -0
- /package/lib/typescript/{blank-stack/utils/with-stack-navigation/hooks → shared/hooks/navigation}/use-previous.d.ts +0 -0
- /package/src/{blank-stack/utils/with-stack-navigation/hooks → shared/hooks/navigation}/use-previous.tsx +0 -0
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
Descriptor,
|
|
3
|
-
NavigationProp,
|
|
4
|
-
ParamListBase,
|
|
5
|
-
RouteProp,
|
|
6
|
-
} from "@react-navigation/native";
|
|
7
|
-
import { createContext, useContext, useMemo } from "react";
|
|
8
|
-
import type { ScreenTransitionConfig } from "../types/core.types";
|
|
9
|
-
|
|
10
|
-
export type TransitionDescriptor = Descriptor<
|
|
11
|
-
ScreenTransitionConfig,
|
|
12
|
-
NavigationProp<ParamListBase>,
|
|
13
|
-
RouteProp<ParamListBase>
|
|
14
|
-
>;
|
|
15
|
-
|
|
16
|
-
export interface KeysContextType<
|
|
17
|
-
TDescriptor extends TransitionDescriptor = TransitionDescriptor,
|
|
18
|
-
> {
|
|
19
|
-
previous?: TDescriptor;
|
|
20
|
-
current: TDescriptor;
|
|
21
|
-
next?: TDescriptor;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const KeysContext = createContext<
|
|
25
|
-
KeysContextType<TransitionDescriptor> | undefined
|
|
26
|
-
>(undefined);
|
|
27
|
-
|
|
28
|
-
interface KeysProviderProps<TDescriptor extends TransitionDescriptor> {
|
|
29
|
-
children: React.ReactNode;
|
|
30
|
-
previous?: TDescriptor;
|
|
31
|
-
current: TDescriptor;
|
|
32
|
-
next?: TDescriptor;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function KeysProvider<TDescriptor extends TransitionDescriptor>({
|
|
36
|
-
children,
|
|
37
|
-
previous,
|
|
38
|
-
current,
|
|
39
|
-
next,
|
|
40
|
-
}: KeysProviderProps<TDescriptor>) {
|
|
41
|
-
const value = useMemo<KeysContextType<TDescriptor>>(
|
|
42
|
-
() => ({ previous, current, next }),
|
|
43
|
-
[previous, current, next],
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
return <KeysContext.Provider value={value}>{children}</KeysContext.Provider>;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function useKeys<
|
|
50
|
-
TDescriptor extends TransitionDescriptor = TransitionDescriptor,
|
|
51
|
-
>(): KeysContextType<TDescriptor> {
|
|
52
|
-
const context = useContext(KeysContext);
|
|
53
|
-
if (context === undefined) {
|
|
54
|
-
throw new Error("useKeys must be used within a KeysProvider");
|
|
55
|
-
}
|
|
56
|
-
return context as KeysContextType<TDescriptor>;
|
|
57
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
import {
|
|
3
|
-
AnimationStore,
|
|
4
|
-
type AnimationStoreMap,
|
|
5
|
-
} from "../stores/animation.store";
|
|
6
|
-
import createProvider from "../utils/create-provider";
|
|
7
|
-
|
|
8
|
-
interface RoutesProviderProps {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
routeKeys: string[];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface RoutesContextValue {
|
|
14
|
-
/**
|
|
15
|
-
* Array of route keys for all routes in the stack, in order.
|
|
16
|
-
*/
|
|
17
|
-
routeKeys: string[];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const { RoutesProvider, useRoutesContext } = createProvider("Routes", {
|
|
21
|
-
guarded: false,
|
|
22
|
-
})<RoutesProviderProps, RoutesContextValue>(({ routeKeys }) => ({
|
|
23
|
-
value: { routeKeys },
|
|
24
|
-
}));
|
|
25
|
-
|
|
26
|
-
export { RoutesProvider, useRoutesContext };
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Hook to get animation values for all screens from a given index onwards.
|
|
30
|
-
* Useful for computing accumulated progress across multiple screens.
|
|
31
|
-
*/
|
|
32
|
-
export function useStackAnimationValues(
|
|
33
|
-
currentRouteKey: string | undefined,
|
|
34
|
-
): AnimationStoreMap[] {
|
|
35
|
-
const routesContext = useRoutesContext();
|
|
36
|
-
|
|
37
|
-
return useMemo(() => {
|
|
38
|
-
if (!currentRouteKey || !routesContext) {
|
|
39
|
-
return [];
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const { routeKeys } = routesContext;
|
|
43
|
-
const currentIndex = routeKeys.indexOf(currentRouteKey);
|
|
44
|
-
|
|
45
|
-
if (currentIndex === -1) {
|
|
46
|
-
return [];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Get animation values for all screens from current index onwards
|
|
50
|
-
return routeKeys
|
|
51
|
-
.slice(currentIndex)
|
|
52
|
-
.map((key) => AnimationStore.getAll(key));
|
|
53
|
-
}, [currentRouteKey, routesContext]);
|
|
54
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
import type { ComponentType } from "react";
|
|
3
|
-
import { RootTransitionAware } from "../components/root-transition-aware";
|
|
4
|
-
import type { Any } from "../types/utils.types";
|
|
5
|
-
import { ScreenGestureProvider } from "./gestures.provider";
|
|
6
|
-
import { KeysProvider, type TransitionDescriptor } from "./keys.provider";
|
|
7
|
-
import { TransitionStylesProvider } from "./transition-styles.provider";
|
|
8
|
-
|
|
9
|
-
type Props<TDescriptor extends TransitionDescriptor> = {
|
|
10
|
-
previous?: TDescriptor;
|
|
11
|
-
current: TDescriptor;
|
|
12
|
-
next?: TDescriptor;
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
LifecycleController: ComponentType<Any>;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export function ScreenTransitionProvider<
|
|
18
|
-
TDescriptor extends TransitionDescriptor,
|
|
19
|
-
>({
|
|
20
|
-
previous,
|
|
21
|
-
current,
|
|
22
|
-
next,
|
|
23
|
-
children,
|
|
24
|
-
LifecycleController,
|
|
25
|
-
}: Props<TDescriptor>) {
|
|
26
|
-
return (
|
|
27
|
-
<KeysProvider<TDescriptor>
|
|
28
|
-
previous={previous}
|
|
29
|
-
current={current}
|
|
30
|
-
next={next}
|
|
31
|
-
>
|
|
32
|
-
<ScreenGestureProvider>
|
|
33
|
-
<LifecycleController>
|
|
34
|
-
<TransitionStylesProvider>
|
|
35
|
-
<RootTransitionAware>{children}</RootTransitionAware>
|
|
36
|
-
</TransitionStylesProvider>
|
|
37
|
-
</LifecycleController>
|
|
38
|
-
</ScreenGestureProvider>
|
|
39
|
-
</KeysProvider>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AnimationStoreMap } from "../../stores/animation.store";
|
|
2
|
-
|
|
3
|
-
export const computeStackProgress = (
|
|
4
|
-
stackAnimationValues: AnimationStoreMap[],
|
|
5
|
-
fallback: number = 0,
|
|
6
|
-
) => {
|
|
7
|
-
"worklet";
|
|
8
|
-
let computedStackProgress: number | undefined;
|
|
9
|
-
if (stackAnimationValues.length > 0) {
|
|
10
|
-
computedStackProgress = 0;
|
|
11
|
-
for (let i = 0; i < stackAnimationValues.length; i += 1) {
|
|
12
|
-
computedStackProgress += stackAnimationValues[i].progress.value;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return computedStackProgress ?? fallback;
|
|
16
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { MeasuredDimensions } from "react-native-reanimated";
|
|
2
|
-
import type { Layout } from "../../types/core.types";
|
|
3
|
-
import type { Complete } from "../../types/utils.types";
|
|
4
|
-
import type { BoundsBuilderOptions } from "./types/builder";
|
|
5
|
-
|
|
6
|
-
export const FULLSCREEN_DIMENSIONS = (
|
|
7
|
-
dimensions: Layout,
|
|
8
|
-
): MeasuredDimensions => {
|
|
9
|
-
"worklet";
|
|
10
|
-
return {
|
|
11
|
-
x: 0,
|
|
12
|
-
y: 0,
|
|
13
|
-
pageX: 0,
|
|
14
|
-
pageY: 0,
|
|
15
|
-
width: dimensions.width,
|
|
16
|
-
height: dimensions.height,
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const DEFAULT_BUILDER_OPTIONS: Complete<
|
|
21
|
-
Omit<BoundsBuilderOptions, "id">
|
|
22
|
-
> = Object.freeze({
|
|
23
|
-
gestures: { x: 0, y: 0 },
|
|
24
|
-
toFullscreen: false,
|
|
25
|
-
absolute: false,
|
|
26
|
-
relative: true,
|
|
27
|
-
method: "transform",
|
|
28
|
-
contentScaleMode: "auto",
|
|
29
|
-
space: "relative",
|
|
30
|
-
target: "bound",
|
|
31
|
-
/**
|
|
32
|
-
* Controls how elements scale during transitions
|
|
33
|
-
* - "match": Scale to match destination bounds (default for center anchor)
|
|
34
|
-
* - "none": No scaling, maintain original size (default for non-center anchors)
|
|
35
|
-
* - "uniform": Scale uniformly (maintain aspect ratio)
|
|
36
|
-
*/
|
|
37
|
-
scaleMode: "match",
|
|
38
|
-
anchor: "center",
|
|
39
|
-
raw: false,
|
|
40
|
-
} as const);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { MeasuredDimensions } from "react-native-reanimated";
|
|
2
|
-
import { BoundStore } from "../../../stores/bounds.store";
|
|
3
|
-
|
|
4
|
-
export const isBoundsEqual = ({
|
|
5
|
-
measured,
|
|
6
|
-
key,
|
|
7
|
-
sharedBoundTag,
|
|
8
|
-
}: {
|
|
9
|
-
measured: MeasuredDimensions;
|
|
10
|
-
key: string;
|
|
11
|
-
sharedBoundTag: string;
|
|
12
|
-
}) => {
|
|
13
|
-
"worklet";
|
|
14
|
-
const existing = BoundStore.getSnapshot(sharedBoundTag, key)?.bounds;
|
|
15
|
-
return (
|
|
16
|
-
!!existing &&
|
|
17
|
-
existing.width === measured.width &&
|
|
18
|
-
existing.height === measured.height &&
|
|
19
|
-
existing.pageX === measured.pageX &&
|
|
20
|
-
existing.pageY === measured.pageY &&
|
|
21
|
-
existing.x === measured.x &&
|
|
22
|
-
existing.y === measured.y
|
|
23
|
-
);
|
|
24
|
-
};
|
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
import type { GestureStateManagerType } from "react-native-gesture-handler/lib/typescript/handlers/gestures/gestureStateManager";
|
|
2
|
-
import type { SharedValue } from "react-native-reanimated";
|
|
3
|
-
import {
|
|
4
|
-
DEFAULT_ACTIVATION_AREA,
|
|
5
|
-
DEFAULT_EDGE_DISTANCE_HORIZONTAL,
|
|
6
|
-
DEFAULT_EDGE_DISTANCE_VERTICAL,
|
|
7
|
-
GESTURE_ACTIVATION_THRESHOLD_X,
|
|
8
|
-
GESTURE_ACTIVATION_THRESHOLD_Y,
|
|
9
|
-
GESTURE_FAIL_TOLERANCE_X,
|
|
10
|
-
GESTURE_FAIL_TOLERANCE_Y,
|
|
11
|
-
} from "../../constants";
|
|
12
|
-
import type { Layout } from "../../types/core.types";
|
|
13
|
-
import {
|
|
14
|
-
type ActivationArea,
|
|
15
|
-
type GestureActivationArea,
|
|
16
|
-
GestureOffsetState,
|
|
17
|
-
type SideActivation,
|
|
18
|
-
} from "../../types/gesture.types";
|
|
19
|
-
|
|
20
|
-
type Directions = {
|
|
21
|
-
vertical: boolean;
|
|
22
|
-
verticalInverted: boolean;
|
|
23
|
-
horizontal: boolean;
|
|
24
|
-
horizontalInverted: boolean;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
interface CheckGestureActivationProps {
|
|
28
|
-
initialTouch: { x: number; y: number };
|
|
29
|
-
touch: { x: number; y: number };
|
|
30
|
-
directions: Directions;
|
|
31
|
-
manager?: GestureStateManagerType;
|
|
32
|
-
gestureOffsetState: SharedValue<GestureOffsetState>;
|
|
33
|
-
activationArea?: GestureActivationArea;
|
|
34
|
-
dimensions: Layout;
|
|
35
|
-
responseDistance?: number;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
type NormalizedSides = {
|
|
39
|
-
left: ActivationArea;
|
|
40
|
-
right: ActivationArea;
|
|
41
|
-
top: ActivationArea;
|
|
42
|
-
bottom: ActivationArea;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
interface ShouldActivateOrFailProps {
|
|
46
|
-
deltaX: number;
|
|
47
|
-
deltaY: number;
|
|
48
|
-
hasHorizontal: boolean;
|
|
49
|
-
hasVertical: boolean;
|
|
50
|
-
isHorizontalSwipe: boolean;
|
|
51
|
-
isVerticalSwipe: boolean;
|
|
52
|
-
allowedRight: boolean;
|
|
53
|
-
allowedLeft: boolean;
|
|
54
|
-
allowedUp: boolean;
|
|
55
|
-
allowedDown: boolean;
|
|
56
|
-
horizontalGateRight: boolean;
|
|
57
|
-
horizontalGateLeft: boolean;
|
|
58
|
-
verticalGateUp: boolean;
|
|
59
|
-
verticalGateDown: boolean;
|
|
60
|
-
isSwipingRight: boolean;
|
|
61
|
-
isSwipingLeft: boolean;
|
|
62
|
-
isSwipingUp: boolean;
|
|
63
|
-
isSwipingDown: boolean;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
interface ReturnValues {
|
|
67
|
-
isSwipingDown: boolean;
|
|
68
|
-
isSwipingUp: boolean;
|
|
69
|
-
isSwipingRight: boolean;
|
|
70
|
-
isSwipingLeft: boolean;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function normalizeSides(area?: GestureActivationArea): NormalizedSides {
|
|
74
|
-
"worklet";
|
|
75
|
-
if (!area || typeof area === "string") {
|
|
76
|
-
const mode: ActivationArea = area ?? DEFAULT_ACTIVATION_AREA;
|
|
77
|
-
return { left: mode, right: mode, top: mode, bottom: mode };
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const s: SideActivation = area as SideActivation;
|
|
81
|
-
return {
|
|
82
|
-
left: s.left ?? DEFAULT_ACTIVATION_AREA,
|
|
83
|
-
right: s.right ?? DEFAULT_ACTIVATION_AREA,
|
|
84
|
-
top: s.top ?? DEFAULT_ACTIVATION_AREA,
|
|
85
|
-
bottom: s.bottom ?? DEFAULT_ACTIVATION_AREA,
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function computeEdgeConstraints(
|
|
90
|
-
initialTouch: { x: number; y: number },
|
|
91
|
-
dimensions: Layout,
|
|
92
|
-
sides: NormalizedSides,
|
|
93
|
-
responseDistance?: number,
|
|
94
|
-
) {
|
|
95
|
-
"worklet";
|
|
96
|
-
const xDist = responseDistance ?? DEFAULT_EDGE_DISTANCE_HORIZONTAL;
|
|
97
|
-
const yDist = responseDistance ?? DEFAULT_EDGE_DISTANCE_VERTICAL;
|
|
98
|
-
|
|
99
|
-
const horizontalRight = sides.left === "screen" || initialTouch.x <= xDist; // right swipe checks left edge
|
|
100
|
-
const horizontalLeft =
|
|
101
|
-
sides.right === "screen" || initialTouch.x >= dimensions.width - xDist; // left swipe checks right edge
|
|
102
|
-
const verticalDown = sides.top === "screen" || initialTouch.y <= yDist; // down swipe checks top edge
|
|
103
|
-
const verticalUp =
|
|
104
|
-
sides.bottom === "screen" || initialTouch.y >= dimensions.height - yDist; // up swipe checks bottom edge
|
|
105
|
-
|
|
106
|
-
return { horizontalRight, horizontalLeft, verticalDown, verticalUp } as const;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function calculateSwipeDirs(deltaX: number, deltaY: number) {
|
|
110
|
-
"worklet";
|
|
111
|
-
|
|
112
|
-
const isVerticalSwipe = Math.abs(deltaY) > Math.abs(deltaX);
|
|
113
|
-
const isHorizontalSwipe = Math.abs(deltaX) > Math.abs(deltaY);
|
|
114
|
-
|
|
115
|
-
const isSwipingDown = isVerticalSwipe && deltaY > 0;
|
|
116
|
-
const isSwipingUp = isVerticalSwipe && deltaY < 0;
|
|
117
|
-
const isSwipingRight = isHorizontalSwipe && deltaX > 0;
|
|
118
|
-
const isSwipingLeft = isHorizontalSwipe && deltaX < 0;
|
|
119
|
-
|
|
120
|
-
return {
|
|
121
|
-
isSwipingDown,
|
|
122
|
-
isSwipingUp,
|
|
123
|
-
isSwipingRight,
|
|
124
|
-
isSwipingLeft,
|
|
125
|
-
isVerticalSwipe,
|
|
126
|
-
isHorizontalSwipe,
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function shouldActivateOrFail(params: ShouldActivateOrFailProps) {
|
|
131
|
-
"worklet";
|
|
132
|
-
|
|
133
|
-
const {
|
|
134
|
-
deltaX,
|
|
135
|
-
deltaY,
|
|
136
|
-
hasHorizontal,
|
|
137
|
-
hasVertical,
|
|
138
|
-
isHorizontalSwipe,
|
|
139
|
-
isVerticalSwipe,
|
|
140
|
-
allowedRight,
|
|
141
|
-
allowedLeft,
|
|
142
|
-
allowedUp,
|
|
143
|
-
allowedDown,
|
|
144
|
-
horizontalGateRight,
|
|
145
|
-
horizontalGateLeft,
|
|
146
|
-
verticalGateUp,
|
|
147
|
-
verticalGateDown,
|
|
148
|
-
isSwipingRight,
|
|
149
|
-
isSwipingLeft,
|
|
150
|
-
isSwipingUp,
|
|
151
|
-
isSwipingDown,
|
|
152
|
-
} = params;
|
|
153
|
-
|
|
154
|
-
let shouldActivate = false;
|
|
155
|
-
let shouldFail = false;
|
|
156
|
-
|
|
157
|
-
if (hasHorizontal && isHorizontalSwipe) {
|
|
158
|
-
const hasEnoughHorizontalMovement =
|
|
159
|
-
Math.abs(deltaX) >= GESTURE_ACTIVATION_THRESHOLD_X;
|
|
160
|
-
|
|
161
|
-
const hasAcceptableVerticalDeviation =
|
|
162
|
-
Math.abs(deltaY) <= GESTURE_FAIL_TOLERANCE_X;
|
|
163
|
-
|
|
164
|
-
if (hasEnoughHorizontalMovement && hasAcceptableVerticalDeviation) {
|
|
165
|
-
const rightOk = isSwipingRight && allowedRight && horizontalGateRight;
|
|
166
|
-
const leftOk = isSwipingLeft && allowedLeft && horizontalGateLeft;
|
|
167
|
-
if (rightOk || leftOk) {
|
|
168
|
-
shouldActivate = true;
|
|
169
|
-
}
|
|
170
|
-
} else if (!hasAcceptableVerticalDeviation) {
|
|
171
|
-
shouldFail = true;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
if (hasVertical && isVerticalSwipe) {
|
|
176
|
-
const hasEnoughVerticalMovement =
|
|
177
|
-
Math.abs(deltaY) >= GESTURE_ACTIVATION_THRESHOLD_Y;
|
|
178
|
-
const hasAcceptableHorizontalDeviation =
|
|
179
|
-
Math.abs(deltaX) <= GESTURE_FAIL_TOLERANCE_Y;
|
|
180
|
-
|
|
181
|
-
if (hasEnoughVerticalMovement && hasAcceptableHorizontalDeviation) {
|
|
182
|
-
const upOk = isSwipingUp && allowedUp && verticalGateUp;
|
|
183
|
-
const downOk = isSwipingDown && allowedDown && verticalGateDown;
|
|
184
|
-
if (upOk || downOk) {
|
|
185
|
-
shouldActivate = true;
|
|
186
|
-
}
|
|
187
|
-
} else if (!hasAcceptableHorizontalDeviation) {
|
|
188
|
-
shouldFail = true;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (hasHorizontal && isHorizontalSwipe) {
|
|
193
|
-
if ((isSwipingLeft && !allowedLeft) || (isSwipingRight && !allowedRight)) {
|
|
194
|
-
shouldFail = true;
|
|
195
|
-
}
|
|
196
|
-
// If gating prohibits the dominant horizontal swipe, fail early
|
|
197
|
-
if (
|
|
198
|
-
(isSwipingRight && allowedRight && !horizontalGateRight) ||
|
|
199
|
-
(isSwipingLeft && allowedLeft && !horizontalGateLeft)
|
|
200
|
-
) {
|
|
201
|
-
shouldFail = true;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
if (hasVertical && isVerticalSwipe) {
|
|
206
|
-
if ((isSwipingUp && !allowedUp) || (isSwipingDown && !allowedDown)) {
|
|
207
|
-
shouldFail = true;
|
|
208
|
-
}
|
|
209
|
-
// If gating prohibits the dominant vertical swipe, fail early
|
|
210
|
-
if (
|
|
211
|
-
(isSwipingUp && allowedUp && !verticalGateUp) ||
|
|
212
|
-
(isSwipingDown && allowedDown && !verticalGateDown)
|
|
213
|
-
) {
|
|
214
|
-
shouldFail = true;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
return { shouldActivate, shouldFail };
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Since we're using onTouchesMove to activate our pan, faillOffset and activateOffset don't actually work. In that case we'll create this function to use in onTouchesMove which acts simarly to the original functionality.
|
|
223
|
-
*/
|
|
224
|
-
export const applyOffsetRules = ({
|
|
225
|
-
initialTouch,
|
|
226
|
-
touch,
|
|
227
|
-
directions,
|
|
228
|
-
manager,
|
|
229
|
-
gestureOffsetState,
|
|
230
|
-
activationArea,
|
|
231
|
-
dimensions,
|
|
232
|
-
responseDistance,
|
|
233
|
-
}: CheckGestureActivationProps): ReturnValues => {
|
|
234
|
-
"worklet";
|
|
235
|
-
|
|
236
|
-
const deltaX = touch.x - initialTouch.x;
|
|
237
|
-
const deltaY = touch.y - initialTouch.y;
|
|
238
|
-
|
|
239
|
-
const allowedDown = directions.vertical;
|
|
240
|
-
const allowedUp = directions.verticalInverted;
|
|
241
|
-
const allowedRight = directions.horizontal;
|
|
242
|
-
const allowedLeft = directions.horizontalInverted;
|
|
243
|
-
|
|
244
|
-
const hasHorizontal = allowedLeft || allowedRight;
|
|
245
|
-
const hasVertical = allowedUp || allowedDown;
|
|
246
|
-
|
|
247
|
-
const {
|
|
248
|
-
isSwipingDown,
|
|
249
|
-
isSwipingUp,
|
|
250
|
-
isSwipingRight,
|
|
251
|
-
isSwipingLeft,
|
|
252
|
-
isVerticalSwipe,
|
|
253
|
-
isHorizontalSwipe,
|
|
254
|
-
} = calculateSwipeDirs(deltaX, deltaY);
|
|
255
|
-
|
|
256
|
-
// avoid re-running the function if the activation state is already set
|
|
257
|
-
if (
|
|
258
|
-
gestureOffsetState.value === GestureOffsetState.PASSED ||
|
|
259
|
-
gestureOffsetState.value === GestureOffsetState.FAILED
|
|
260
|
-
) {
|
|
261
|
-
return {
|
|
262
|
-
isSwipingDown,
|
|
263
|
-
isSwipingUp,
|
|
264
|
-
isSwipingRight,
|
|
265
|
-
isSwipingLeft,
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
const sides = normalizeSides(activationArea);
|
|
270
|
-
|
|
271
|
-
const {
|
|
272
|
-
horizontalRight: horizontalGateRight,
|
|
273
|
-
horizontalLeft: horizontalGateLeft,
|
|
274
|
-
verticalDown: verticalGateDown,
|
|
275
|
-
verticalUp: verticalGateUp,
|
|
276
|
-
} = computeEdgeConstraints(initialTouch, dimensions, sides, responseDistance);
|
|
277
|
-
|
|
278
|
-
const { shouldActivate, shouldFail } = shouldActivateOrFail({
|
|
279
|
-
deltaX,
|
|
280
|
-
deltaY,
|
|
281
|
-
hasHorizontal,
|
|
282
|
-
hasVertical,
|
|
283
|
-
isHorizontalSwipe,
|
|
284
|
-
isVerticalSwipe,
|
|
285
|
-
allowedRight,
|
|
286
|
-
allowedLeft,
|
|
287
|
-
allowedUp,
|
|
288
|
-
allowedDown,
|
|
289
|
-
horizontalGateRight,
|
|
290
|
-
horizontalGateLeft,
|
|
291
|
-
verticalGateUp,
|
|
292
|
-
verticalGateDown,
|
|
293
|
-
isSwipingRight,
|
|
294
|
-
isSwipingLeft,
|
|
295
|
-
isSwipingUp,
|
|
296
|
-
isSwipingDown,
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
if (shouldActivate) {
|
|
300
|
-
gestureOffsetState.value = GestureOffsetState.PASSED;
|
|
301
|
-
} else if (shouldFail) {
|
|
302
|
-
gestureOffsetState.value = GestureOffsetState.FAILED;
|
|
303
|
-
manager?.fail();
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
return {
|
|
307
|
-
isSwipingDown,
|
|
308
|
-
isSwipingUp,
|
|
309
|
-
isSwipingRight,
|
|
310
|
-
isSwipingLeft,
|
|
311
|
-
};
|
|
312
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/lib/typescript/{shared/components → native-stack}/controllers/native-stack-lifecycle.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|