react-native-screen-transitions 3.1.0 → 3.2.0-beta.1
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 +103 -8
- package/lib/commonjs/blank-stack/components/adjusted-screen-container.js +36 -0
- package/lib/commonjs/blank-stack/components/adjusted-screen-container.js.map +1 -0
- package/lib/commonjs/blank-stack/components/{screens.js → adjusted-screen.js} +33 -13
- package/lib/commonjs/blank-stack/components/adjusted-screen.js.map +1 -0
- package/lib/commonjs/blank-stack/components/stack-view.js +44 -61
- package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/blank-stack/components/stack-view.native.js +81 -0
- package/lib/commonjs/blank-stack/components/stack-view.native.js.map +1 -0
- package/lib/commonjs/component-stack/components/component-screen-container.js +23 -0
- package/lib/commonjs/component-stack/components/component-screen-container.js.map +1 -0
- package/lib/commonjs/component-stack/components/component-screen.js +36 -0
- package/lib/commonjs/component-stack/components/component-screen.js.map +1 -0
- package/lib/commonjs/component-stack/components/stack-view.js +64 -0
- package/lib/commonjs/component-stack/components/stack-view.js.map +1 -0
- package/lib/commonjs/component-stack/index.js +13 -0
- package/lib/commonjs/component-stack/index.js.map +1 -0
- package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js +52 -0
- package/lib/commonjs/component-stack/navigators/create-component-stack-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 +114 -117
- 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 +39 -0
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/index.js +13 -0
- package/lib/commonjs/shared/components/overlay/index.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 +4 -31
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/{components/controllers/blank-stack-lifecycle.js → controller/managed-lifecycle.js} +25 -19
- package/lib/commonjs/shared/controller/managed-lifecycle.js.map +1 -0
- 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 +36 -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 +18 -11
- package/lib/commonjs/shared/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/shared/hooks/gestures/use-build-gestures.js +4 -2
- 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/hooks/reanimated/use-shared-value-state.js +5 -0
- package/lib/commonjs/shared/hooks/reanimated/use-shared-value-state.js.map +1 -1
- 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/layout-anchor.provider.js +73 -0
- package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/register-bounds.provider.js +19 -8
- 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/screen/styles.provider.js +95 -0
- package/lib/commonjs/shared/providers/screen/styles.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/core.provider.js +84 -0
- package/lib/commonjs/shared/providers/stack/core.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/direct.provider.js +160 -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 +157 -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/{core.types.js → screen.types.js} +1 -1
- package/lib/commonjs/shared/types/screen.types.js.map +1 -0
- package/lib/commonjs/shared/types/stack.types.js +32 -0
- package/lib/commonjs/shared/types/stack.types.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/index.js +13 -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 +70 -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/adjusted-screen-container.js +31 -0
- package/lib/module/blank-stack/components/adjusted-screen-container.js.map +1 -0
- package/lib/module/blank-stack/components/{screens.js → adjusted-screen.js} +32 -12
- package/lib/module/blank-stack/components/adjusted-screen.js.map +1 -0
- package/lib/module/blank-stack/components/stack-view.js +43 -60
- package/lib/module/blank-stack/components/stack-view.js.map +1 -1
- package/lib/module/blank-stack/components/stack-view.native.js +76 -0
- package/lib/module/blank-stack/components/stack-view.native.js.map +1 -0
- package/lib/module/component-stack/components/component-screen-container.js +18 -0
- package/lib/module/component-stack/components/component-screen-container.js.map +1 -0
- package/lib/module/component-stack/components/component-screen.js +30 -0
- package/lib/module/component-stack/components/component-screen.js.map +1 -0
- package/lib/module/component-stack/components/stack-view.js +59 -0
- package/lib/module/component-stack/components/stack-view.js.map +1 -0
- package/lib/module/component-stack/index.js +4 -0
- package/lib/module/component-stack/index.js.map +1 -0
- package/lib/module/component-stack/navigators/create-component-stack-navigator.js +48 -0
- package/lib/module/component-stack/navigators/create-component-stack-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 +115 -118
- 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 +35 -0
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js.map +1 -0
- package/lib/module/shared/components/overlay/index.js +9 -0
- package/lib/module/shared/components/overlay/index.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 +2 -29
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/controller/managed-lifecycle.js +72 -0
- package/lib/module/shared/controller/managed-lifecycle.js.map +1 -0
- 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 +31 -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 +18 -11
- package/lib/module/shared/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/module/shared/hooks/gestures/use-build-gestures.js +5 -3
- 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/hooks/reanimated/use-shared-value-state.js +5 -0
- package/lib/module/shared/hooks/reanimated/use-shared-value-state.js.map +1 -1
- 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/layout-anchor.provider.js +67 -0
- package/lib/module/shared/providers/layout-anchor.provider.js.map +1 -0
- package/lib/module/shared/providers/register-bounds.provider.js +19 -8
- 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/screen/styles.provider.js +90 -0
- package/lib/module/shared/providers/screen/styles.provider.js.map +1 -0
- package/lib/module/shared/providers/stack/core.provider.js +78 -0
- package/lib/module/shared/providers/stack/core.provider.js.map +1 -0
- package/lib/module/shared/providers/stack/direct.provider.js +155 -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 +152 -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 +33 -0
- package/lib/module/shared/types/stack.types.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/index.js +13 -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 +65 -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/adjusted-screen-container.d.ts +6 -0
- package/lib/typescript/blank-stack/components/adjusted-screen-container.d.ts.map +1 -0
- package/lib/typescript/blank-stack/components/{screens.d.ts → adjusted-screen.d.ts} +2 -2
- package/lib/typescript/blank-stack/components/adjusted-screen.d.ts.map +1 -0
- 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/blank-stack/components/stack-view.native.d.ts +4 -0
- package/lib/typescript/blank-stack/components/stack-view.native.d.ts.map +1 -0
- package/lib/typescript/blank-stack/types.d.ts +10 -49
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/component-stack/components/component-screen-container.d.ts +6 -0
- package/lib/typescript/component-stack/components/component-screen-container.d.ts.map +1 -0
- package/lib/typescript/component-stack/components/component-screen.d.ts +8 -0
- package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -0
- package/lib/typescript/component-stack/components/stack-view.d.ts +4 -0
- package/lib/typescript/component-stack/components/stack-view.d.ts.map +1 -0
- package/lib/typescript/component-stack/index.d.ts +3 -0
- package/lib/typescript/component-stack/index.d.ts.map +1 -0
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +16 -0
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -0
- package/lib/typescript/component-stack/types.d.ts +39 -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 +11 -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 +7 -0
- package/lib/typescript/shared/components/overlay/index.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 +2 -16
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/controller/managed-lifecycle.d.ts +9 -0
- package/lib/typescript/shared/controller/managed-lifecycle.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/animation/use-high-refresh-rate.d.ts +13 -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 +2 -1
- 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 +66 -0
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/reanimated/use-shared-value-state.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +41 -43
- 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/layout-anchor.provider.d.ts +34 -0
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +1 -0
- 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 +22 -0
- package/lib/typescript/shared/providers/stack/core.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts +34 -0
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/helpers/active-screens-limit.d.ts +9 -0
- package/lib/typescript/shared/providers/stack/helpers/active-screens-limit.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/helpers/use-local-routes.d.ts +19 -0
- package/lib/typescript/shared/providers/stack/helpers/use-local-routes.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts +39 -0
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts.map +1 -0
- package/lib/typescript/shared/stores/animation.store.d.ts +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/gesture.store.d.ts +2 -2
- package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +3 -3
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +1 -0
- package/lib/typescript/shared/types/bounds.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 +39 -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 +55 -0
- package/lib/typescript/shared/types/stack.types.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts +2 -1
- package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles.d.ts +1 -2
- package/lib/typescript/shared/utils/bounds/helpers/styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/index.d.ts +1 -9
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/builder.d.ts +9 -8
- package/lib/typescript/shared/utils/bounds/types/builder.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/geometry.d.ts +2 -1
- package/lib/typescript/shared/utils/bounds/types/geometry.d.ts.map +1 -1
- package/lib/typescript/shared/utils/create-provider.d.ts.map +1 -1
- package/lib/typescript/shared/utils/gesture/check-gesture-activation.d.ts +1 -1
- package/lib/typescript/shared/utils/gesture/check-gesture-activation.d.ts.map +1 -1
- package/lib/typescript/shared/utils/navigation/align-routes-with-latest.d.ts +13 -0
- package/lib/typescript/shared/utils/navigation/align-routes-with-latest.d.ts.map +1 -0
- package/lib/typescript/shared/utils/navigation/are-descriptors-equal.d.ts +2 -0
- package/lib/typescript/shared/utils/navigation/are-descriptors-equal.d.ts.map +1 -0
- package/lib/typescript/shared/utils/navigation/compose-descriptors.d.ts +6 -0
- package/lib/typescript/shared/utils/navigation/compose-descriptors.d.ts.map +1 -0
- package/lib/typescript/shared/utils/navigation/have-same-route-keys.d.ts +6 -0
- package/lib/typescript/shared/utils/navigation/have-same-route-keys.d.ts.map +1 -0
- package/lib/typescript/shared/utils/navigation/routes-are-identical.d.ts +6 -0
- package/lib/typescript/shared/utils/navigation/routes-are-identical.d.ts.map +1 -0
- package/lib/typescript/shared/utils/navigation/sync-routes-with-removed.d.ts +21 -0
- package/lib/typescript/shared/utils/navigation/sync-routes-with-removed.d.ts.map +1 -0
- package/lib/typescript/shared/utils/read-shared-value.d.ts +7 -0
- package/lib/typescript/shared/utils/read-shared-value.d.ts.map +1 -0
- package/lib/typescript/shared/utils/reset-stores-for-screen.d.ts +4 -3
- package/lib/typescript/shared/utils/reset-stores-for-screen.d.ts.map +1 -1
- package/package.json +7 -2
- package/src/blank-stack/components/adjusted-screen-container.tsx +25 -0
- package/src/blank-stack/components/{screens.tsx → adjusted-screen.tsx} +35 -14
- package/src/blank-stack/components/stack-view.native.tsx +94 -0
- package/src/blank-stack/components/stack-view.tsx +60 -74
- package/src/blank-stack/types.ts +12 -63
- package/src/component-stack/components/component-screen-container.tsx +15 -0
- package/src/component-stack/components/component-screen.tsx +40 -0
- package/src/component-stack/components/stack-view.tsx +74 -0
- package/src/component-stack/index.ts +10 -0
- package/src/component-stack/navigators/create-component-stack-navigator.tsx +88 -0
- package/src/component-stack/types.ts +101 -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 +138 -167
- package/src/shared/__tests__/sync-routes-with-removed.test.ts +137 -0
- package/src/shared/components/create-transition-aware-component.tsx +5 -6
- package/src/shared/components/overlay/helpers/get-active-overlay.ts +38 -0
- package/src/shared/components/overlay/index.ts +7 -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 +3 -32
- package/src/shared/controller/managed-lifecycle.tsx +73 -0
- package/src/shared/hooks/animation/use-associated-style.tsx +2 -2
- package/src/shared/hooks/animation/use-high-refresh-rate.tsx +34 -0
- package/src/shared/hooks/animation/use-screen-animation.tsx +24 -18
- package/src/shared/hooks/gestures/use-build-gestures.tsx +10 -3
- 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 +89 -0
- package/src/shared/hooks/reanimated/use-shared-value-state.ts +5 -0
- package/src/shared/index.ts +8 -3
- package/src/shared/providers/gestures.provider.tsx +6 -2
- package/src/shared/providers/layout-anchor.provider.tsx +81 -0
- package/src/shared/providers/register-bounds.provider.tsx +23 -9
- package/src/shared/providers/{keys.provider.tsx → screen/keys.provider.tsx} +25 -10
- package/src/shared/providers/screen/screen-composer.tsx +38 -0
- package/src/shared/providers/screen/styles.provider.tsx +120 -0
- package/src/shared/providers/stack/core.provider.tsx +87 -0
- package/src/shared/providers/stack/direct.provider.tsx +231 -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 +229 -0
- package/src/shared/stores/animation.store.ts +1 -1
- package/src/shared/stores/bounds.store.ts +4 -5
- package/src/shared/stores/gesture.store.ts +2 -2
- package/src/shared/types/animation.types.ts +3 -3
- package/src/shared/types/bounds.types.ts +5 -0
- package/src/shared/types/gesture.types.ts +0 -2
- package/src/shared/types/index.ts +46 -0
- package/src/shared/types/overlay.types.ts +49 -0
- package/src/shared/types/{core.types.ts → screen.types.ts} +34 -7
- package/src/shared/types/stack.types.ts +63 -0
- package/src/shared/utils/bounds/helpers/geometry.ts +1 -1
- package/src/shared/utils/bounds/helpers/style-composers.ts +1 -1
- package/src/shared/utils/bounds/helpers/styles.ts +1 -2
- package/src/shared/utils/bounds/index.ts +19 -10
- 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 +102 -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/components/screens.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 +0 -62
- package/lib/commonjs/shared/providers/transition-styles.provider.js.map +0 -1
- package/lib/commonjs/shared/types/core.types.js.map +0 -1
- package/lib/commonjs/shared/types/utils.types.js +0 -2
- package/lib/commonjs/shared/types/utils.types.js.map +0 -1
- 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/components/screens.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 +0 -66
- 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 +0 -56
- 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/components/screens.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 +0 -8
- 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/components/controllers/blank-stack-lifecycle.tsx +0 -70
- package/src/shared/providers/flags.provider.tsx +0 -21
- package/src/shared/providers/routes.provider.tsx +0 -54
- package/src/shared/providers/screen-transition.provider.tsx +0 -41
- package/src/shared/providers/transition-styles.provider.tsx +0 -74
- 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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StyleSheet, View } from "react-native";
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const ComponentScreenContainer = ({ children }: Props) => {
|
|
8
|
+
return <View style={styles.container}>{children}</View>;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const styles = StyleSheet.create({
|
|
12
|
+
container: {
|
|
13
|
+
flex: 1,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { StyleSheet, type View } from "react-native";
|
|
3
|
+
import Animated, {
|
|
4
|
+
useAnimatedProps,
|
|
5
|
+
useAnimatedRef,
|
|
6
|
+
} from "react-native-reanimated";
|
|
7
|
+
import { LayoutAnchorProvider } from "../../shared/providers/layout-anchor.provider";
|
|
8
|
+
import { AnimationStore } from "../../shared/stores/animation.store";
|
|
9
|
+
|
|
10
|
+
interface ScreenProps {
|
|
11
|
+
routeKey: string;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const ComponentScreen = ({ routeKey, children }: ScreenProps) => {
|
|
16
|
+
const sceneClosing = AnimationStore.getAnimation(routeKey, "closing");
|
|
17
|
+
const screenRef = useAnimatedRef<View>();
|
|
18
|
+
|
|
19
|
+
const animatedProps = useAnimatedProps(() => {
|
|
20
|
+
return {
|
|
21
|
+
pointerEvents: sceneClosing.get()
|
|
22
|
+
? ("none" as const)
|
|
23
|
+
: ("box-none" as const),
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const ComponentScreenComponent = Animated.View;
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<ComponentScreenComponent
|
|
31
|
+
ref={screenRef}
|
|
32
|
+
style={StyleSheet.absoluteFill}
|
|
33
|
+
animatedProps={animatedProps}
|
|
34
|
+
>
|
|
35
|
+
<LayoutAnchorProvider anchorRef={screenRef}>
|
|
36
|
+
{children}
|
|
37
|
+
</LayoutAnchorProvider>
|
|
38
|
+
</ComponentScreenComponent>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NavigationContext,
|
|
3
|
+
NavigationRouteContext,
|
|
4
|
+
} from "@react-navigation/native";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { Fragment } from "react";
|
|
7
|
+
import { Overlay } from "../../shared/components/overlay";
|
|
8
|
+
import { ManagedLifecycle } from "../../shared/controller/managed-lifecycle";
|
|
9
|
+
import { ScreenComposer } from "../../shared/providers/screen/screen-composer";
|
|
10
|
+
import { withStackCore } from "../../shared/providers/stack/core.provider";
|
|
11
|
+
import { withManagedStack } from "../../shared/providers/stack/managed.provider";
|
|
12
|
+
import type {
|
|
13
|
+
ComponentStackDescriptor,
|
|
14
|
+
ComponentStackNavigationHelpers,
|
|
15
|
+
} from "../types";
|
|
16
|
+
import { ComponentScreen } from "./component-screen";
|
|
17
|
+
import { ComponentScreenContainer } from "./component-screen-container";
|
|
18
|
+
|
|
19
|
+
type SceneViewProps = {
|
|
20
|
+
descriptor: ComponentStackDescriptor;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const SceneView = React.memo(function SceneView({
|
|
24
|
+
descriptor,
|
|
25
|
+
}: SceneViewProps) {
|
|
26
|
+
const { route, navigation, render } = descriptor;
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<NavigationContext.Provider value={navigation}>
|
|
30
|
+
<NavigationRouteContext.Provider value={route}>
|
|
31
|
+
{descriptor.options.overlayMode === "screen" && <Overlay.Screen />}
|
|
32
|
+
{render()}
|
|
33
|
+
</NavigationRouteContext.Provider>
|
|
34
|
+
</NavigationContext.Provider>
|
|
35
|
+
);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const StackView = withStackCore(
|
|
39
|
+
{ TRANSITIONS_ALWAYS_ON: true },
|
|
40
|
+
withManagedStack<ComponentStackDescriptor, ComponentStackNavigationHelpers>(
|
|
41
|
+
({ scenes, shouldShowFloatOverlay }) => {
|
|
42
|
+
return (
|
|
43
|
+
<Fragment>
|
|
44
|
+
{shouldShowFloatOverlay ? <Overlay.Float /> : null}
|
|
45
|
+
|
|
46
|
+
<ComponentScreenContainer>
|
|
47
|
+
{scenes.map((scene, sceneIndex) => {
|
|
48
|
+
const descriptor = scene.descriptor;
|
|
49
|
+
const route = scene.route;
|
|
50
|
+
|
|
51
|
+
const previousDescriptor =
|
|
52
|
+
scenes[sceneIndex - 1]?.descriptor ?? undefined;
|
|
53
|
+
const nextDescriptor =
|
|
54
|
+
scenes[sceneIndex + 1]?.descriptor ?? undefined;
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<ComponentScreen key={route.key} routeKey={route.key}>
|
|
58
|
+
<ScreenComposer
|
|
59
|
+
previous={previousDescriptor}
|
|
60
|
+
current={descriptor}
|
|
61
|
+
next={nextDescriptor}
|
|
62
|
+
LifecycleController={ManagedLifecycle}
|
|
63
|
+
>
|
|
64
|
+
<SceneView key={route.key} descriptor={descriptor} />
|
|
65
|
+
</ScreenComposer>
|
|
66
|
+
</ComponentScreen>
|
|
67
|
+
);
|
|
68
|
+
})}
|
|
69
|
+
</ComponentScreenContainer>
|
|
70
|
+
</Fragment>
|
|
71
|
+
);
|
|
72
|
+
},
|
|
73
|
+
),
|
|
74
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { createComponentStackNavigator } from "../component-stack/navigators/create-component-stack-navigator";
|
|
2
|
+
export type {
|
|
3
|
+
ComponentStackNavigationEventMap,
|
|
4
|
+
ComponentStackNavigationOptions,
|
|
5
|
+
ComponentStackNavigationProp,
|
|
6
|
+
ComponentStackNavigatorProps,
|
|
7
|
+
ComponentStackOptionsArgs,
|
|
8
|
+
ComponentStackOverlayProps,
|
|
9
|
+
ComponentStackScreenProps,
|
|
10
|
+
} from "../component-stack/types";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createNavigatorFactory,
|
|
3
|
+
NavigationContainer,
|
|
4
|
+
NavigationIndependentTree,
|
|
5
|
+
type NavigatorTypeBagBase,
|
|
6
|
+
type ParamListBase,
|
|
7
|
+
type StackActionHelpers,
|
|
8
|
+
type StackNavigationState,
|
|
9
|
+
StackRouter,
|
|
10
|
+
type StackRouterOptions,
|
|
11
|
+
type StaticConfig,
|
|
12
|
+
type TypedNavigator,
|
|
13
|
+
useNavigationBuilder,
|
|
14
|
+
} from "@react-navigation/native";
|
|
15
|
+
import { StackView } from "../components/stack-view";
|
|
16
|
+
import type {
|
|
17
|
+
ComponentStackNavigationEventMap,
|
|
18
|
+
ComponentStackNavigationOptions,
|
|
19
|
+
ComponentStackNavigationProp,
|
|
20
|
+
ComponentStackNavigatorProps,
|
|
21
|
+
} from "../types";
|
|
22
|
+
|
|
23
|
+
function ComponentStackNavigator({
|
|
24
|
+
id,
|
|
25
|
+
initialRouteName,
|
|
26
|
+
children,
|
|
27
|
+
layout,
|
|
28
|
+
screenListeners,
|
|
29
|
+
screenOptions,
|
|
30
|
+
screenLayout,
|
|
31
|
+
...rest
|
|
32
|
+
}: ComponentStackNavigatorProps) {
|
|
33
|
+
const { state, describe, descriptors, navigation, NavigationContent } =
|
|
34
|
+
useNavigationBuilder<
|
|
35
|
+
StackNavigationState<ParamListBase>,
|
|
36
|
+
StackRouterOptions,
|
|
37
|
+
StackActionHelpers<ParamListBase>,
|
|
38
|
+
ComponentStackNavigationOptions,
|
|
39
|
+
ComponentStackNavigationEventMap
|
|
40
|
+
>(StackRouter, {
|
|
41
|
+
id,
|
|
42
|
+
initialRouteName,
|
|
43
|
+
children,
|
|
44
|
+
layout,
|
|
45
|
+
screenListeners,
|
|
46
|
+
screenOptions,
|
|
47
|
+
screenLayout,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<NavigationIndependentTree>
|
|
52
|
+
<NavigationContainer>
|
|
53
|
+
<NavigationContent>
|
|
54
|
+
<StackView
|
|
55
|
+
{...rest}
|
|
56
|
+
state={state}
|
|
57
|
+
navigation={navigation}
|
|
58
|
+
descriptors={descriptors}
|
|
59
|
+
describe={describe}
|
|
60
|
+
/>
|
|
61
|
+
</NavigationContent>
|
|
62
|
+
</NavigationContainer>
|
|
63
|
+
</NavigationIndependentTree>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function createComponentStackNavigator<
|
|
68
|
+
const ParamList extends ParamListBase,
|
|
69
|
+
const NavigatorID extends string | undefined = undefined,
|
|
70
|
+
const TypeBag extends NavigatorTypeBagBase = {
|
|
71
|
+
ParamList: ParamList;
|
|
72
|
+
NavigatorID: NavigatorID;
|
|
73
|
+
State: StackNavigationState<ParamList>;
|
|
74
|
+
ScreenOptions: ComponentStackNavigationOptions;
|
|
75
|
+
EventMap: ComponentStackNavigationEventMap;
|
|
76
|
+
NavigationList: {
|
|
77
|
+
[RouteName in keyof ParamList]: ComponentStackNavigationProp<
|
|
78
|
+
ParamList,
|
|
79
|
+
RouteName,
|
|
80
|
+
NavigatorID
|
|
81
|
+
>;
|
|
82
|
+
};
|
|
83
|
+
Navigator: typeof ComponentStackNavigator;
|
|
84
|
+
},
|
|
85
|
+
const Config extends StaticConfig<TypeBag> = StaticConfig<TypeBag>,
|
|
86
|
+
>(config?: Config): TypedNavigator<TypeBag, Config> {
|
|
87
|
+
return createNavigatorFactory(ComponentStackNavigator)(config);
|
|
88
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
DefaultNavigatorOptions,
|
|
3
|
+
Descriptor,
|
|
4
|
+
NavigationHelpers,
|
|
5
|
+
NavigationProp,
|
|
6
|
+
ParamListBase,
|
|
7
|
+
Route,
|
|
8
|
+
RouteProp,
|
|
9
|
+
StackActionHelpers,
|
|
10
|
+
StackNavigationState,
|
|
11
|
+
StackRouterOptions,
|
|
12
|
+
Theme,
|
|
13
|
+
} from "@react-navigation/native";
|
|
14
|
+
import type { ScreenTransitionConfig } from "../shared";
|
|
15
|
+
import type { OverlayProps } from "../shared/types/overlay.types";
|
|
16
|
+
|
|
17
|
+
export type ComponentStackNavigationEventMap = {};
|
|
18
|
+
|
|
19
|
+
export type ComponentStackNavigationProp<
|
|
20
|
+
ParamList extends ParamListBase,
|
|
21
|
+
RouteName extends keyof ParamList = string,
|
|
22
|
+
NavigatorID extends string | undefined = undefined,
|
|
23
|
+
> = NavigationProp<
|
|
24
|
+
ParamList,
|
|
25
|
+
RouteName,
|
|
26
|
+
NavigatorID,
|
|
27
|
+
StackNavigationState<ParamList>,
|
|
28
|
+
ComponentStackNavigationOptions,
|
|
29
|
+
ComponentStackNavigationEventMap
|
|
30
|
+
> &
|
|
31
|
+
StackActionHelpers<ParamList>;
|
|
32
|
+
|
|
33
|
+
export type ComponentStackScreenProps<
|
|
34
|
+
ParamList extends ParamListBase,
|
|
35
|
+
RouteName extends keyof ParamList = string,
|
|
36
|
+
NavigatorID extends string | undefined = undefined,
|
|
37
|
+
> = {
|
|
38
|
+
navigation: ComponentStackNavigationProp<ParamList, RouteName, NavigatorID>;
|
|
39
|
+
route: RouteProp<ParamList, RouteName>;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type ComponentStackOptionsArgs<
|
|
43
|
+
ParamList extends ParamListBase,
|
|
44
|
+
RouteName extends keyof ParamList = keyof ParamList,
|
|
45
|
+
NavigatorID extends string | undefined = undefined,
|
|
46
|
+
> = ComponentStackScreenProps<ParamList, RouteName, NavigatorID> & {
|
|
47
|
+
theme: Theme;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type ComponentStackNavigationHelpers = NavigationHelpers<
|
|
51
|
+
ParamListBase,
|
|
52
|
+
ComponentStackNavigationEventMap
|
|
53
|
+
>;
|
|
54
|
+
|
|
55
|
+
export type ComponentStackScene = {
|
|
56
|
+
route: Route<string>;
|
|
57
|
+
descriptor: ComponentStackDescriptor;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
type ComponentStackNavigationConfig = {};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Props passed to overlay components in component-stack.
|
|
64
|
+
* Uses the shared OverlayProps type with component-stack's navigation type.
|
|
65
|
+
*/
|
|
66
|
+
export type ComponentStackOverlayProps = OverlayProps<
|
|
67
|
+
ComponentStackNavigationProp<ParamListBase>
|
|
68
|
+
>;
|
|
69
|
+
|
|
70
|
+
type ComponentStackScreenTransitionConfig = ScreenTransitionConfig & {
|
|
71
|
+
/**
|
|
72
|
+
* Whether to detach the previous screen from the view hierarchy to save memory.
|
|
73
|
+
* Set it to `false` if you need the previous screen to be seen through the active screen.
|
|
74
|
+
* Only applicable if `detachInactiveScreens` isn't set to `false`.
|
|
75
|
+
*/
|
|
76
|
+
detachPreviousScreen?: boolean;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export type ComponentStackNavigationOptions =
|
|
80
|
+
ComponentStackScreenTransitionConfig & {};
|
|
81
|
+
|
|
82
|
+
export type ComponentStackNavigatorProps = DefaultNavigatorOptions<
|
|
83
|
+
ParamListBase,
|
|
84
|
+
string | undefined,
|
|
85
|
+
StackNavigationState<ParamListBase>,
|
|
86
|
+
ComponentStackNavigationOptions,
|
|
87
|
+
ComponentStackNavigationEventMap,
|
|
88
|
+
ComponentStackNavigationProp<ParamListBase>
|
|
89
|
+
> &
|
|
90
|
+
StackRouterOptions &
|
|
91
|
+
ComponentStackNavigationConfig;
|
|
92
|
+
|
|
93
|
+
export type ComponentStackDescriptor = Descriptor<
|
|
94
|
+
ComponentStackNavigationOptions,
|
|
95
|
+
ComponentStackNavigationProp<ParamListBase>,
|
|
96
|
+
RouteProp<ParamListBase>
|
|
97
|
+
>;
|
|
98
|
+
|
|
99
|
+
export type ComponentStackDescriptorMap = {
|
|
100
|
+
[key: string]: ComponentStackDescriptor;
|
|
101
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/** biome-ignore-all lint/style/noNonNullAssertion: <Lifecycles are rendered right under the gesture provider> */
|
|
2
2
|
import { useEffect, useLayoutEffect } from "react";
|
|
3
3
|
import { useDerivedValue } from "react-native-reanimated";
|
|
4
|
-
import
|
|
5
|
-
import { useSharedValueState } from "../../hooks/reanimated/use-shared-value-state";
|
|
6
|
-
import useStableCallback from "../../hooks/use-stable-callback";
|
|
7
|
-
import { useGestureContext } from "../../providers/gestures.provider";
|
|
8
|
-
import { useKeys } from "../../providers/keys.provider";
|
|
9
|
-
import { AnimationStore } from "../../stores/animation.store";
|
|
10
|
-
import { TRUE } from "../../types/state.types";
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
4
|
+
import { useHighRefreshRate } from "../../shared/hooks/animation/use-high-refresh-rate";
|
|
5
|
+
import { useSharedValueState } from "../../shared/hooks/reanimated/use-shared-value-state";
|
|
6
|
+
import useStableCallback from "../../shared/hooks/use-stable-callback";
|
|
7
|
+
import { useGestureContext } from "../../shared/providers/gestures.provider";
|
|
8
|
+
import { useKeys } from "../../shared/providers/screen/keys.provider";
|
|
9
|
+
import { AnimationStore } from "../../shared/stores/animation.store";
|
|
10
|
+
import { TRUE } from "../../shared/types/state.types";
|
|
11
|
+
import { startScreenTransition } from "../../shared/utils/animation/start-screen-transition";
|
|
12
|
+
import { resetStoresForScreen } from "../../shared/utils/reset-stores-for-screen";
|
|
13
|
+
import type { NativeStackDescriptor } from "../types";
|
|
14
14
|
|
|
15
15
|
export interface Props {
|
|
16
16
|
children: React.ReactNode;
|
|
@@ -34,7 +34,10 @@ export const NativeStackScreenLifecycleController = ({ children }: Props) => {
|
|
|
34
34
|
|
|
35
35
|
const animations = AnimationStore.getAll(current.route.key);
|
|
36
36
|
|
|
37
|
-
const
|
|
37
|
+
const { deactivateHighRefreshRate, activateHighRefreshRate } =
|
|
38
|
+
useHighRefreshRate(current);
|
|
39
|
+
|
|
40
|
+
const handleBeforeRemove = useStableCallback((e: any) => {
|
|
38
41
|
const isEnabled = current.options.enableTransitions;
|
|
39
42
|
|
|
40
43
|
const isFirstScreen = current.navigation.getState().index === 0;
|
|
@@ -47,7 +50,9 @@ export const NativeStackScreenLifecycleController = ({ children }: Props) => {
|
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
e.preventDefault();
|
|
53
|
+
activateHighRefreshRate();
|
|
50
54
|
const onAnimationFinish = (finished: boolean) => {
|
|
55
|
+
deactivateHighRefreshRate();
|
|
51
56
|
if (finished) {
|
|
52
57
|
current.navigation.dispatch(e.data.action);
|
|
53
58
|
|
|
@@ -67,10 +72,12 @@ export const NativeStackScreenLifecycleController = ({ children }: Props) => {
|
|
|
67
72
|
});
|
|
68
73
|
|
|
69
74
|
const handleInitialize = useStableCallback(() => {
|
|
75
|
+
activateHighRefreshRate();
|
|
70
76
|
startScreenTransition({
|
|
71
77
|
target: "open",
|
|
72
78
|
spec: current.options.transitionSpec,
|
|
73
79
|
animations,
|
|
80
|
+
onAnimationFinish: deactivateHighRefreshRate,
|
|
74
81
|
});
|
|
75
82
|
});
|
|
76
83
|
|
|
@@ -22,12 +22,8 @@ import type {
|
|
|
22
22
|
ScreenStackHeaderConfigProps,
|
|
23
23
|
SearchBarProps,
|
|
24
24
|
} from "react-native-screens";
|
|
25
|
-
import type {
|
|
26
|
-
|
|
27
|
-
export type Layout = {
|
|
28
|
-
width: number;
|
|
29
|
-
height: number;
|
|
30
|
-
};
|
|
25
|
+
import type { OverlayProps } from "../shared/types/overlay.types";
|
|
26
|
+
import type { ScreenTransitionConfig } from "../shared/types/screen.types";
|
|
31
27
|
|
|
32
28
|
export type NativeStackNavigationEventMap = {
|
|
33
29
|
/**
|
|
@@ -90,7 +86,7 @@ export type NativeStackNavigationHelpers = NavigationHelpers<
|
|
|
90
86
|
>;
|
|
91
87
|
|
|
92
88
|
// We want it to be an empty object because navigator does not have any additional props
|
|
93
|
-
|
|
89
|
+
type NativeStackNavigationConfig = {};
|
|
94
90
|
|
|
95
91
|
export type NativeStackHeaderProps = {
|
|
96
92
|
/**
|
|
@@ -143,6 +139,14 @@ export type NativeStackHeaderLeftProps = NativeStackHeaderRightProps & {
|
|
|
143
139
|
href?: string;
|
|
144
140
|
};
|
|
145
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Props passed to overlay components in native-stack.
|
|
144
|
+
* Uses the shared OverlayProps type with native-stack's navigation type.
|
|
145
|
+
*/
|
|
146
|
+
export type NativeStackOverlayProps = OverlayProps<
|
|
147
|
+
NativeStackNavigationProp<ParamListBase>
|
|
148
|
+
>;
|
|
149
|
+
|
|
146
150
|
export type NativeStackScreenTransitionConfig = ScreenTransitionConfig & {
|
|
147
151
|
/**
|
|
148
152
|
* Whether to enable transitions. It sets the presentation to containedTransparentModal, animation none, and headerShown to false.
|