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
package/README.md
CHANGED
|
@@ -211,51 +211,85 @@ import { interpolate } from "react-native-reanimated";
|
|
|
211
211
|
|
|
212
212
|
### Interpolator Props
|
|
213
213
|
|
|
214
|
-
| Prop
|
|
215
|
-
|
|
|
216
|
-
| `progress`
|
|
217
|
-
| `stackProgress`
|
|
218
|
-
| `current`
|
|
219
|
-
| `previous`
|
|
220
|
-
| `next`
|
|
221
|
-
| `layouts.screen`
|
|
222
|
-
| `insets`
|
|
223
|
-
| `focused`
|
|
224
|
-
| `active`
|
|
225
|
-
| `
|
|
226
|
-
| `
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
### Screen State (`current`, `previous`, `next`)
|
|
214
|
+
| Prop | Description |
|
|
215
|
+
| ---------------- | -------------------------------------------------------- |
|
|
216
|
+
| `progress` | Combined progress (0-2). 0=entering, 1=active, 2=exiting |
|
|
217
|
+
| `stackProgress` | Accumulated progress across entire stack (0, 1, 2, 3...) |
|
|
218
|
+
| `current` | Current screen state (progress, closing, gesture, meta) |
|
|
219
|
+
| `previous` | Previous screen state (may be undefined) |
|
|
220
|
+
| `next` | Next screen state (may be undefined) |
|
|
221
|
+
| `layouts.screen` | Screen dimensions `{ width, height }` |
|
|
222
|
+
| `insets` | Safe area insets `{ top, right, bottom, left }` |
|
|
223
|
+
| `focused` | Whether current screen is the topmost |
|
|
224
|
+
| `active` | The screen driving the transition |
|
|
225
|
+
| `inactive` | The screen NOT driving the transition |
|
|
226
|
+
| `bounds` | Function to access shared element positions |
|
|
227
|
+
|
|
228
|
+
### Screen State (`current`, `previous`, `next`, `active`, `inactive`)
|
|
230
229
|
|
|
231
230
|
Each screen state contains:
|
|
232
231
|
|
|
233
|
-
| Property
|
|
234
|
-
|
|
|
235
|
-
| `progress`
|
|
236
|
-
| `closing`
|
|
237
|
-
| `animating
|
|
238
|
-
| `gesture`
|
|
239
|
-
| `meta`
|
|
232
|
+
| Property | Description |
|
|
233
|
+
| ----------- | ----------------------------------------------------- |
|
|
234
|
+
| `progress` | Animation progress for this screen (0 or 1) |
|
|
235
|
+
| `closing` | Whether screen is closing (0 or 1) |
|
|
236
|
+
| `animating` | Whether screen is currently animating (0 or 1) |
|
|
237
|
+
| `gesture` | Gesture values (x, y, normalizedX, normalizedY, etc.) |
|
|
238
|
+
| `meta` | Custom metadata from screen options |
|
|
239
|
+
|
|
240
|
+
### Understanding `active` and `inactive`
|
|
241
|
+
|
|
242
|
+
The `active` and `inactive` props help you write cleaner conditional logic:
|
|
243
|
+
|
|
244
|
+
- **`active`** – The screen driving the transition. When focused, this is `current`. When not focused, this is `next`.
|
|
245
|
+
- **`inactive`** – The screen NOT driving the transition. When focused, this is `previous`. When not focused, this is `current`.
|
|
246
|
+
|
|
247
|
+
```tsx
|
|
248
|
+
// Check if the inactive screen wants to disable an animation
|
|
249
|
+
const disableTranslateY = props.inactive?.meta?.disableTranslateYAnimation;
|
|
250
|
+
|
|
251
|
+
// Check if the active screen is animating or closing
|
|
252
|
+
const isAnimating = props.active.animating;
|
|
253
|
+
const isClosing = props.active.closing;
|
|
254
|
+
```
|
|
240
255
|
|
|
241
256
|
### Using `meta` for Conditional Logic
|
|
242
257
|
|
|
243
258
|
Use `meta` to pass custom data for conditional animation logic. This is more robust than checking route names:
|
|
244
259
|
|
|
245
260
|
```tsx
|
|
246
|
-
//
|
|
261
|
+
// Screen A sets meta to affect how Screen B animates
|
|
247
262
|
<Stack.Screen
|
|
248
|
-
name="
|
|
263
|
+
name="ScreenA"
|
|
264
|
+
options={{
|
|
265
|
+
meta: { disableTranslateYAnimation: true },
|
|
266
|
+
}}
|
|
267
|
+
/>
|
|
268
|
+
|
|
269
|
+
// Screen B checks inactive screen's meta
|
|
270
|
+
<Stack.Screen
|
|
271
|
+
name="ScreenB"
|
|
249
272
|
options={{
|
|
250
|
-
|
|
251
|
-
screenStyleInterpolator: ({ progress }) => {
|
|
273
|
+
screenStyleInterpolator: (props) => {
|
|
252
274
|
"worklet";
|
|
253
|
-
|
|
275
|
+
|
|
276
|
+
// When entering from ScreenA, inactive = ScreenA (previous)
|
|
277
|
+
// When going back to ScreenA, inactive = ScreenB (current)
|
|
278
|
+
const disableY = props.inactive?.meta?.disableTranslateYAnimation;
|
|
279
|
+
|
|
280
|
+
return {
|
|
281
|
+
contentStyle: {
|
|
282
|
+
transform: [{ translateY: disableY ? 0 : translateY }],
|
|
283
|
+
},
|
|
284
|
+
};
|
|
254
285
|
},
|
|
255
286
|
}}
|
|
256
287
|
/>
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
You can also react to screen state changes within components:
|
|
257
291
|
|
|
258
|
-
|
|
292
|
+
```tsx
|
|
259
293
|
const animation = useScreenAnimation();
|
|
260
294
|
|
|
261
295
|
useAnimatedReaction(
|
|
@@ -390,11 +424,11 @@ screenStyleInterpolator: ({ bounds, progress }) => {
|
|
|
390
424
|
};
|
|
391
425
|
```
|
|
392
426
|
|
|
393
|
-
| Method
|
|
394
|
-
|
|
|
395
|
-
| `bounds.getLink(id)`
|
|
396
|
-
| `bounds.interpolateStyle(id, prop, fallback?)` | Interpolate a numeric style between source and dest
|
|
397
|
-
| `bounds.getSnapshot(id, key)`
|
|
427
|
+
| Method | Description |
|
|
428
|
+
| ---------------------------------------------- | --------------------------------------------------- |
|
|
429
|
+
| `bounds.getLink(id)` | Get source/destination bounds and styles for a tag |
|
|
430
|
+
| `bounds.interpolateStyle(id, prop, fallback?)` | Interpolate a numeric style between source and dest |
|
|
431
|
+
| `bounds.getSnapshot(id, key)` | Manual lookup by specific screen key (edge cases) |
|
|
398
432
|
|
|
399
433
|
---
|
|
400
434
|
|
|
@@ -508,15 +542,15 @@ An overlay that moves with screen content:
|
|
|
508
542
|
|
|
509
543
|
### Overlay Props
|
|
510
544
|
|
|
511
|
-
| Prop | Description
|
|
512
|
-
| ------------------ |
|
|
513
|
-
| `focusedRoute` | Currently focused route
|
|
514
|
-
| `focusedIndex` | Index of focused screen
|
|
515
|
-
| `routes` | All routes in the stack
|
|
516
|
-
| `meta` | Custom metadata passed from screen options
|
|
517
|
-
| `navigation` | Navigation prop
|
|
518
|
-
| `overlayAnimation` | Animation values with `progress` accumulated across stack
|
|
519
|
-
| `screenAnimation` | Animation values for the current focused screen
|
|
545
|
+
| Prop | Description |
|
|
546
|
+
| ------------------ | --------------------------------------------------------- |
|
|
547
|
+
| `focusedRoute` | Currently focused route |
|
|
548
|
+
| `focusedIndex` | Index of focused screen |
|
|
549
|
+
| `routes` | All routes in the stack |
|
|
550
|
+
| `meta` | Custom metadata passed from screen options |
|
|
551
|
+
| `navigation` | Navigation prop |
|
|
552
|
+
| `overlayAnimation` | Animation values with `progress` accumulated across stack |
|
|
553
|
+
| `screenAnimation` | Animation values for the current focused screen |
|
|
520
554
|
|
|
521
555
|
### Passing Custom Data
|
|
522
556
|
|
|
@@ -616,10 +650,12 @@ transitionSpec: {
|
|
|
616
650
|
|
|
617
651
|
## Masked View Setup
|
|
618
652
|
|
|
619
|
-
Required for `SharedIGImage` and `SharedAppleMusic` presets.
|
|
653
|
+
Required for `SharedIGImage` and `SharedAppleMusic` presets. The masked view creates the "reveal" effect where content appears to expand from the shared element.
|
|
620
654
|
|
|
621
655
|
> **Note**: Requires native code. Will not work in Expo Go.
|
|
622
656
|
|
|
657
|
+
### Installation
|
|
658
|
+
|
|
623
659
|
```bash
|
|
624
660
|
# Expo
|
|
625
661
|
npx expo install @react-native-masked-view/masked-view
|
|
@@ -629,18 +665,100 @@ npm install @react-native-masked-view/masked-view
|
|
|
629
665
|
cd ios && pod install
|
|
630
666
|
```
|
|
631
667
|
|
|
632
|
-
|
|
668
|
+
### Complete Example
|
|
669
|
+
|
|
670
|
+
Here's a full example showing how to set up an Apple Music-style shared element transition:
|
|
671
|
+
|
|
672
|
+
**1. Source Screen** – Tag pressable elements with `sharedBoundTag`:
|
|
673
|
+
|
|
674
|
+
```tsx
|
|
675
|
+
// app/index.tsx
|
|
676
|
+
import { router } from "expo-router";
|
|
677
|
+
import { View } from "react-native";
|
|
678
|
+
import Transition from "react-native-screen-transitions";
|
|
679
|
+
|
|
680
|
+
export default function HomeScreen() {
|
|
681
|
+
return (
|
|
682
|
+
<View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
|
|
683
|
+
<Transition.Pressable
|
|
684
|
+
sharedBoundTag="album-art"
|
|
685
|
+
style={{
|
|
686
|
+
width: 200,
|
|
687
|
+
height: 200,
|
|
688
|
+
backgroundColor: "#1DB954",
|
|
689
|
+
borderRadius: 12,
|
|
690
|
+
}}
|
|
691
|
+
onPress={() => {
|
|
692
|
+
router.push({
|
|
693
|
+
pathname: "/details",
|
|
694
|
+
params: { sharedBoundTag: "album-art" },
|
|
695
|
+
});
|
|
696
|
+
}}
|
|
697
|
+
/>
|
|
698
|
+
</View>
|
|
699
|
+
);
|
|
700
|
+
}
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
**2. Destination Screen** – Wrap content with `MaskedView` and match the `sharedBoundTag`:
|
|
633
704
|
|
|
634
705
|
```tsx
|
|
635
|
-
|
|
706
|
+
// app/details.tsx
|
|
707
|
+
import { useLocalSearchParams } from "expo-router";
|
|
708
|
+
import Transition from "react-native-screen-transitions";
|
|
709
|
+
|
|
710
|
+
export default function DetailsScreen() {
|
|
711
|
+
const { sharedBoundTag } = useLocalSearchParams<{ sharedBoundTag: string }>();
|
|
712
|
+
|
|
636
713
|
return (
|
|
637
|
-
<Transition.MaskedView style={{ flex: 1 }}>
|
|
638
|
-
|
|
714
|
+
<Transition.MaskedView style={{ flex: 1, backgroundColor: "#121212" }}>
|
|
715
|
+
<Transition.View
|
|
716
|
+
sharedBoundTag={sharedBoundTag}
|
|
717
|
+
style={{
|
|
718
|
+
backgroundColor: "#1DB954",
|
|
719
|
+
width: 400,
|
|
720
|
+
height: 400,
|
|
721
|
+
alignSelf: "center",
|
|
722
|
+
borderRadius: 12,
|
|
723
|
+
}}
|
|
724
|
+
/>
|
|
725
|
+
{/* Additional screen content */}
|
|
639
726
|
</Transition.MaskedView>
|
|
640
727
|
);
|
|
641
728
|
}
|
|
642
729
|
```
|
|
643
730
|
|
|
731
|
+
**3. Layout** – Apply the shared element preset with dynamic `sharedBoundTag`:
|
|
732
|
+
|
|
733
|
+
```tsx
|
|
734
|
+
// app/_layout.tsx
|
|
735
|
+
import Transition from "react-native-screen-transitions";
|
|
736
|
+
import { Stack } from "./stack";
|
|
737
|
+
|
|
738
|
+
export default function RootLayout() {
|
|
739
|
+
return (
|
|
740
|
+
<Stack>
|
|
741
|
+
<Stack.Screen name="index" />
|
|
742
|
+
<Stack.Screen
|
|
743
|
+
name="details"
|
|
744
|
+
options={({ route }) => ({
|
|
745
|
+
...Transition.Presets.SharedAppleMusic({
|
|
746
|
+
sharedBoundTag: route.params?.sharedBoundTag ?? "",
|
|
747
|
+
}),
|
|
748
|
+
})}
|
|
749
|
+
/>
|
|
750
|
+
</Stack>
|
|
751
|
+
);
|
|
752
|
+
}
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
### How It Works
|
|
756
|
+
|
|
757
|
+
1. `Transition.Pressable` measures its bounds when pressed and stores them with the `sharedBoundTag`
|
|
758
|
+
2. `Transition.View` on the destination screen registers as the target for that tag
|
|
759
|
+
3. `Transition.MaskedView` clips the destination content to the animating shared element bounds
|
|
760
|
+
4. The preset interpolates position, size, and the mask to create the seamless expand/collapse effect
|
|
761
|
+
|
|
644
762
|
---
|
|
645
763
|
|
|
646
764
|
## Native Stack
|
|
@@ -725,6 +843,19 @@ To avoid collisions with custom gesture options, some native options are renamed
|
|
|
725
843
|
|
|
726
844
|
---
|
|
727
845
|
|
|
846
|
+
## Migrating from Earlier Versions
|
|
847
|
+
|
|
848
|
+
### Deprecated Props
|
|
849
|
+
|
|
850
|
+
The following props are deprecated and will be removed in a future version:
|
|
851
|
+
|
|
852
|
+
| Deprecated Prop | Use Instead |
|
|
853
|
+
| ----------------------- | ------------------ |
|
|
854
|
+
| `isActiveTransitioning` | `active.animating` |
|
|
855
|
+
| `isDismissing` | `active.closing` |
|
|
856
|
+
|
|
857
|
+
---
|
|
858
|
+
|
|
728
859
|
## Support
|
|
729
860
|
|
|
730
861
|
This package is developed in my spare time. Updates and bug fixes may take time.
|
|
@@ -7,8 +7,8 @@ exports.Screen = void 0;
|
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
9
9
|
var _reactNativeScreens = require("react-native-screens");
|
|
10
|
+
var _managed = require("../../shared/providers/stack/managed.provider");
|
|
10
11
|
var _animation = require("../../shared/stores/animation.store");
|
|
11
|
-
var _withStackNavigation = require("../utils/with-stack-navigation");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
14
|
var ScreenActivity = /*#__PURE__*/function (ScreenActivity) {
|
|
@@ -30,7 +30,7 @@ const Screen = ({
|
|
|
30
30
|
const {
|
|
31
31
|
activeScreensLimit,
|
|
32
32
|
routes
|
|
33
|
-
} = (0,
|
|
33
|
+
} = (0, _managed.useManagedStackContext)();
|
|
34
34
|
const routesLength = routes.length;
|
|
35
35
|
const sceneProgress = _animation.AnimationStore.getAnimation(routeKey, "progress");
|
|
36
36
|
const sceneClosing = _animation.AnimationStore.getAnimation(routeKey, "closing");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_interopRequireWildcard","_reactNativeScreens","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_interopRequireWildcard","_reactNativeScreens","_managed","_animation","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ScreenActivity","EPSILON","AnimatedScreen","Animated","createAnimatedComponent","RNSScreen","Screen","routeKey","index","isPreloaded","children","freezeOnBlur","shouldFreeze","activeScreensLimit","routes","useManagedStackContext","routesLength","length","sceneProgress","AnimationStore","getAnimation","sceneClosing","screenActivity","useSharedValue","TRANSITIONING_OR_BELOW_TOP","useDerivedValue","INACTIVE","outputValue","ON_TOP","v","interpolate","next","Math","trunc","animatedProps","useAnimatedProps","activity","activityState","pointerEvents","jsx","enabled","style","StyleSheet","absoluteFill","exports"],"sourceRoot":"../../../../src","sources":["blank-stack/components/screens.tsx"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAMA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAAqE,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAE,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,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,EAAEA,YAAa;IAC3BuB,aAAa,EAAEA,aAAc;IAAAxB,QAAA,EAE5BA;EAAQ,CACM,CAAC;AAEnB,CAAC;AAACkC,OAAA,CAAAtC,MAAA,GAAAA,MAAA","ignoreList":[]}
|
|
@@ -4,18 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.StackView = void 0;
|
|
7
|
-
var _elements = require("@react-navigation/elements");
|
|
8
7
|
var _native = require("@react-navigation/native");
|
|
9
|
-
var
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var React = _react;
|
|
10
10
|
var _reactNative = require("react-native");
|
|
11
|
-
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
12
11
|
var _reactNativeScreens = require("react-native-screens");
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var _overlay = require("./overlay");
|
|
12
|
+
var _overlay = require("../../shared/components/overlay");
|
|
13
|
+
var _screenComposer = require("../../shared/providers/screen/screen-composer");
|
|
14
|
+
var _core = require("../../shared/providers/stack/core.provider");
|
|
15
|
+
var _managed = require("../../shared/providers/stack/managed.provider");
|
|
16
|
+
var _blankStackLifecycle = require("../controllers/blank-stack-lifecycle");
|
|
19
17
|
var _screens = require("./screens");
|
|
20
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -38,58 +36,51 @@ const SceneView = /*#__PURE__*/React.memo(function SceneView({
|
|
|
38
36
|
})
|
|
39
37
|
});
|
|
40
38
|
});
|
|
41
|
-
const StackView = exports.StackView = (0,
|
|
39
|
+
const StackView = exports.StackView = (0, _core.withStackCore)({
|
|
40
|
+
TRANSITIONS_ALWAYS_ON: true
|
|
41
|
+
}, (0, _managed.withManagedStack)(({
|
|
42
42
|
descriptors,
|
|
43
43
|
focusedIndex,
|
|
44
|
-
routes,
|
|
45
44
|
scenes,
|
|
46
45
|
shouldShowFloatOverlay
|
|
47
46
|
}) => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const route = scene.route;
|
|
61
|
-
const isFocused = focusedIndex === sceneIndex;
|
|
62
|
-
const isBelowFocused = focusedIndex - 1 === sceneIndex;
|
|
63
|
-
const previousDescriptor = scenes[sceneIndex - 1]?.descriptor ?? undefined;
|
|
64
|
-
const nextDescriptor = scenes[sceneIndex + 1]?.descriptor ?? undefined;
|
|
65
|
-
const isPreloaded = descriptors[route.key] === undefined;
|
|
47
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
48
|
+
children: [shouldShowFloatOverlay ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_overlay.Overlay.Float, {}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_overlay.Overlay.Container, {
|
|
49
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeScreens.ScreenContainer, {
|
|
50
|
+
style: styles.container,
|
|
51
|
+
children: scenes.map((scene, sceneIndex) => {
|
|
52
|
+
const descriptor = scene.descriptor;
|
|
53
|
+
const route = scene.route;
|
|
54
|
+
const isFocused = focusedIndex === sceneIndex;
|
|
55
|
+
const isBelowFocused = focusedIndex - 1 === sceneIndex;
|
|
56
|
+
const previousDescriptor = scenes[sceneIndex - 1]?.descriptor ?? undefined;
|
|
57
|
+
const nextDescriptor = scenes[sceneIndex + 1]?.descriptor ?? undefined;
|
|
58
|
+
const isPreloaded = descriptors[route.key] === undefined;
|
|
66
59
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
})
|
|
85
|
-
}, route.key);
|
|
60
|
+
// On Fabric, when screen is frozen, animated and reanimated values are not updated
|
|
61
|
+
// due to component being unmounted. To avoid this, we don't freeze the previous screen there
|
|
62
|
+
const shouldFreeze = isFabric() ? !isPreloaded && !isFocused && !isBelowFocused : !isPreloaded && !isFocused;
|
|
63
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_screens.Screen, {
|
|
64
|
+
isPreloaded: isPreloaded,
|
|
65
|
+
index: sceneIndex,
|
|
66
|
+
routeKey: route.key,
|
|
67
|
+
shouldFreeze: shouldFreeze,
|
|
68
|
+
freezeOnBlur: descriptor.options.freezeOnBlur,
|
|
69
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_screenComposer.ScreenComposer, {
|
|
70
|
+
previous: previousDescriptor,
|
|
71
|
+
current: descriptor,
|
|
72
|
+
next: nextDescriptor,
|
|
73
|
+
LifecycleController: _blankStackLifecycle.BlankStackScreenLifecycleController,
|
|
74
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SceneView, {
|
|
75
|
+
descriptor: descriptor
|
|
76
|
+
}, route.key)
|
|
86
77
|
})
|
|
87
|
-
})
|
|
78
|
+
}, route.key);
|
|
88
79
|
})
|
|
89
80
|
})
|
|
90
|
-
})
|
|
81
|
+
})]
|
|
91
82
|
});
|
|
92
|
-
});
|
|
83
|
+
}));
|
|
93
84
|
const styles = _reactNative.StyleSheet.create({
|
|
94
85
|
container: {
|
|
95
86
|
flex: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_native","require","_react","_interopRequireWildcard","React","_reactNative","_reactNativeScreens","_overlay","_screenComposer","_core","_managed","_blankStackLifecycle","_screens","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","isFabric","global","SceneView","memo","descriptor","route","navigation","render","jsx","NavigationContext","Provider","value","children","jsxs","NavigationRouteContext","options","overlayMode","Overlay","Screen","StackView","exports","withStackCore","TRANSITIONS_ALWAYS_ON","withManagedStack","descriptors","focusedIndex","scenes","shouldShowFloatOverlay","Fragment","Float","Container","ScreenContainer","style","styles","container","map","scene","sceneIndex","isFocused","isBelowFocused","previousDescriptor","undefined","nextDescriptor","isPreloaded","key","shouldFreeze","index","routeKey","freezeOnBlur","ScreenComposer","previous","current","next","LifecycleController","BlankStackScreenLifecycleController","StyleSheet","create","flex"],"sourceRoot":"../../../../src","sources":["blank-stack/components/stack-view.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA+B,IAAAG,KAAA,GAAAF,MAAA;AAE/B,IAAAG,YAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,oBAAA,GAAAV,OAAA;AAKA,IAAAW,QAAA,GAAAX,OAAA;AAAmC,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAE,wBAAAW,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MA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":[]}
|
|
@@ -6,12 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.BlankStackScreenLifecycleController = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
-
var
|
|
10
|
-
var _useStableCallback = _interopRequireDefault(require("../../hooks/use-stable-callback"));
|
|
11
|
-
var _keys = require("../../providers/keys.provider");
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
9
|
+
var _useHighRefreshRate = require("../../shared/hooks/animation/use-high-refresh-rate");
|
|
10
|
+
var _useStableCallback = _interopRequireDefault(require("../../shared/hooks/use-stable-callback"));
|
|
11
|
+
var _keys = require("../../shared/providers/screen/keys.provider");
|
|
12
|
+
var _managed = require("../../shared/providers/stack/managed.provider");
|
|
13
|
+
var _animation = require("../../shared/stores/animation.store");
|
|
14
|
+
var _startScreenTransition = require("../../shared/utils/animation/start-screen-transition");
|
|
15
|
+
var _resetStoresForScreen = require("../../shared/utils/reset-stores-for-screen");
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
17
|
/**
|
|
17
18
|
* Lifecycle controller built out for Blank Stack implementation.
|
|
@@ -25,19 +26,26 @@ const BlankStackScreenLifecycleController = ({
|
|
|
25
26
|
const {
|
|
26
27
|
handleCloseRoute,
|
|
27
28
|
closingRouteKeysShared
|
|
28
|
-
} = (0,
|
|
29
|
+
} = (0, _managed.useManagedStackContext)();
|
|
29
30
|
const animations = _animation.AnimationStore.getAll(current.route.key);
|
|
31
|
+
const {
|
|
32
|
+
deactivateHighRefreshRate,
|
|
33
|
+
activateHighRefreshRate
|
|
34
|
+
} = (0, _useHighRefreshRate.useHighRefreshRate)(current);
|
|
30
35
|
const handleInitialize = (0, _useStableCallback.default)(() => {
|
|
36
|
+
activateHighRefreshRate();
|
|
31
37
|
(0, _startScreenTransition.startScreenTransition)({
|
|
32
38
|
target: "open",
|
|
33
39
|
spec: current.options.transitionSpec,
|
|
34
|
-
animations
|
|
40
|
+
animations,
|
|
41
|
+
onAnimationFinish: deactivateHighRefreshRate
|
|
35
42
|
});
|
|
36
43
|
});
|
|
37
44
|
const handleCleanup = (0, _useStableCallback.default)(() => {
|
|
38
45
|
(0, _resetStoresForScreen.resetStoresForScreen)(current);
|
|
39
46
|
});
|
|
40
47
|
const handleCloseEnd = (0, _useStableCallback.default)(finished => {
|
|
48
|
+
deactivateHighRefreshRate();
|
|
41
49
|
if (!finished) {
|
|
42
50
|
return;
|
|
43
51
|
}
|
|
@@ -53,6 +61,7 @@ const BlankStackScreenLifecycleController = ({
|
|
|
53
61
|
if (!keys.includes(current.route.key)) {
|
|
54
62
|
return;
|
|
55
63
|
}
|
|
64
|
+
(0, _reactNativeReanimated.runOnJS)(activateHighRefreshRate)();
|
|
56
65
|
(0, _startScreenTransition.startScreenTransition)({
|
|
57
66
|
target: "close",
|
|
58
67
|
spec: current.options.transitionSpec,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_useHighRefreshRate","_useStableCallback","_interopRequireDefault","_keys","_managed","_animation","_startScreenTransition","_resetStoresForScreen","e","__esModule","default","BlankStackScreenLifecycleController","children","current","useKeys","handleCloseRoute","closingRouteKeysShared","useManagedStackContext","animations","AnimationStore","getAll","route","key","deactivateHighRefreshRate","activateHighRefreshRate","useHighRefreshRate","handleInitialize","useStableCallback","startScreenTransition","target","spec","options","transitionSpec","onAnimationFinish","handleCleanup","resetStoresForScreen","handleCloseEnd","finished","useAnimatedReaction","keys","value","includes","runOnJS","useLayoutEffect","exports"],"sourceRoot":"../../../../src","sources":["blank-stack/controllers/blank-stack-lifecycle.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA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;IAAM,CAAC,CAAC;EAC3C,CAAC,CAAC;EAEF,IAAAiB,0CAAmB,EAClB,OAAO;IACNC,IAAI,EAAEvB,sBAAsB,CAACwB;EAC9B,CAAC,CAAC,EACF,CAAC;IAAED;EAAK,CAAC,KAAK;IACb,IAAI,CAACA,IAAI,CAACE,QAAQ,CAAC5B,OAAO,CAACQ,KAAK,CAACC,GAAG,CAAC,EAAE;MACtC;IACD;IAEA,IAAAoB,8BAAO,EAAClB,uBAAuB,CAAC,CAAC,CAAC;IAClC,IAAAI,4CAAqB,EAAC;MACrBC,MAAM,EAAE,OAAO;MACfC,IAAI,EAAEjB,OAAO,CAACkB,OAAO,CAACC,cAAc;MACpCd,UAAU;MACVe,iBAAiB,EAAEG;IACpB,CAAC,CAAC;EACH,CACD,CAAC;EAED,IAAAO,sBAAe,EAAC,MAAM;IACrBjB,gBAAgB,CAAC,CAAC;IAClB,OAAO,MAAM;MACZQ,aAAa,CAAC,CAAC;IAChB,CAAC;EACF,CAAC,EAAE,CAACR,gBAAgB,EAAEQ,aAAa,CAAC,CAAC;EAErC,OAAOtB,QAAQ;AAChB,CAAC;AAACgC,OAAA,CAAAjC,mCAAA,GAAAA,mCAAA","ignoreList":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ComponentView = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var React = _react;
|
|
9
|
+
var _reactNative = require("react-native");
|
|
10
|
+
var _overlay = require("../../shared/components/overlay");
|
|
11
|
+
var _screenComposer = require("../../shared/providers/screen/screen-composer");
|
|
12
|
+
var _core = require("../../shared/providers/stack/core.provider");
|
|
13
|
+
var _managed = require("../../shared/providers/stack/managed.provider");
|
|
14
|
+
var _componentStackLifecycle = require("../controllers/component-stack-lifecycle");
|
|
15
|
+
var _screens = require("./screens");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
18
|
+
const SceneView = /*#__PURE__*/React.memo(function SceneView({
|
|
19
|
+
descriptor
|
|
20
|
+
}) {
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
22
|
+
children: [descriptor.options.overlayMode === "screen" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_overlay.Overlay.Screen, {}), descriptor.render()]
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
const ComponentView = exports.ComponentView = (0, _core.withStackCore)({
|
|
26
|
+
TRANSITIONS_ALWAYS_ON: true
|
|
27
|
+
}, (0, _managed.withManagedStack)(({
|
|
28
|
+
scenes,
|
|
29
|
+
shouldShowFloatOverlay
|
|
30
|
+
}) => {
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
32
|
+
children: [shouldShowFloatOverlay ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_overlay.Overlay.Float, {}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_overlay.Overlay.Container, {
|
|
33
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
34
|
+
style: styles.container,
|
|
35
|
+
children: scenes.map((scene, sceneIndex) => {
|
|
36
|
+
const descriptor = scene.descriptor;
|
|
37
|
+
const route = scene.route;
|
|
38
|
+
const previousDescriptor = scenes[sceneIndex - 1]?.descriptor;
|
|
39
|
+
const nextDescriptor = scenes[sceneIndex + 1]?.descriptor;
|
|
40
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_screens.Screen, {
|
|
41
|
+
index: sceneIndex,
|
|
42
|
+
routeKey: route.key,
|
|
43
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_screenComposer.ScreenComposer, {
|
|
44
|
+
previous: previousDescriptor,
|
|
45
|
+
current: descriptor,
|
|
46
|
+
next: nextDescriptor,
|
|
47
|
+
LifecycleController: _componentStackLifecycle.ComponentStackScreenLifecycleController,
|
|
48
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SceneView, {
|
|
49
|
+
descriptor: descriptor
|
|
50
|
+
}, route.key)
|
|
51
|
+
})
|
|
52
|
+
}, route.key);
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
}));
|
|
58
|
+
const styles = _reactNative.StyleSheet.create({
|
|
59
|
+
container: {
|
|
60
|
+
flex: 1
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=component-view.js.map
|