react-native-screen-transitions 3.0.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/README.md +179 -48
- 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 +17 -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/animation/derivations.js +7 -0
- package/lib/commonjs/shared/utils/animation/derivations.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 +17 -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/animation/derivations.js +7 -0
- package/lib/module/shared/utils/animation/derivations.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 +10 -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/animation/derivations.d.ts +3 -1
- package/lib/typescript/shared/utils/animation/derivations.d.ts.map +1 -1
- 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 +20 -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 +11 -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/animation/derivations.ts +8 -1
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-composers.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/helpers/style-composers.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EACX,wBAAwB,EACxB,gBAAgB,EAChB,MAAM,mBAAmB,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,EAAE,kBAAkB,CAAC;IACxB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,cAAc,EAAE,oBAAoB,CAAC;CACrC,CAAC;AAEF;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"style-composers.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/helpers/style-composers.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EACX,wBAAwB,EACxB,gBAAgB,EAChB,MAAM,mBAAmB,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,EAAE,kBAAkB,CAAC;IACxB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,cAAc,EAAE,oBAAoB,CAAC;CACrC,CAAC;AAEF;;;;;GAKG;AACH,KAAK,oBAAoB,GAAG;IAC3B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,EAAE,kBAAkB,CAAC;IACxB,QAAQ,EAAE,wBAAwB,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,cAAc,EAAE,oBAAoB,CAAC;CACrC,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,CAgC5E;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,CAkC5E;AAED,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,oBAAoB,GAC1B,UAAU,CA6BZ;AAED,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,oBAAoB,GAC1B,UAAU,CAoCZ;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,CA+B5E"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { ImageStyle, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
|
-
import type { Any } from "../../../types/utils.types";
|
|
3
2
|
type AnyStyle = ViewStyle | TextStyle | ImageStyle;
|
|
4
3
|
type StyleValue = StyleProp<AnyStyle>;
|
|
5
|
-
type PlainStyleObject = Record<string,
|
|
4
|
+
type PlainStyleObject = Record<string, any>;
|
|
6
5
|
export declare function prepareStyleForBounds(style: StyleValue | undefined): PlainStyleObject;
|
|
7
6
|
export {};
|
|
8
7
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/helpers/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/helpers/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhF,KAAK,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AACnD,KAAK,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AACtC,KAAK,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAqD5C,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,UAAU,GAAG,SAAS,GAC3B,gBAAgB,CAOlB"}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import type { ScreenInterpolationProps
|
|
1
|
+
import type { ScreenInterpolationProps } from "../../types/animation.types";
|
|
2
2
|
import type { BoundsAccessor } from "../../types/bounds.types";
|
|
3
|
-
import type { Layout } from "../../types/core.types";
|
|
4
|
-
export interface BuildBoundsAccessorParams {
|
|
5
|
-
current: ScreenTransitionState;
|
|
6
|
-
previous?: ScreenTransitionState;
|
|
7
|
-
next?: ScreenTransitionState;
|
|
8
|
-
progress: number;
|
|
9
|
-
dimensions: Layout;
|
|
10
|
-
}
|
|
11
3
|
export declare const createBounds: (props: Omit<ScreenInterpolationProps, "bounds">) => BoundsAccessor;
|
|
12
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/bounds/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACX,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/bounds/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACX,wBAAwB,EAExB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AAkK3E,eAAO,MAAM,YAAY,GACxB,OAAO,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,KAC7C,cAyDF,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
2
2
|
import type { ScreenTransitionState } from "../../../types/animation.types";
|
|
3
3
|
import type { BoundsMethod } from "../../../types/bounds.types";
|
|
4
|
-
import type { Layout } from "../../../types/
|
|
4
|
+
import type { Layout } from "../../../types/screen.types";
|
|
5
5
|
export type BoundsAnchor = "topLeading" | "top" | "topTrailing" | "leading" | "center" | "trailing" | "bottomLeading" | "bottom" | "bottomTrailing";
|
|
6
6
|
export type BoundsScaleMode = "match" | "none" | "uniform";
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
type BoundsTarget = "bound" | "fullscreen" | MeasuredDimensions;
|
|
8
|
+
type BoundsSpace = "relative" | "absolute";
|
|
9
9
|
export type BoundsComputeParams = {
|
|
10
10
|
id?: string;
|
|
11
11
|
previous?: ScreenTransitionState;
|
|
@@ -14,31 +14,31 @@ export type BoundsComputeParams = {
|
|
|
14
14
|
progress: number;
|
|
15
15
|
dimensions: Layout;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type RawSizeAbsoluteReturn = {
|
|
18
18
|
width: number;
|
|
19
19
|
height: number;
|
|
20
20
|
translateX: number;
|
|
21
21
|
translateY: number;
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
type RawSizeRelativeReturn = {
|
|
24
24
|
translateX: number;
|
|
25
25
|
translateY: number;
|
|
26
26
|
width: number;
|
|
27
27
|
height: number;
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
type RawTransformAbsoluteReturn = {
|
|
30
30
|
translateX: number;
|
|
31
31
|
translateY: number;
|
|
32
32
|
scaleX: number;
|
|
33
33
|
scaleY: number;
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
type RawTransformRelativeReturn = {
|
|
36
36
|
translateX: number;
|
|
37
37
|
translateY: number;
|
|
38
38
|
scaleX: number;
|
|
39
39
|
scaleY: number;
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
type RawContentReturn = {
|
|
42
42
|
translateX: number;
|
|
43
43
|
translateY: number;
|
|
44
44
|
scale: number;
|
|
@@ -94,4 +94,5 @@ export type BoundsBuilderOptions = {
|
|
|
94
94
|
*/
|
|
95
95
|
raw?: boolean;
|
|
96
96
|
};
|
|
97
|
+
export {};
|
|
97
98
|
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/types/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/types/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,MAAM,YAAY,GACrB,YAAY,GACZ,KAAK,GACL,aAAa,GACb,SAAS,GACT,QAAQ,GACR,UAAU,GACV,eAAe,GACf,QAAQ,GACR,gBAAgB,CAAC;AAEpB,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3D,KAAK,YAAY,GAAG,OAAO,GAAG,YAAY,GAAG,kBAAkB,CAAC;AAEhE,KAAK,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;AAE3C,MAAM,MAAM,mBAAmB,GAAG;IACjC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,0BAA0B,GAAG;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,0BAA0B,GAAG;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAGF,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,oBAAoB,IAC1D,CAAC,CAAC,KAAK,CAAC,SAAS,IAAI,GAClB,CAAC,CAAC,QAAQ,CAAC,SAAS,MAAM,GACzB,CAAC,CAAC,OAAO,CAAC,SAAS,UAAU,GAC5B,qBAAqB,GACrB,qBAAqB,GACtB,CAAC,CAAC,QAAQ,CAAC,SAAS,SAAS,GAC5B,gBAAgB,GAChB,CAAC,CAAC,OAAO,CAAC,SAAS,UAAU,GAC5B,0BAA0B,GAC1B,0BAA0B,GAC7B,UAAU,CAAC;AAEf,MAAM,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAEtC;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAE5B;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACd,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type GeometryBase = {
|
|
2
2
|
entering: boolean;
|
|
3
3
|
};
|
|
4
4
|
export type RelativeGeometry = GeometryBase & {
|
|
@@ -12,4 +12,5 @@ export type ContentTransformGeometry = GeometryBase & {
|
|
|
12
12
|
ty: number;
|
|
13
13
|
s: number;
|
|
14
14
|
};
|
|
15
|
+
export {};
|
|
15
16
|
//# sourceMappingURL=geometry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/types/geometry.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/types/geometry.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG;IACnB,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,YAAY,GAAG;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;CACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-provider.d.ts","sourceRoot":"","sources":["../../../../src/shared/utils/create-provider.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACN,KAAK,aAAa,EAElB,KAAK,SAAS,EAId,MAAM,OAAO,CAAC;AAEf,KAAK,sBAAsB,GAAG,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,KAAK,SAAS,CAAC;AAE5E,MAAM,CAAC,OAAO,UAAU,cAAc,CACrC,YAAY,SAAS,MAAM,EAC3B,OAAO,SAAS,OAAO,GAAG,IAAI,EAC7B,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,IAC5C,aAAa,SAAS,MAAM,EAAE,YAAY,EACjD,SAAS,CAAC,KAAK,EAAE,aAAa,KAAK;IAClC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EACN,SAAS,GACT,CAAC,CACD,aAAa,EAAE,GACb,CAAC,IAAI,YAAY,IAAI,GAAG,CAAC,UAAU,GAAG,sBAAsB,GAC7D,KACI,SAAS,CAAC,CAAC;CACnB,
|
|
1
|
+
{"version":3,"file":"create-provider.d.ts","sourceRoot":"","sources":["../../../../src/shared/utils/create-provider.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACN,KAAK,aAAa,EAElB,KAAK,SAAS,EAId,MAAM,OAAO,CAAC;AAEf,KAAK,sBAAsB,GAAG,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,KAAK,SAAS,CAAC;AAE5E,MAAM,CAAC,OAAO,UAAU,cAAc,CACrC,YAAY,SAAS,MAAM,EAC3B,OAAO,SAAS,OAAO,GAAG,IAAI,EAC7B,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,IAC5C,aAAa,SAAS,MAAM,EAAE,YAAY,EACjD,SAAS,CAAC,KAAK,EAAE,aAAa,KAAK;IAClC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EACN,SAAS,GACT,CAAC,CACD,aAAa,EAAE,GACb,CAAC,IAAI,YAAY,IAAI,GAAG,CAAC,UAAU,GAAG,sBAAsB,GAC7D,KACI,SAAS,CAAC,CAAC;CACnB,KAuFI,GACH,CAAC,IAAI,YAAY,IAAI,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,GACjE,GAAG,GACF,CAAC,IAAI,YAAY,IAAI,GAAG,CAAC,UAAU,GAAG,KAAK,CAAC,EAAE,CAAC,aAAa,CAAC,GAC9D,GAAG,GACF,CAAC,IAAI,YAAY,IAAI,MAAM,CAAC,SAAS,GAAG,MAAM,OAAO,SAAS,IAAI,GAChE,YAAY,GACZ,YAAY,GAAG,IAAI,GACtB,GAAG,GACF,CAAC,IAAI,YAAY,IAAI,OAAO,CAAC,UAAU,GAAG,CAC1C,SAAS,EAAE,aAAa,CAAC,YAAY,CAAC,KAClC,KAAK,CAAC,EAAE,CAAC,aAAa,CAAC,GAC5B,CAEF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GestureStateManagerType } from "react-native-gesture-handler/lib/typescript/handlers/gestures/gestureStateManager";
|
|
2
2
|
import type { SharedValue } from "react-native-reanimated";
|
|
3
|
-
import type { Layout } from "../../types/core.types";
|
|
4
3
|
import { type ActivationArea, type GestureActivationArea, GestureOffsetState } from "../../types/gesture.types";
|
|
4
|
+
import type { Layout } from "../../types/screen.types";
|
|
5
5
|
type Directions = {
|
|
6
6
|
vertical: boolean;
|
|
7
7
|
verticalInverted: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-gesture-activation.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/gesture/check-gesture-activation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mFAAmF,CAAC;AACjI,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"check-gesture-activation.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/gesture/check-gesture-activation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mFAAmF,CAAC;AACjI,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,kBAAkB,EAElB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD,KAAK,UAAU,GAAG;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,UAAU,2BAA2B;IACpC,YAAY,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAClC,kBAAkB,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACpD,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,KAAK,eAAe,GAAG;IACtB,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,cAAc,CAAC;IACtB,GAAG,EAAE,cAAc,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC;CACvB,CAAC;AAEF,UAAU,yBAAyB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,YAAY;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;CACvB;AAaD,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,qBAAqB,GAAG,eAAe,CAc5E;AAED,wBAAgB,sBAAsB,CACrC,YAAY,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EACtC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,eAAe,EACtB,gBAAgB,CAAC,EAAE,MAAM;;;;;EAczB;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;EAmBhE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,yBAAyB;;;EAyFrE;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,iHAS9B,2BAA2B,KAAG,YA2EhC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface RouteWithKey {
|
|
2
|
+
key: string;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Aligns current routes with the latest route data while preserving references
|
|
6
|
+
* when possible for performance optimization
|
|
7
|
+
*/
|
|
8
|
+
export declare const alignRoutesWithLatest: <Route extends RouteWithKey, DescriptorMap extends Record<string, unknown>>(currentRoutes: Route[], currentDescriptors: DescriptorMap, nextRoutes: Route[], nextDescriptors: DescriptorMap) => {
|
|
9
|
+
routes: Route[];
|
|
10
|
+
descriptors: DescriptorMap;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=align-routes-with-latest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"align-routes-with-latest.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/navigation/align-routes-with-latest.ts"],"names":[],"mappings":"AAEA,UAAU,YAAY;IACrB,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GACjC,KAAK,SAAS,YAAY,EAC1B,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAE7C,eAAe,KAAK,EAAE,EACtB,oBAAoB,aAAa,EACjC,YAAY,KAAK,EAAE,EACnB,iBAAiB,aAAa,KAC5B;IAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAAC,WAAW,EAAE,aAAa,CAAA;CAiD/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"are-descriptors-equal.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/navigation/are-descriptors-equal.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,GAC/B,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAE7C,GAAG,aAAa,EAChB,GAAG,aAAa,KACd,OASF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface RouteWithKey {
|
|
2
|
+
key: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const composeDescriptors: <Route extends RouteWithKey, DescriptorMap extends Record<string, unknown>>(routes: Route[], nextDescriptors: DescriptorMap, currentDescriptors: DescriptorMap) => DescriptorMap;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=compose-descriptors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose-descriptors.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/navigation/compose-descriptors.ts"],"names":[],"mappings":"AAAA,UAAU,YAAY;IACrB,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,eAAO,MAAM,kBAAkB,GAC9B,KAAK,SAAS,YAAY,EAC1B,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAE7C,QAAQ,KAAK,EAAE,EACf,iBAAiB,aAAa,EAC9B,oBAAoB,aAAa,KAC/B,aASF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"have-same-route-keys.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/navigation/have-same-route-keys.ts"],"names":[],"mappings":"AAAA,UAAU,YAAY;IACrB,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,eAAO,MAAM,iBAAiB,GAAI,KAAK,SAAS,YAAY,EAC3D,UAAU,KAAK,EAAE,EACjB,MAAM,KAAK,EAAE,KACX,OAMF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes-are-identical.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/navigation/routes-are-identical.ts"],"names":[],"mappings":"AAAA,UAAU,YAAY;IACrB,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,eAAO,MAAM,kBAAkB,GAAI,KAAK,SAAS,YAAY,EAC5D,GAAG,KAAK,EAAE,EACV,GAAG,KAAK,EAAE,KACR,OAKF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { useClosingRouteKeys } from "../../hooks/navigation/use-closing-route-keys";
|
|
2
|
+
interface RouteWithKey {
|
|
3
|
+
key: string;
|
|
4
|
+
}
|
|
5
|
+
type SyncRoutesWithRemovedParams<Route extends RouteWithKey, DescriptorMap extends Record<string, unknown>> = {
|
|
6
|
+
prevRoutes: Route[];
|
|
7
|
+
prevDescriptors: DescriptorMap;
|
|
8
|
+
nextRoutes: Route[];
|
|
9
|
+
nextDescriptors: DescriptorMap;
|
|
10
|
+
closingRouteKeys: ReturnType<typeof useClosingRouteKeys>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Synchronizes routes while handling removed routes that may still be animating out.
|
|
14
|
+
* This manages the complex logic of keeping closing routes visible during transitions.
|
|
15
|
+
*/
|
|
16
|
+
export declare const syncRoutesWithRemoved: <Route extends RouteWithKey, DescriptorMap extends Record<string, unknown>>({ prevRoutes, prevDescriptors, nextRoutes, nextDescriptors, closingRouteKeys, }: SyncRoutesWithRemovedParams<Route, DescriptorMap>) => {
|
|
17
|
+
routes: Route[];
|
|
18
|
+
descriptors: DescriptorMap;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=sync-routes-with-removed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-routes-with-removed.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/navigation/sync-routes-with-removed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAMzF,UAAU,YAAY;IACrB,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,KAAK,2BAA2B,CAC/B,KAAK,SAAS,YAAY,EAC1B,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAC1C;IACH,UAAU,EAAE,KAAK,EAAE,CAAC;IACpB,eAAe,EAAE,aAAa,CAAC;IAC/B,UAAU,EAAE,KAAK,EAAE,CAAC;IACpB,eAAe,EAAE,aAAa,CAAC;IAC/B,gBAAgB,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;CACzD,CAAC;AAoBF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GACjC,KAAK,SAAS,YAAY,EAC1B,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5C,iFAMC,2BAA2B,CAAC,KAAK,EAAE,aAAa,CAAC,KAAG;IACtD,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,WAAW,EAAE,aAAa,CAAC;CA6E3B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type SharedValue } from "react-native-reanimated";
|
|
2
|
+
/**
|
|
3
|
+
* Safely read a SharedValue from the UI thread.
|
|
4
|
+
* Avoids the "cannot read .value inside component render" warning.
|
|
5
|
+
*/
|
|
6
|
+
export declare const readSharedValue: <T>(sv: SharedValue<T>) => T;
|
|
7
|
+
//# sourceMappingURL=read-shared-value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-shared-value.d.ts","sourceRoot":"","sources":["../../../../src/shared/utils/read-shared-value.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,WAAW,EAChB,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,CAAC,0BAIF,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BaseStackDescriptor } from "../types/stack.types";
|
|
2
2
|
/**
|
|
3
|
-
* Reset all stores for a given screen
|
|
3
|
+
* Reset all stores for a given screen.
|
|
4
|
+
* Accepts any descriptor that has a route with a key.
|
|
4
5
|
*/
|
|
5
|
-
export declare const resetStoresForScreen: (current:
|
|
6
|
+
export declare const resetStoresForScreen: (current: BaseStackDescriptor) => void;
|
|
6
7
|
//# sourceMappingURL=reset-stores-for-screen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reset-stores-for-screen.d.ts","sourceRoot":"","sources":["../../../../src/shared/utils/reset-stores-for-screen.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reset-stores-for-screen.d.ts","sourceRoot":"","sources":["../../../../src/shared/utils/reset-stores-for-screen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,SAAS,mBAAmB,SAIhE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-screen-transitions",
|
|
3
|
-
"version": "3.0.0",
|
|
3
|
+
"version": "3.2.0-beta.0",
|
|
4
4
|
"description": "Easy screen transitions for React Native and Expo",
|
|
5
5
|
"author": "Ed",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,6 +31,12 @@
|
|
|
31
31
|
"import": "./lib/module/blank-stack/index.js",
|
|
32
32
|
"require": "./lib/commonjs/blank-stack/index.js",
|
|
33
33
|
"types": "./lib/typescript/blank-stack/index.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./component-stack": {
|
|
36
|
+
"react-native": "./src/component-stack/index.ts",
|
|
37
|
+
"import": "./lib/module/component-stack/index.js",
|
|
38
|
+
"require": "./lib/commonjs/component-stack/index.js",
|
|
39
|
+
"types": "./lib/typescript/component-stack/index.d.ts"
|
|
34
40
|
}
|
|
35
41
|
},
|
|
36
42
|
"scripts": {
|
|
@@ -67,7 +73,6 @@
|
|
|
67
73
|
"react-native-screens": ">=4.4.0"
|
|
68
74
|
},
|
|
69
75
|
"devDependencies": {
|
|
70
|
-
"@testing-library/react-native": "^13.2.0",
|
|
71
76
|
"@types/react": "~19.1.10",
|
|
72
77
|
"react-native-builder-bob": "0.39.0",
|
|
73
78
|
"typescript": "catalog:"
|
|
@@ -7,8 +7,8 @@ import Animated, {
|
|
|
7
7
|
useSharedValue,
|
|
8
8
|
} from "react-native-reanimated";
|
|
9
9
|
import { Screen as RNSScreen } from "react-native-screens";
|
|
10
|
+
import { useManagedStackContext } from "../../shared/providers/stack/managed.provider";
|
|
10
11
|
import { AnimationStore } from "../../shared/stores/animation.store";
|
|
11
|
-
import { useStackNavigationContext } from "../utils/with-stack-navigation";
|
|
12
12
|
|
|
13
13
|
interface ScreenProps {
|
|
14
14
|
routeKey: string;
|
|
@@ -36,7 +36,7 @@ export const Screen = ({
|
|
|
36
36
|
freezeOnBlur,
|
|
37
37
|
shouldFreeze,
|
|
38
38
|
}: ScreenProps) => {
|
|
39
|
-
const { activeScreensLimit, routes } =
|
|
39
|
+
const { activeScreensLimit, routes } = useManagedStackContext();
|
|
40
40
|
const routesLength = routes.length;
|
|
41
41
|
|
|
42
42
|
const sceneProgress = AnimationStore.getAnimation(routeKey, "progress");
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { SafeAreaProviderCompat } from "@react-navigation/elements";
|
|
2
1
|
import {
|
|
3
2
|
NavigationContext,
|
|
4
3
|
NavigationRouteContext,
|
|
5
4
|
} from "@react-navigation/native";
|
|
6
5
|
import * as React from "react";
|
|
6
|
+
import { Fragment } from "react";
|
|
7
7
|
import { StyleSheet } from "react-native";
|
|
8
|
-
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
9
8
|
import { ScreenContainer } from "react-native-screens";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
|
|
9
|
+
import { Overlay } from "../../shared/components/overlay";
|
|
10
|
+
import { ScreenComposer } from "../../shared/providers/screen/screen-composer";
|
|
11
|
+
import { withStackCore } from "../../shared/providers/stack/core.provider";
|
|
12
|
+
import { withManagedStack } from "../../shared/providers/stack/managed.provider";
|
|
13
|
+
import { BlankStackScreenLifecycleController } from "../controllers/blank-stack-lifecycle";
|
|
14
|
+
import type {
|
|
15
|
+
BlankStackDescriptor,
|
|
16
|
+
BlankStackNavigationHelpers,
|
|
17
|
+
} from "../types";
|
|
17
18
|
import { Screen } from "./screens";
|
|
18
19
|
|
|
19
20
|
function isFabric() {
|
|
@@ -39,68 +40,59 @@ const SceneView = React.memo(function SceneView({
|
|
|
39
40
|
);
|
|
40
41
|
});
|
|
41
42
|
|
|
42
|
-
export const StackView =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
export const StackView = withStackCore(
|
|
44
|
+
{ TRANSITIONS_ALWAYS_ON: true },
|
|
45
|
+
withManagedStack<BlankStackDescriptor, BlankStackNavigationHelpers>(
|
|
46
|
+
({ descriptors, focusedIndex, scenes, shouldShowFloatOverlay }) => {
|
|
47
|
+
return (
|
|
48
|
+
<Fragment>
|
|
49
|
+
{shouldShowFloatOverlay ? <Overlay.Float /> : null}
|
|
50
|
+
<Overlay.Container>
|
|
51
|
+
<ScreenContainer style={styles.container}>
|
|
52
|
+
{scenes.map((scene, sceneIndex) => {
|
|
53
|
+
const descriptor = scene.descriptor;
|
|
54
|
+
const route = scene.route;
|
|
55
|
+
const isFocused = focusedIndex === sceneIndex;
|
|
56
|
+
const isBelowFocused = focusedIndex - 1 === sceneIndex;
|
|
49
57
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<SafeAreaProviderCompat>
|
|
55
|
-
{shouldShowFloatOverlay ? <Overlay.Float /> : null}
|
|
56
|
-
<ScreenContainer style={styles.container}>
|
|
57
|
-
{scenes.map((scene, sceneIndex) => {
|
|
58
|
-
const descriptor = scene.descriptor;
|
|
59
|
-
const route = scene.route;
|
|
60
|
-
const isFocused = focusedIndex === sceneIndex;
|
|
61
|
-
const isBelowFocused = focusedIndex - 1 === sceneIndex;
|
|
58
|
+
const previousDescriptor =
|
|
59
|
+
scenes[sceneIndex - 1]?.descriptor ?? undefined;
|
|
60
|
+
const nextDescriptor =
|
|
61
|
+
scenes[sceneIndex + 1]?.descriptor ?? undefined;
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
scenes[sceneIndex - 1]?.descriptor ?? undefined;
|
|
65
|
-
const nextDescriptor =
|
|
66
|
-
scenes[sceneIndex + 1]?.descriptor ?? undefined;
|
|
63
|
+
const isPreloaded = descriptors[route.key] === undefined;
|
|
67
64
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
65
|
+
// On Fabric, when screen is frozen, animated and reanimated values are not updated
|
|
66
|
+
// due to component being unmounted. To avoid this, we don't freeze the previous screen there
|
|
67
|
+
const shouldFreeze = isFabric()
|
|
68
|
+
? !isPreloaded && !isFocused && !isBelowFocused
|
|
69
|
+
: !isPreloaded && !isFocused;
|
|
70
|
+
return (
|
|
71
|
+
<Screen
|
|
72
|
+
key={route.key}
|
|
73
|
+
isPreloaded={isPreloaded}
|
|
74
|
+
index={sceneIndex}
|
|
75
|
+
routeKey={route.key}
|
|
76
|
+
shouldFreeze={shouldFreeze}
|
|
77
|
+
freezeOnBlur={descriptor.options.freezeOnBlur}
|
|
78
|
+
>
|
|
79
|
+
<ScreenComposer
|
|
80
|
+
previous={previousDescriptor}
|
|
81
|
+
current={descriptor}
|
|
82
|
+
next={nextDescriptor}
|
|
83
|
+
LifecycleController={BlankStackScreenLifecycleController}
|
|
83
84
|
>
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
);
|
|
96
|
-
})}
|
|
97
|
-
</ScreenContainer>
|
|
98
|
-
</SafeAreaProviderCompat>
|
|
99
|
-
</GestureHandlerRootView>
|
|
100
|
-
</RoutesProvider>
|
|
101
|
-
</FlagsProvider>
|
|
102
|
-
);
|
|
103
|
-
},
|
|
85
|
+
<SceneView key={route.key} descriptor={descriptor} />
|
|
86
|
+
</ScreenComposer>
|
|
87
|
+
</Screen>
|
|
88
|
+
);
|
|
89
|
+
})}
|
|
90
|
+
</ScreenContainer>
|
|
91
|
+
</Overlay.Container>
|
|
92
|
+
</Fragment>
|
|
93
|
+
);
|
|
94
|
+
},
|
|
95
|
+
),
|
|
104
96
|
);
|
|
105
97
|
|
|
106
98
|
const styles = StyleSheet.create({
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { useLayoutEffect } from "react";
|
|
2
|
-
import { useAnimatedReaction } from "react-native-reanimated";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { AnimationStore } from "../../stores/animation.store";
|
|
8
|
-
import { startScreenTransition } from "../../utils/animation/start-screen-transition";
|
|
9
|
-
import { resetStoresForScreen } from "../../utils/reset-stores-for-screen";
|
|
2
|
+
import { runOnJS, useAnimatedReaction } from "react-native-reanimated";
|
|
3
|
+
import { useHighRefreshRate } from "../../shared/hooks/animation/use-high-refresh-rate";
|
|
4
|
+
import useStableCallback from "../../shared/hooks/use-stable-callback";
|
|
5
|
+
import { useKeys } from "../../shared/providers/screen/keys.provider";
|
|
6
|
+
import { useManagedStackContext } from "../../shared/providers/stack/managed.provider";
|
|
7
|
+
import { AnimationStore } from "../../shared/stores/animation.store";
|
|
8
|
+
import { startScreenTransition } from "../../shared/utils/animation/start-screen-transition";
|
|
9
|
+
import { resetStoresForScreen } from "../../shared/utils/reset-stores-for-screen";
|
|
10
|
+
import type { BlankStackDescriptor } from "../types";
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
interface Props {
|
|
12
13
|
children: React.ReactNode;
|
|
13
14
|
}
|
|
14
15
|
|
|
@@ -17,16 +18,20 @@ export interface Props {
|
|
|
17
18
|
*/
|
|
18
19
|
export const BlankStackScreenLifecycleController = ({ children }: Props) => {
|
|
19
20
|
const { current } = useKeys<BlankStackDescriptor>();
|
|
20
|
-
const { handleCloseRoute, closingRouteKeysShared } =
|
|
21
|
-
useStackNavigationContext();
|
|
21
|
+
const { handleCloseRoute, closingRouteKeysShared } = useManagedStackContext();
|
|
22
22
|
|
|
23
23
|
const animations = AnimationStore.getAll(current.route.key);
|
|
24
24
|
|
|
25
|
+
const { deactivateHighRefreshRate, activateHighRefreshRate } =
|
|
26
|
+
useHighRefreshRate(current);
|
|
27
|
+
|
|
25
28
|
const handleInitialize = useStableCallback(() => {
|
|
29
|
+
activateHighRefreshRate();
|
|
26
30
|
startScreenTransition({
|
|
27
31
|
target: "open",
|
|
28
32
|
spec: current.options.transitionSpec,
|
|
29
33
|
animations,
|
|
34
|
+
onAnimationFinish: deactivateHighRefreshRate,
|
|
30
35
|
});
|
|
31
36
|
});
|
|
32
37
|
|
|
@@ -35,6 +40,7 @@ export const BlankStackScreenLifecycleController = ({ children }: Props) => {
|
|
|
35
40
|
});
|
|
36
41
|
|
|
37
42
|
const handleCloseEnd = useStableCallback((finished: boolean) => {
|
|
43
|
+
deactivateHighRefreshRate();
|
|
38
44
|
if (!finished) {
|
|
39
45
|
return;
|
|
40
46
|
}
|
|
@@ -50,6 +56,7 @@ export const BlankStackScreenLifecycleController = ({ children }: Props) => {
|
|
|
50
56
|
return;
|
|
51
57
|
}
|
|
52
58
|
|
|
59
|
+
runOnJS(activateHighRefreshRate)();
|
|
53
60
|
startScreenTransition({
|
|
54
61
|
target: "close",
|
|
55
62
|
spec: current.options.transitionSpec,
|