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
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { AnimationStore } from "../../stores/animation.store";
|
|
4
|
+
import { GestureStore } from "../../stores/gesture.store";
|
|
5
|
+
import { readSharedValue } from "../read-shared-value";
|
|
6
|
+
import { composeDescriptors } from "./compose-descriptors";
|
|
7
|
+
const isRouteDismissing = routeKey => {
|
|
8
|
+
const gestures = GestureStore.getRouteGestures(routeKey);
|
|
9
|
+
const animations = AnimationStore.getAll(routeKey);
|
|
10
|
+
const isBeingDragged = readSharedValue(gestures.isDragging) === 1;
|
|
11
|
+
const isProgrammaticallyDismissing = readSharedValue(gestures.isDismissing) === 1;
|
|
12
|
+
const isClosing = readSharedValue(animations.closing) === 1;
|
|
13
|
+
const hasNotFullyEntered = readSharedValue(animations.progress) < 0.5;
|
|
14
|
+
return isBeingDragged || isProgrammaticallyDismissing || isClosing || hasNotFullyEntered;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Synchronizes routes while handling removed routes that may still be animating out.
|
|
19
|
+
* This manages the complex logic of keeping closing routes visible during transitions.
|
|
20
|
+
*/
|
|
21
|
+
export const syncRoutesWithRemoved = ({
|
|
22
|
+
prevRoutes,
|
|
23
|
+
prevDescriptors,
|
|
24
|
+
nextRoutes,
|
|
25
|
+
nextDescriptors,
|
|
26
|
+
closingRouteKeys
|
|
27
|
+
}) => {
|
|
28
|
+
if (nextRoutes.length === 0) {
|
|
29
|
+
closingRouteKeys.clear();
|
|
30
|
+
return {
|
|
31
|
+
routes: nextRoutes,
|
|
32
|
+
descriptors: {}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Reorder mid-dismiss routes to the end so they animate out above newer routes.
|
|
37
|
+
// Only middle routes are moved - first (root) and last (focused) stay in place.
|
|
38
|
+
const stableRoutes = [];
|
|
39
|
+
const dismissingMiddleRoutes = [];
|
|
40
|
+
for (let i = 0; i < nextRoutes.length; i++) {
|
|
41
|
+
const route = nextRoutes[i];
|
|
42
|
+
const isFirstOrLast = i === 0 || i === nextRoutes.length - 1;
|
|
43
|
+
if (!isFirstOrLast && isRouteDismissing(route.key)) {
|
|
44
|
+
closingRouteKeys.add(route.key);
|
|
45
|
+
dismissingMiddleRoutes.push(route);
|
|
46
|
+
} else {
|
|
47
|
+
stableRoutes.push(route);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const routes = [...stableRoutes, ...dismissingMiddleRoutes];
|
|
51
|
+
|
|
52
|
+
// Handle focus transitions (when the top route changes)
|
|
53
|
+
const previousFocusedRoute = prevRoutes[prevRoutes.length - 1];
|
|
54
|
+
const nextFocusedRoute = nextRoutes[nextRoutes.length - 1];
|
|
55
|
+
const focusHasChanged = previousFocusedRoute && nextFocusedRoute && previousFocusedRoute.key !== nextFocusedRoute.key;
|
|
56
|
+
if (focusHasChanged) {
|
|
57
|
+
const nextRouteExistedBefore = prevRoutes.some(route => route.key === nextFocusedRoute.key);
|
|
58
|
+
const previousRouteStillExists = nextRoutes.some(route => route.key === previousFocusedRoute.key);
|
|
59
|
+
if (nextRouteExistedBefore && !previousRouteStillExists) {
|
|
60
|
+
// Back navigation: previous route was popped, keep it for exit animation
|
|
61
|
+
closingRouteKeys.add(previousFocusedRoute.key);
|
|
62
|
+
routes.push(previousFocusedRoute);
|
|
63
|
+
} else {
|
|
64
|
+
// Forward navigation: new route gained focus
|
|
65
|
+
closingRouteKeys.remove(nextFocusedRoute.key);
|
|
66
|
+
if (!previousRouteStillExists) {
|
|
67
|
+
// Previous route was replaced, insert it underneath for transition
|
|
68
|
+
const insertIndex = Math.max(routes.length - 1, 0);
|
|
69
|
+
routes.splice(insertIndex, 0, previousFocusedRoute);
|
|
70
|
+
closingRouteKeys.remove(previousFocusedRoute.key);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
} else if (nextFocusedRoute) {
|
|
74
|
+
// Same focused route, ensure it's not marked as closing
|
|
75
|
+
closingRouteKeys.remove(nextFocusedRoute.key);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Clean up orphaned closing keys
|
|
79
|
+
const activeKeys = new Set(routes.map(route => route.key));
|
|
80
|
+
for (const key of Array.from(closingRouteKeys.ref.current)) {
|
|
81
|
+
if (!activeKeys.has(key)) {
|
|
82
|
+
closingRouteKeys.remove(key);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
routes,
|
|
87
|
+
descriptors: composeDescriptors(routes, nextDescriptors, prevDescriptors)
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=sync-routes-with-removed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AnimationStore","GestureStore","readSharedValue","composeDescriptors","isRouteDismissing","routeKey","gestures","getRouteGestures","animations","getAll","isBeingDragged","isDragging","isProgrammaticallyDismissing","isDismissing","isClosing","closing","hasNotFullyEntered","progress","syncRoutesWithRemoved","prevRoutes","prevDescriptors","nextRoutes","nextDescriptors","closingRouteKeys","length","clear","routes","descriptors","stableRoutes","dismissingMiddleRoutes","i","route","isFirstOrLast","key","add","push","previousFocusedRoute","nextFocusedRoute","focusHasChanged","nextRouteExistedBefore","some","previousRouteStillExists","remove","insertIndex","Math","max","splice","activeKeys","Set","map","Array","from","ref","current","has"],"sourceRoot":"../../../../../src","sources":["shared/utils/navigation/sync-routes-with-removed.ts"],"mappings":";;AACA,SAASA,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,YAAY,QAAQ,4BAA4B;AACzD,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,kBAAkB,QAAQ,uBAAuB;AAiB1D,MAAMC,iBAAiB,GAAIC,QAAgB,IAAc;EACxD,MAAMC,QAAQ,GAAGL,YAAY,CAACM,gBAAgB,CAACF,QAAQ,CAAC;EACxD,MAAMG,UAAU,GAAGR,cAAc,CAACS,MAAM,CAACJ,QAAQ,CAAC;EAElD,MAAMK,cAAc,GAAGR,eAAe,CAACI,QAAQ,CAACK,UAAU,CAAC,KAAK,CAAC;EACjE,MAAMC,4BAA4B,GACjCV,eAAe,CAAC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CAACtB,MAAM,CAACuB,GAAG,CAAElB,KAAK,IAAKA,KAAK,CAACE,GAAG,CAAC,CAAC;EAC5D,KAAK,MAAMA,GAAG,IAAIiB,KAAK,CAACC,IAAI,CAAC5B,gBAAgB,CAAC6B,GAAG,CAACC,OAAO,CAAC,EAAE;IAC3D,IAAI,CAACN,UAAU,CAACO,GAAG,CAACrB,GAAG,CAAC,EAAE;MACzBV,gBAAgB,CAACmB,MAAM,CAACT,GAAG,CAAC;IAC7B;EACD;EAEA,OAAO;IACNP,MAAM;IACNC,WAAW,EAAExB,kBAAkB,CAACuB,MAAM,EAAEJ,eAAe,EAAEF,eAAe;EACzE,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { executeOnUIRuntimeSync } from "react-native-reanimated";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Safely read a SharedValue from the UI thread.
|
|
7
|
+
* Avoids the "cannot read .value inside component render" warning.
|
|
8
|
+
*/
|
|
9
|
+
export const readSharedValue = executeOnUIRuntimeSync(sv => {
|
|
10
|
+
"worklet";
|
|
11
|
+
|
|
12
|
+
return sv.value;
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=read-shared-value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["executeOnUIRuntimeSync","readSharedValue","sv","value"],"sourceRoot":"../../../../src","sources":["shared/utils/read-shared-value.ts"],"mappings":";;AAAA,SACCA,sBAAsB,QAEhB,yBAAyB;;AAEhC;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAGD,sBAAsB,CAChDE,EAAkB,IAAQ;EAC7B,SAAS;;EACT,OAAOA,EAAE,CAACC,KAAK;AAChB,CACD,CAAC","ignoreList":[]}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { AnimationStore } from "../stores/animation.store";
|
|
4
4
|
import { BoundStore } from "../stores/bounds.store";
|
|
5
5
|
import { GestureStore } from "../stores/gesture.store";
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
|
-
* Reset all stores for a given screen
|
|
7
|
+
* Reset all stores for a given screen.
|
|
8
|
+
* Accepts any descriptor that has a route with a key.
|
|
9
9
|
*/
|
|
10
10
|
export const resetStoresForScreen = current => {
|
|
11
11
|
AnimationStore.clear(current.route.key);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AnimationStore","BoundStore","GestureStore","resetStoresForScreen","current","clear","route","key"],"sourceRoot":"../../../../src","sources":["shared/utils/reset-stores-for-screen.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["AnimationStore","BoundStore","GestureStore","resetStoresForScreen","current","clear","route","key"],"sourceRoot":"../../../../src","sources":["shared/utils/reset-stores-for-screen.ts"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,2BAA2B;AAC1D,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,YAAY,QAAQ,yBAAyB;AAGtD;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAIC,OAA4B,IAAK;EACrEJ,cAAc,CAACK,KAAK,CAACD,OAAO,CAACE,KAAK,CAACC,GAAG,CAAC;EACvCL,YAAY,CAACG,KAAK,CAACD,OAAO,CAACE,KAAK,CAACC,GAAG,CAAC;EACrCN,UAAU,CAACI,KAAK,CAACD,OAAO,CAACE,KAAK,CAACC,GAAG,CAAC;AACpC,CAAC","ignoreList":[]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
import type { BlankStackDescriptor, BlankStackNavigationHelpers } from "../types";
|
|
3
|
+
export declare const StackView: React.FC<import("../../shared/providers/stack/managed.provider").ManagedStackProps<BlankStackDescriptor, BlankStackNavigationHelpers>>;
|
|
3
4
|
//# sourceMappingURL=stack-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack-view.d.ts","sourceRoot":"","sources":["../../../../src/blank-stack/components/stack-view.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stack-view.d.ts","sourceRoot":"","sources":["../../../../src/blank-stack/components/stack-view.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EACX,oBAAoB,EACpB,2BAA2B,EAC3B,MAAM,UAAU,CAAC;AA0BlB,eAAO,MAAM,SAAS,wIAqDrB,CAAC"}
|
package/lib/typescript/{shared/components → blank-stack}/controllers/blank-stack-lifecycle.d.ts
RENAMED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
interface Props {
|
|
2
2
|
children: React.ReactNode;
|
|
3
3
|
}
|
|
4
4
|
/**
|
|
5
5
|
* Lifecycle controller built out for Blank Stack implementation.
|
|
6
6
|
*/
|
|
7
7
|
export declare const BlankStackScreenLifecycleController: ({ children }: Props) => import("react").ReactNode;
|
|
8
|
+
export {};
|
|
8
9
|
//# sourceMappingURL=blank-stack-lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blank-stack-lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/blank-stack/controllers/blank-stack-lifecycle.tsx"],"names":[],"mappings":"AAWA,UAAU,KAAK;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,mCAAmC,GAAI,cAAc,KAAK,8BA0DtE,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { DefaultNavigatorOptions, Descriptor, NavigationHelpers, NavigationProp, ParamListBase, Route, RouteProp, StackActionHelpers, StackNavigationState, StackRouterOptions, Theme } from "@react-navigation/native";
|
|
2
|
-
import type { DerivedValue } from "react-native-reanimated";
|
|
3
2
|
import type { ScreenTransitionConfig } from "../shared";
|
|
4
|
-
import type {
|
|
3
|
+
import type { OverlayProps } from "../shared/types/overlay.types";
|
|
5
4
|
export type BlankStackNavigationEventMap = {};
|
|
6
5
|
export type BlankStackNavigationProp<ParamList extends ParamListBase, RouteName extends keyof ParamList = string, NavigatorID extends string | undefined = undefined> = NavigationProp<ParamList, RouteName, NavigatorID, StackNavigationState<ParamList>, BlankStackNavigationOptions, BlankStackNavigationEventMap> & StackActionHelpers<ParamList>;
|
|
7
6
|
export type BlankStackScreenProps<ParamList extends ParamListBase, RouteName extends keyof ParamList = string, NavigatorID extends string | undefined = undefined> = {
|
|
@@ -16,38 +15,13 @@ export type BlankStackScene = {
|
|
|
16
15
|
route: Route<string>;
|
|
17
16
|
descriptor: BlankStackDescriptor;
|
|
18
17
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* Index of the focused route in the stack.
|
|
27
|
-
*/
|
|
28
|
-
focusedIndex: number;
|
|
29
|
-
/**
|
|
30
|
-
* All routes currently in the stack.
|
|
31
|
-
*/
|
|
32
|
-
routes: Route<string>[];
|
|
33
|
-
/**
|
|
34
|
-
* Custom metadata from the focused screen's options.
|
|
35
|
-
*/
|
|
36
|
-
meta?: Record<string, unknown>;
|
|
37
|
-
/**
|
|
38
|
-
* Navigation prop for the overlay.
|
|
39
|
-
*/
|
|
40
|
-
navigation: BlankStackNavigationProp<ParamListBase>;
|
|
41
|
-
/**
|
|
42
|
-
* Animation values for the overlay.
|
|
43
|
-
*/
|
|
44
|
-
overlayAnimation: DerivedValue<OverlayInterpolationProps>;
|
|
45
|
-
/**
|
|
46
|
-
* Animation values for the screen.
|
|
47
|
-
*/
|
|
48
|
-
screenAnimation: DerivedValue<ScreenInterpolationProps>;
|
|
49
|
-
};
|
|
50
|
-
export type BlankStackScreenTransitionConfig = ScreenTransitionConfig & {
|
|
18
|
+
type BlankStackNavigationConfig = {};
|
|
19
|
+
/**
|
|
20
|
+
* Props passed to overlay components in blank-stack.
|
|
21
|
+
* Uses the shared OverlayProps type with blank-stack's navigation type.
|
|
22
|
+
*/
|
|
23
|
+
export type BlankStackOverlayProps = OverlayProps<BlankStackNavigationProp<ParamListBase>>;
|
|
24
|
+
type BlankStackScreenTransitionConfig = ScreenTransitionConfig & {
|
|
51
25
|
/**
|
|
52
26
|
* Whether to detach the previous screen from the view hierarchy to save memory.
|
|
53
27
|
* Set it to `false` if you need the previous screen to be seen through the active screen.
|
|
@@ -56,22 +30,6 @@ export type BlankStackScreenTransitionConfig = ScreenTransitionConfig & {
|
|
|
56
30
|
detachPreviousScreen?: boolean;
|
|
57
31
|
};
|
|
58
32
|
export type BlankStackNavigationOptions = BlankStackScreenTransitionConfig & {
|
|
59
|
-
/**
|
|
60
|
-
* Function that given `OverlayProps` returns a React Element to display as a overlay.
|
|
61
|
-
*/
|
|
62
|
-
overlay?: (props: BlankStackOverlayProps) => React.ReactNode;
|
|
63
|
-
/**
|
|
64
|
-
* Layout: How the Overlay is positioned
|
|
65
|
-
* - 'float': Single persistent overlay above all screens (like iOS)
|
|
66
|
-
* - 'screen': Per-screen overlay that transitions with content
|
|
67
|
-
* @default 'screen'
|
|
68
|
-
*/
|
|
69
|
-
overlayMode?: "float" | "screen";
|
|
70
|
-
/**
|
|
71
|
-
* Whether to show the overlay. The overlay is shown by default.
|
|
72
|
-
* Setting this to `false` hides the overlay.
|
|
73
|
-
*/
|
|
74
|
-
overlayShown?: boolean;
|
|
75
33
|
/**
|
|
76
34
|
* Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
|
|
77
35
|
* Defaults to `true` when `enableFreeze()` is run at the top of the application.
|
|
@@ -86,4 +44,5 @@ export type BlankStackDescriptor = Descriptor<BlankStackNavigationOptions, Blank
|
|
|
86
44
|
export type BlankStackDescriptorMap = {
|
|
87
45
|
[key: string]: BlankStackDescriptor;
|
|
88
46
|
};
|
|
47
|
+
export {};
|
|
89
48
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/blank-stack/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,KAAK,EACL,SAAS,EACT,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,KAAK,EACL,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/blank-stack/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,KAAK,EACL,SAAS,EACT,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,KAAK,EACL,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAE9C,MAAM,MAAM,wBAAwB,CACnC,SAAS,SAAS,aAAa,EAC/B,SAAS,SAAS,MAAM,SAAS,GAAG,MAAM,EAC1C,WAAW,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,IAC/C,cAAc,CACjB,SAAS,EACT,SAAS,EACT,WAAW,EACX,oBAAoB,CAAC,SAAS,CAAC,EAC/B,2BAA2B,EAC3B,4BAA4B,CAC5B,GACA,kBAAkB,CAAC,SAAS,CAAC,CAAC;AAE/B,MAAM,MAAM,qBAAqB,CAChC,SAAS,SAAS,aAAa,EAC/B,SAAS,SAAS,MAAM,SAAS,GAAG,MAAM,EAC1C,WAAW,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,IAC/C;IACH,UAAU,EAAE,wBAAwB,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;IACxE,KAAK,EAAE,SAAS,CAAC,SAAS,EAAE,SAAS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,EAAE,MAAM,GAAG,oBAAoB,CAAC;CACpC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ComponentNavigation, ComponentStackDescriptor } from "../types";
|
|
3
|
+
export declare const ComponentView: React.FC<import("../../shared/providers/stack/managed.provider").ManagedStackProps<ComponentStackDescriptor, ComponentNavigation>>;
|
|
4
|
+
//# sourceMappingURL=component-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-view.d.ts","sourceRoot":"","sources":["../../../../src/component-stack/components/component-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAkB9E,eAAO,MAAM,aAAa,oIAyCzB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
interface ScreenProps {
|
|
3
|
+
routeKey: string;
|
|
4
|
+
index: number;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const Screen: ({ routeKey, index, children }: ScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=screens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../../../src/component-stack/components/screens.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAWpC,UAAU,WAAW;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAUD,eAAO,MAAM,MAAM,GAAI,+BAA+B,WAAW,4CA4DhE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Lifecycle controller built out for Component Stack implementation.
|
|
6
|
+
* Uses the shared ManagedStackContext for closing route handling.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ComponentStackScreenLifecycleController: ({ children, }: Props) => import("react").ReactNode;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=component-stack-lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-stack-lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/component-stack/controllers/component-stack-lifecycle.tsx"],"names":[],"mappings":"AAWA,UAAU,KAAK;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,uCAAuC,GAAI,eAErD,KAAK,8BA0DP,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ComponentNavigation, ComponentRoute, ComponentStackDescriptor, ComponentStackDescriptorMap, ComponentStackNavigationOptions, ComponentStackState } from "../types";
|
|
3
|
+
interface UseComponentNavigationBuilderOptions {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
initialRouteName?: string;
|
|
6
|
+
screenOptions?: ComponentStackNavigationOptions;
|
|
7
|
+
}
|
|
8
|
+
interface ComponentNavigationBuilderResult {
|
|
9
|
+
state: ComponentStackState;
|
|
10
|
+
navigation: ComponentNavigation;
|
|
11
|
+
describe: (route: ComponentRoute, placeholder: boolean) => ComponentStackDescriptor;
|
|
12
|
+
descriptors: ComponentStackDescriptorMap;
|
|
13
|
+
NavigationContent: React.FC<{
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
export declare function useComponentNavigationBuilder({ children, initialRouteName, screenOptions, }: UseComponentNavigationBuilderOptions): ComponentNavigationBuilderResult;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=use-component-navigation-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-component-navigation-builder.d.ts","sourceRoot":"","sources":["../../../../src/component-stack/hooks/use-component-navigation-builder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EACX,mBAAmB,EACnB,cAAc,EAGd,wBAAwB,EACxB,2BAA2B,EAC3B,+BAA+B,EAC/B,mBAAmB,EACnB,MAAM,UAAU,CAAC;AAwIlB,UAAU,oCAAoC;IAC7C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,+BAA+B,CAAC;CAChD;AAED,UAAU,gCAAgC;IACzC,KAAK,EAAE,mBAAmB,CAAC;IAC3B,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,CACT,KAAK,EAAE,cAAc,EACrB,WAAW,EAAE,OAAO,KAChB,wBAAwB,CAAC;IAC9B,WAAW,EAAE,2BAA2B,CAAC;IACzC,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,CAAC,CAAC;CAC3D;AA2BD,wBAAgB,6BAA6B,CAAC,EAC7C,QAAQ,EACR,gBAAgB,EAChB,aAAa,GACb,EAAE,oCAAoC,GAAG,gCAAgC,CAkMzE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to access the component navigation object from within a screen.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```tsx
|
|
6
|
+
* function MyScreen() {
|
|
7
|
+
* const navigation = useComponentNavigation();
|
|
8
|
+
*
|
|
9
|
+
* return (
|
|
10
|
+
* <Button
|
|
11
|
+
* title="Go to Details"
|
|
12
|
+
* onPress={() => navigation.push('Details')}
|
|
13
|
+
* />
|
|
14
|
+
* );
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function useComponentNavigation(): import("..").ComponentNavigation;
|
|
19
|
+
//# sourceMappingURL=use-component-navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-component-navigation.d.ts","sourceRoot":"","sources":["../../../../src/component-stack/hooks/use-component-navigation.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,qCAErC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { useComponentNavigation } from "./hooks/use-component-navigation";
|
|
2
|
+
export { createComponentNavigator } from "./navigators/create-component-navigator";
|
|
3
|
+
export type { ComponentNavigation, ComponentNavigatorProps, ComponentRoute, ComponentScreenConfig, ComponentScreenProps, ComponentStackDescriptor, ComponentStackNavigationOptions, ComponentStackOverlayProps, ComponentStackScene, ComponentStackScreenProps, ComponentStackScreenTransitionConfig, ComponentStackState, } from "./types";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component-stack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,YAAY,EACX,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,+BAA+B,EAC/B,0BAA0B,EAC1B,mBAAmB,EACnB,yBAAyB,EACzB,oCAAoC,EACpC,mBAAmB,GACnB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ComponentNavigation, ComponentNavigatorProps, ComponentScreenProps } from "../types";
|
|
3
|
+
export declare function useComponentNavigationContext(): ComponentNavigation;
|
|
4
|
+
interface ComponentStack {
|
|
5
|
+
Navigator: React.FC<ComponentNavigatorProps>;
|
|
6
|
+
Screen: React.FC<ComponentScreenProps>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Creates a component navigation stack.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* const Stack = createComponentNavigator();
|
|
14
|
+
*
|
|
15
|
+
* function MyComponent() {
|
|
16
|
+
* return (
|
|
17
|
+
* <Stack.Navigator initialRouteName="Home">
|
|
18
|
+
* <Stack.Screen
|
|
19
|
+
* name="Home"
|
|
20
|
+
* component={HomeScreen}
|
|
21
|
+
* options={{ ...SlideFromBottom() }}
|
|
22
|
+
* />
|
|
23
|
+
* <Stack.Screen
|
|
24
|
+
* name="Details"
|
|
25
|
+
* component={DetailsScreen}
|
|
26
|
+
* options={{ ...SlideFromBottom() }}
|
|
27
|
+
* />
|
|
28
|
+
* </Stack.Navigator>
|
|
29
|
+
* );
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function createComponentNavigator(): ComponentStack;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=create-component-navigator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-component-navigator.d.ts","sourceRoot":"","sources":["../../../../src/component-stack/navigators/create-component-navigator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EACX,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EAEpB,MAAM,UAAU,CAAC;AAMlB,wBAAgB,6BAA6B,IAAI,mBAAmB,CAQnE;AA6CD,UAAU,cAAc;IACvB,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC,CAAC;IAC7C,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,wBAAwB,IAAI,cAAc,CAKzD"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import type { DerivedValue } from "react-native-reanimated";
|
|
2
|
+
import type { ScreenTransitionConfig } from "../shared";
|
|
3
|
+
import type { OverlayInterpolationProps, ScreenInterpolationProps } from "../shared/types/animation.types";
|
|
4
|
+
import type { OverlayMode } from "../shared/types/overlay.types";
|
|
5
|
+
/**
|
|
6
|
+
* A synthetic route object for component navigation.
|
|
7
|
+
* Mimics React Navigation's Route type but without the navigation dependency.
|
|
8
|
+
*/
|
|
9
|
+
export interface ComponentRoute<Params = Record<string, unknown>> {
|
|
10
|
+
/** Unique identifier for this route instance */
|
|
11
|
+
key: string;
|
|
12
|
+
/** Name identifier for the screen */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Optional parameters passed to the screen */
|
|
15
|
+
params?: Params;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Navigation action for dispatch method.
|
|
19
|
+
*/
|
|
20
|
+
type ComponentNavigationAction = {
|
|
21
|
+
type: "PUSH";
|
|
22
|
+
name: string;
|
|
23
|
+
params?: Record<string, unknown>;
|
|
24
|
+
} | {
|
|
25
|
+
type: "POP";
|
|
26
|
+
} | {
|
|
27
|
+
type: "POP_BY_KEY";
|
|
28
|
+
key: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: "NAVIGATE";
|
|
31
|
+
name: string;
|
|
32
|
+
params?: Record<string, unknown>;
|
|
33
|
+
} | {
|
|
34
|
+
type: "RESET";
|
|
35
|
+
name?: string;
|
|
36
|
+
params?: Record<string, unknown>;
|
|
37
|
+
} | {
|
|
38
|
+
type: string;
|
|
39
|
+
source?: string;
|
|
40
|
+
target?: string;
|
|
41
|
+
payload?: unknown;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Navigation object provided to screens and available via useComponentNavigation hook.
|
|
45
|
+
*/
|
|
46
|
+
export interface ComponentNavigation {
|
|
47
|
+
/** Push a new screen by name */
|
|
48
|
+
push: (name: string, params?: Record<string, unknown>) => void;
|
|
49
|
+
/** Pop the current screen */
|
|
50
|
+
pop: () => void;
|
|
51
|
+
/** Navigate back (alias for pop) */
|
|
52
|
+
goBack: () => void;
|
|
53
|
+
/** Navigate to a specific screen by name, reusing existing if present */
|
|
54
|
+
navigate: (name: string, params?: Record<string, unknown>) => void;
|
|
55
|
+
/** Check if we can go back */
|
|
56
|
+
canGoBack: () => boolean;
|
|
57
|
+
/** Reset to a specific screen or initial state */
|
|
58
|
+
reset: (name?: string, params?: Record<string, unknown>) => void;
|
|
59
|
+
/** Dispatch a navigation action (compatible with React Navigation's StackActions) */
|
|
60
|
+
dispatch: (action: ComponentNavigationAction) => void;
|
|
61
|
+
/** Get current navigation state (for gesture handling compatibility) */
|
|
62
|
+
getState: () => ComponentStackState;
|
|
63
|
+
/** Current index in the stack */
|
|
64
|
+
index: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Screen options for component stack, extending the base transition config.
|
|
68
|
+
*/
|
|
69
|
+
export type ComponentStackScreenTransitionConfig = ScreenTransitionConfig & {
|
|
70
|
+
/**
|
|
71
|
+
* Whether to detach the previous screen from the view hierarchy to save memory.
|
|
72
|
+
* Set it to `false` if you need the previous screen to be seen through the active screen.
|
|
73
|
+
*/
|
|
74
|
+
detachPreviousScreen?: boolean;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Props passed to overlay components.
|
|
78
|
+
*/
|
|
79
|
+
export type ComponentStackOverlayProps = {
|
|
80
|
+
/** Route of the currently focused screen in the stack. */
|
|
81
|
+
focusedRoute: ComponentRoute;
|
|
82
|
+
/** Index of the focused route in the stack. */
|
|
83
|
+
focusedIndex: number;
|
|
84
|
+
/** All routes currently in the stack. */
|
|
85
|
+
routes: ComponentRoute[];
|
|
86
|
+
/** Custom metadata from the focused screen's options. */
|
|
87
|
+
meta?: Record<string, unknown>;
|
|
88
|
+
/** Navigation object for the overlay. */
|
|
89
|
+
navigation: ComponentNavigation;
|
|
90
|
+
/** Animation values for the overlay. */
|
|
91
|
+
overlayAnimation: DerivedValue<OverlayInterpolationProps>;
|
|
92
|
+
/** Animation values for the screen. */
|
|
93
|
+
screenAnimation: DerivedValue<ScreenInterpolationProps>;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Props passed to container overlay components.
|
|
97
|
+
* Extends overlay props with children to wrap screen content.
|
|
98
|
+
*/
|
|
99
|
+
export type ComponentStackContainerOverlayProps = ComponentStackOverlayProps & {
|
|
100
|
+
/** The screen content to be wrapped by the container overlay. */
|
|
101
|
+
children: React.ReactNode;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Full navigation options for a component stack screen.
|
|
105
|
+
*/
|
|
106
|
+
export type ComponentStackNavigationOptions = ComponentStackScreenTransitionConfig & {
|
|
107
|
+
/** Function that returns a React Element to display as overlay. */
|
|
108
|
+
overlay?: ((props: ComponentStackOverlayProps) => React.ReactNode) | ((props: ComponentStackContainerOverlayProps) => React.ReactNode);
|
|
109
|
+
/**
|
|
110
|
+
* Layout: How the Overlay is positioned
|
|
111
|
+
* - 'float': Single persistent overlay above all screens (like iOS)
|
|
112
|
+
* - 'screen': Per-screen overlay that transitions with content
|
|
113
|
+
* - 'container': Wraps all screen content (for MaskedView, custom containers)
|
|
114
|
+
* @default 'screen'
|
|
115
|
+
*/
|
|
116
|
+
overlayMode?: OverlayMode;
|
|
117
|
+
/** Whether to show the overlay. Defaults to true when overlay is provided. */
|
|
118
|
+
overlayShown?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Whether inactive screens should be suspended from re-rendering.
|
|
121
|
+
* Defaults to `true` when `enableFreeze()` is run at the top of the application.
|
|
122
|
+
*/
|
|
123
|
+
freezeOnBlur?: boolean;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Descriptor for a component stack screen.
|
|
127
|
+
* Similar to React Navigation's Descriptor but simplified.
|
|
128
|
+
*/
|
|
129
|
+
export interface ComponentStackDescriptor {
|
|
130
|
+
/** The route object for this screen */
|
|
131
|
+
route: ComponentRoute;
|
|
132
|
+
/** Navigation object */
|
|
133
|
+
navigation: ComponentNavigation;
|
|
134
|
+
/** Render function for the screen content */
|
|
135
|
+
render: () => React.JSX.Element | null;
|
|
136
|
+
/** Screen options/configuration */
|
|
137
|
+
options: ComponentStackNavigationOptions;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* A scene in the component stack (route + descriptor pair).
|
|
141
|
+
*/
|
|
142
|
+
export interface ComponentStackScene {
|
|
143
|
+
route: ComponentRoute;
|
|
144
|
+
descriptor: ComponentStackDescriptor;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Map of route keys to descriptors.
|
|
148
|
+
*/
|
|
149
|
+
export type ComponentStackDescriptorMap = {
|
|
150
|
+
[key: string]: ComponentStackDescriptor;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Props passed to screen components.
|
|
154
|
+
*/
|
|
155
|
+
export interface ComponentStackScreenProps<Params = Record<string, unknown>> {
|
|
156
|
+
/** Navigation object for controlling the stack */
|
|
157
|
+
navigation: ComponentNavigation;
|
|
158
|
+
/** Route object with params */
|
|
159
|
+
route: ComponentRoute<Params>;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* State of the component navigation stack.
|
|
163
|
+
*/
|
|
164
|
+
export interface ComponentStackState {
|
|
165
|
+
/** All routes in the stack */
|
|
166
|
+
routes: ComponentRoute[];
|
|
167
|
+
/** Index of the currently focused route */
|
|
168
|
+
index: number;
|
|
169
|
+
/** Unique key for this stack instance */
|
|
170
|
+
key: string;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Screen definition for the component navigator.
|
|
174
|
+
*/
|
|
175
|
+
export interface ComponentScreenConfig {
|
|
176
|
+
/** Unique name for this screen */
|
|
177
|
+
name: string;
|
|
178
|
+
/** Component to render for this screen */
|
|
179
|
+
component: React.ComponentType<ComponentStackScreenProps<any>>;
|
|
180
|
+
/** Screen-specific options */
|
|
181
|
+
options?: ComponentStackNavigationOptions;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Props for the ComponentNavigator component.
|
|
185
|
+
*/
|
|
186
|
+
export interface ComponentNavigatorProps {
|
|
187
|
+
/** Screen definitions */
|
|
188
|
+
children: React.ReactNode;
|
|
189
|
+
/** Initial screen name to display */
|
|
190
|
+
initialRouteName?: string;
|
|
191
|
+
/** Default options applied to all screens */
|
|
192
|
+
screenOptions?: ComponentStackNavigationOptions;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Props for the ComponentScreen component.
|
|
196
|
+
*/
|
|
197
|
+
export interface ComponentScreenProps {
|
|
198
|
+
/** Unique name for this screen */
|
|
199
|
+
name: string;
|
|
200
|
+
/** Component to render */
|
|
201
|
+
component: React.ComponentType<ComponentStackScreenProps<any>>;
|
|
202
|
+
/** Screen-specific options */
|
|
203
|
+
options?: ComponentStackNavigationOptions;
|
|
204
|
+
}
|
|
205
|
+
export {};
|
|
206
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/component-stack/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EACX,yBAAyB,EACzB,wBAAwB,EACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/D,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,qCAAqC;IACrC,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AS,EAAE,KAAK,CAAC,aAAa,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,8BAA8B;IAC9B,OAAO,CAAC,EAAE,+BAA+B,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC,yBAAyB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6CAA6C;IAC7C,aAAa,CAAC,EAAE,+BAA+B,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,8BAA8B;IAC9B,OAAO,CAAC,EAAE,+BAA+B,CAAC;CAC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-stack-lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/native-stack/controllers/native-stack-lifecycle.tsx"],"names":[],"mappings":"AAcA,MAAM,WAAW,KAAK;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,oCAAoC,GAAI,cAAc,KAAK,8BA0EvE,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { createNativeStackNavigator } from "./navigators/createNativeStackNavigator";
|
|
2
|
-
export type { NativeStackHeaderLeftProps, NativeStackHeaderProps, NativeStackHeaderRightProps, NativeStackNavigationEventMap, NativeStackNavigationOptions, NativeStackNavigationProp, NativeStackNavigatorProps, NativeStackOptionsArgs, NativeStackScreenProps, } from "./types";
|
|
2
|
+
export type { NativeStackHeaderLeftProps, NativeStackHeaderProps, NativeStackHeaderRightProps, NativeStackNavigationEventMap, NativeStackNavigationOptions, NativeStackNavigationProp, NativeStackNavigatorProps, NativeStackOptionsArgs, NativeStackOverlayProps, NativeStackScreenProps, } from "./types";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/native-stack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,YAAY,EACX,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,4BAA4B,EAC5B,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,GACtB,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/native-stack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,YAAY,EACX,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,4BAA4B,EAC5B,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,GACtB,MAAM,SAAS,CAAC"}
|