react-native-screen-transitions 3.0.0-beta.10 → 3.0.0-beta.11
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 +60 -5
- package/lib/commonjs/blank-stack/components/Overlay.js +1 -1
- 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/StackView.js +37 -40
- package/lib/commonjs/blank-stack/components/StackView.js.map +1 -1
- package/lib/commonjs/blank-stack/hooks/use-overlay-animation.js +4 -4
- package/lib/commonjs/blank-stack/hooks/use-overlay-animation.js.map +1 -1
- package/lib/commonjs/blank-stack/index.js +0 -7
- package/lib/commonjs/blank-stack/index.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.native.js +2 -2
- package/lib/commonjs/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/commonjs/shared/components/controllers/screen-lifecycle.js +9 -9
- package/lib/commonjs/shared/components/controllers/screen-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/components/create-transition-aware-component.js +11 -14
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/root-transition-aware.js +1 -1
- package/lib/commonjs/shared/components/root-transition-aware.js.map +1 -1
- package/lib/commonjs/shared/configs/presets.js +20 -9
- package/lib/commonjs/shared/configs/presets.js.map +1 -1
- package/lib/commonjs/shared/constants.js +0 -1
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js +9 -10
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/commonjs/shared/hooks/animation/use-screen-animation.js +10 -25
- package/lib/commonjs/shared/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/shared/hooks/gestures/use-build-gestures.js +11 -11
- package/lib/commonjs/shared/hooks/gestures/use-build-gestures.js.map +1 -1
- package/lib/commonjs/shared/hooks/gestures/use-parent-gesture-registry.js +1 -1
- package/lib/commonjs/shared/hooks/gestures/use-scroll-registry.js +1 -1
- package/lib/commonjs/shared/hooks/reanimated/use-shared-value-state.js.map +1 -0
- package/lib/commonjs/shared/hooks/use-stable-callback-value.js.map +1 -1
- package/lib/commonjs/shared/hooks/use-stable-callback.js.map +1 -1
- package/lib/commonjs/shared/providers/{gestures.js → gestures.provider.js} +1 -1
- package/lib/commonjs/shared/providers/gestures.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/{keys.js → keys.provider.js} +1 -1
- package/lib/commonjs/shared/providers/keys.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/register-bounds.provider.js +207 -0
- package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/{screen-transition-provider.js → screen-transition.provider.js} +4 -4
- package/lib/commonjs/shared/providers/{screen-transition-provider.js.map → screen-transition.provider.js.map} +1 -1
- package/lib/commonjs/shared/providers/{transition-styles.js → transition-styles.provider.js} +7 -9
- package/lib/commonjs/shared/providers/transition-styles.provider.js.map +1 -0
- package/lib/commonjs/shared/stores/{animation-store.js → animation.store.js} +1 -1
- package/lib/commonjs/shared/stores/{animation-store.js.map → animation.store.js.map} +1 -1
- package/lib/commonjs/shared/stores/bounds.store.js +141 -0
- package/lib/commonjs/shared/stores/bounds.store.js.map +1 -0
- package/lib/commonjs/shared/stores/{gesture-store.js → gesture.store.js} +1 -1
- package/lib/commonjs/shared/stores/{gesture-store.js.map → gesture.store.js.map} +1 -1
- package/lib/commonjs/shared/types/{core.js → animation.types.js} +1 -1
- package/lib/commonjs/shared/types/animation.types.js.map +1 -0
- package/lib/commonjs/shared/types/{bounds.js → bounds.types.js} +1 -1
- package/lib/commonjs/shared/types/bounds.types.js.map +1 -0
- package/lib/commonjs/shared/types/{animation.js → core.types.js} +1 -1
- package/lib/commonjs/shared/types/{animation.js.map → core.types.js.map} +1 -1
- package/lib/commonjs/shared/types/{gesture.js → gesture.types.js} +1 -1
- package/lib/commonjs/shared/types/gesture.types.js.map +1 -0
- package/lib/commonjs/shared/types/utils.types.js +2 -0
- package/lib/commonjs/shared/types/{core.js.map → utils.types.js.map} +1 -1
- package/lib/commonjs/shared/utils/animation/derivations.js +1 -7
- package/lib/commonjs/shared/utils/animation/derivations.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/geometry.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/is-bounds-equal.js +19 -0
- package/lib/commonjs/shared/utils/bounds/helpers/is-bounds-equal.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/styles.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/index.js +45 -35
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/types/builder.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/{_types/builder.js.map → types/geometry.js.map} +1 -1
- package/lib/commonjs/shared/utils/create-provider.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/apply-offset-rules.js +1 -1
- package/lib/commonjs/shared/utils/gesture/check-gesture-activation.js +1 -1
- package/lib/commonjs/shared/utils/reset-stores-for-screen.js +17 -0
- package/lib/commonjs/shared/utils/reset-stores-for-screen.js.map +1 -0
- package/lib/module/blank-stack/components/Overlay.js +1 -1
- package/lib/module/blank-stack/components/Overlay.js.map +1 -1
- package/lib/module/blank-stack/components/Screens.js +1 -1
- package/lib/module/blank-stack/components/StackView.js +37 -40
- package/lib/module/blank-stack/components/StackView.js.map +1 -1
- package/lib/module/blank-stack/hooks/use-overlay-animation.js +3 -3
- package/lib/module/blank-stack/hooks/use-overlay-animation.js.map +1 -1
- package/lib/module/blank-stack/index.js +0 -1
- package/lib/module/blank-stack/index.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.native.js +1 -1
- package/lib/module/shared/components/controllers/screen-lifecycle.js +8 -8
- package/lib/module/shared/components/controllers/screen-lifecycle.js.map +1 -1
- package/lib/module/shared/components/create-transition-aware-component.js +11 -14
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/root-transition-aware.js +1 -1
- package/lib/module/shared/components/root-transition-aware.js.map +1 -1
- package/lib/module/shared/configs/presets.js +20 -9
- package/lib/module/shared/configs/presets.js.map +1 -1
- package/lib/module/shared/constants.js +0 -1
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/hooks/animation/use-associated-style.js +9 -10
- package/lib/module/shared/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/module/shared/hooks/animation/use-screen-animation.js +7 -22
- package/lib/module/shared/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/module/shared/hooks/gestures/use-build-gestures.js +4 -4
- package/lib/module/shared/hooks/gestures/use-build-gestures.js.map +1 -1
- package/lib/module/shared/hooks/gestures/use-parent-gesture-registry.js +1 -1
- package/lib/module/shared/hooks/gestures/use-parent-gesture-registry.js.map +1 -1
- package/lib/module/shared/hooks/gestures/use-scroll-registry.js +1 -1
- package/lib/module/shared/hooks/gestures/use-scroll-registry.js.map +1 -1
- package/lib/module/shared/hooks/reanimated/use-shared-value-state.js.map +1 -0
- package/lib/module/shared/hooks/use-stable-callback-value.js.map +1 -1
- package/lib/module/shared/hooks/use-stable-callback.js.map +1 -1
- package/lib/module/shared/providers/{gestures.js → gestures.provider.js} +1 -1
- package/lib/module/shared/providers/gestures.provider.js.map +1 -0
- package/lib/module/shared/providers/{keys.js → keys.provider.js} +1 -1
- package/lib/module/shared/providers/keys.provider.js.map +1 -0
- package/lib/module/shared/providers/register-bounds.provider.js +202 -0
- package/lib/module/shared/providers/register-bounds.provider.js.map +1 -0
- package/lib/module/shared/providers/{screen-transition-provider.js → screen-transition.provider.js} +4 -4
- package/lib/module/shared/providers/{screen-transition-provider.js.map → screen-transition.provider.js.map} +1 -1
- package/lib/module/shared/providers/{transition-styles.js → transition-styles.provider.js} +6 -9
- package/lib/module/shared/providers/transition-styles.provider.js.map +1 -0
- package/lib/module/shared/stores/{animation-store.js → animation.store.js} +1 -1
- package/lib/module/shared/stores/{animation-store.js.map → animation.store.js.map} +1 -1
- package/lib/module/shared/stores/bounds.store.js +137 -0
- package/lib/module/shared/stores/bounds.store.js.map +1 -0
- package/lib/module/shared/stores/{gesture-store.js → gesture.store.js} +1 -1
- package/lib/module/shared/stores/{gesture-store.js.map → gesture.store.js.map} +1 -1
- package/lib/module/shared/types/animation.types.js +4 -0
- package/lib/module/shared/types/animation.types.js.map +1 -0
- package/lib/module/shared/types/bounds.types.js +4 -0
- package/lib/module/shared/types/bounds.types.js.map +1 -0
- package/lib/module/shared/types/core.types.js +4 -0
- package/lib/{commonjs/shared/types/bounds.js.map → module/shared/types/core.types.js.map} +1 -1
- package/lib/module/shared/types/{gesture.js → gesture.types.js} +1 -1
- package/lib/module/shared/types/gesture.types.js.map +1 -0
- package/lib/module/shared/types/utils.types.js +2 -0
- package/lib/{commonjs/shared/types/utils.js.map → module/shared/types/utils.types.js.map} +1 -1
- package/lib/module/shared/utils/animation/derivations.js +1 -7
- package/lib/module/shared/utils/animation/derivations.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/geometry.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/is-bounds-equal.js +14 -0
- package/lib/module/shared/utils/bounds/helpers/is-bounds-equal.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/style-composers.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/styles.js.map +1 -0
- package/lib/module/shared/utils/bounds/index.js +45 -35
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/types/builder.js.map +1 -0
- package/lib/module/shared/utils/bounds/{_types/builder.js.map → types/geometry.js.map} +1 -1
- package/lib/module/shared/utils/create-provider.js.map +1 -0
- package/lib/module/shared/utils/gesture/apply-offset-rules.js +1 -1
- package/lib/module/shared/utils/gesture/apply-offset-rules.js.map +1 -1
- package/lib/module/shared/utils/gesture/check-gesture-activation.js +1 -1
- package/lib/module/shared/utils/gesture/check-gesture-activation.js.map +1 -1
- package/lib/module/shared/utils/reset-stores-for-screen.js +13 -0
- package/lib/module/shared/utils/reset-stores-for-screen.js.map +1 -0
- package/lib/typescript/blank-stack/components/StackView.d.ts.map +1 -1
- package/lib/typescript/blank-stack/hooks/use-overlay-animation.d.ts +1 -1
- package/lib/typescript/blank-stack/hooks/use-overlay-animation.d.ts.map +1 -1
- package/lib/typescript/blank-stack/index.d.ts +0 -1
- package/lib/typescript/blank-stack/index.d.ts.map +1 -1
- package/lib/typescript/blank-stack/types.d.ts +2 -2
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/native-stack/types.d.ts +1 -1
- package/lib/typescript/native-stack/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/controllers/screen-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/configs/index.d.ts +9 -3
- package/lib/typescript/shared/configs/index.d.ts.map +1 -1
- package/lib/typescript/shared/configs/presets.d.ts +10 -4
- package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +6 -6
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/animation/use-screen-animation.d.ts +2 -2
- 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 +2 -2
- package/lib/typescript/shared/hooks/gestures/use-build-gestures.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/reanimated/use-shared-value-state.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/use-stable-callback-value.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/use-stable-callback.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +17 -11
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/{gestures.d.ts → gestures.provider.d.ts} +2 -2
- package/lib/typescript/shared/providers/gestures.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/{keys.d.ts → keys.provider.d.ts} +2 -2
- package/lib/typescript/shared/providers/keys.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/register-bounds.provider.d.ts +17 -0
- package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/{screen-transition-provider.d.ts → screen-transition.provider.d.ts} +2 -2
- package/lib/typescript/shared/providers/{screen-transition-provider.d.ts.map → screen-transition.provider.d.ts.map} +1 -1
- package/lib/typescript/shared/providers/transition-styles.provider.d.ts +14 -0
- package/lib/typescript/shared/providers/transition-styles.provider.d.ts.map +1 -0
- package/lib/typescript/shared/stores/{animation-store.d.ts → animation.store.d.ts} +2 -2
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds.store.d.ts +29 -0
- package/lib/typescript/shared/stores/bounds.store.d.ts.map +1 -0
- package/lib/typescript/shared/stores/{gesture-store.d.ts → gesture.store.d.ts} +3 -3
- package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -0
- package/lib/typescript/shared/types/{animation.d.ts → animation.types.d.ts} +48 -20
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -0
- package/lib/typescript/shared/types/{bounds.d.ts → bounds.types.d.ts} +4 -4
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -0
- package/lib/typescript/shared/types/{core.d.ts → core.types.d.ts} +3 -3
- package/lib/typescript/shared/types/core.types.d.ts.map +1 -0
- package/lib/typescript/shared/types/{gesture.d.ts → gesture.types.d.ts} +1 -1
- package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -0
- package/lib/typescript/shared/types/{utils.d.ts → utils.types.d.ts} +1 -1
- package/lib/typescript/shared/types/utils.types.d.ts.map +1 -0
- package/lib/typescript/shared/utils/animation/derivations.d.ts +2 -4
- package/lib/typescript/shared/utils/animation/derivations.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/start-screen-transition.d.ts +2 -2
- package/lib/typescript/shared/utils/animation/start-screen-transition.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/constants.d.ts +3 -3
- package/lib/typescript/shared/utils/bounds/constants.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/{_utils → helpers}/geometry.d.ts +3 -3
- package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/is-bounds-equal.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/{_utils → helpers}/style-composers.d.ts +2 -2
- package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/{_utils → helpers}/styles.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/index.d.ts +3 -4
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/{_types → types}/builder.d.ts +13 -34
- package/lib/typescript/shared/utils/bounds/types/builder.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/types/geometry.d.ts.map +1 -0
- package/lib/typescript/shared/{providers/utils → utils}/create-provider.d.ts +2 -2
- package/lib/typescript/shared/utils/create-provider.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/apply-offset-rules.d.ts +2 -2
- package/lib/typescript/shared/utils/gesture/apply-offset-rules.d.ts.map +1 -1
- package/lib/typescript/shared/utils/gesture/check-gesture-activation.d.ts +2 -2
- package/lib/typescript/shared/utils/gesture/check-gesture-activation.d.ts.map +1 -1
- package/lib/typescript/shared/utils/gesture/reset-gesture-values.d.ts +2 -2
- package/lib/typescript/shared/utils/gesture/reset-gesture-values.d.ts.map +1 -1
- package/lib/typescript/shared/utils/gesture/velocity.d.ts +1 -1
- package/lib/typescript/shared/utils/reset-stores-for-screen.d.ts +6 -0
- package/lib/typescript/shared/utils/reset-stores-for-screen.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/blank-stack/components/Overlay.tsx +1 -1
- package/src/blank-stack/components/Screens.tsx +1 -1
- package/src/blank-stack/components/StackView.tsx +45 -48
- package/src/blank-stack/hooks/use-overlay-animation.tsx +4 -4
- package/src/blank-stack/index.ts +0 -1
- package/src/blank-stack/types.ts +2 -2
- package/src/native-stack/types.ts +1 -1
- package/src/native-stack/views/NativeStackView.native.tsx +1 -1
- package/src/shared/components/controllers/screen-lifecycle.tsx +12 -10
- package/src/shared/components/create-transition-aware-component.tsx +23 -27
- package/src/shared/components/root-transition-aware.tsx +1 -1
- package/src/shared/configs/presets.ts +31 -17
- package/src/shared/constants.ts +6 -7
- package/src/shared/hooks/animation/use-associated-style.tsx +8 -9
- package/src/shared/hooks/animation/use-screen-animation.tsx +8 -26
- package/src/shared/hooks/gestures/use-build-gestures.tsx +5 -5
- package/src/shared/hooks/gestures/use-parent-gesture-registry.tsx +1 -1
- package/src/shared/hooks/gestures/use-scroll-registry.tsx +2 -2
- package/src/shared/index.ts +2 -2
- package/src/shared/providers/{gestures.tsx → gestures.provider.tsx} +1 -1
- package/src/shared/providers/{keys.tsx → keys.provider.tsx} +1 -1
- package/src/shared/providers/register-bounds.provider.tsx +284 -0
- package/src/shared/providers/{screen-transition-provider.tsx → screen-transition.provider.tsx} +3 -3
- package/src/shared/providers/{transition-styles.tsx → transition-styles.provider.tsx} +13 -14
- package/src/shared/stores/{animation-store.ts → animation.store.ts} +1 -1
- package/src/shared/stores/bounds.store.ts +166 -0
- package/src/shared/stores/{gesture-store.ts → gesture.store.ts} +2 -2
- package/src/shared/types/{animation.ts → animation.types.ts} +60 -19
- package/src/shared/types/{bounds.ts → bounds.types.ts} +3 -3
- package/src/shared/types/{core.ts → core.types.ts} +10 -2
- package/src/shared/utils/animation/derivations.ts +2 -8
- package/src/shared/utils/animation/start-screen-transition.ts +2 -2
- package/src/shared/utils/bounds/constants.ts +3 -3
- package/src/shared/utils/bounds/{_utils → helpers}/geometry.ts +3 -3
- package/src/shared/utils/bounds/{_utils → helpers}/is-bounds-equal.ts +3 -3
- package/src/shared/utils/bounds/{_utils → helpers}/style-composers.ts +2 -2
- package/src/shared/utils/bounds/{_utils → helpers}/styles.ts +1 -1
- package/src/shared/utils/bounds/index.ts +53 -55
- package/src/shared/utils/bounds/{_types → types}/builder.ts +19 -37
- package/src/shared/{providers/utils → utils}/create-provider.tsx +3 -9
- package/src/shared/utils/gesture/apply-offset-rules.ts +2 -2
- package/src/shared/utils/gesture/check-gesture-activation.ts +2 -2
- package/src/shared/utils/gesture/reset-gesture-values.ts +2 -2
- package/src/shared/utils/gesture/velocity.ts +1 -1
- package/src/shared/utils/reset-stores-for-screen.ts +11 -0
- package/lib/commonjs/blank-stack/providers/blank-stack-state.js +0 -65
- package/lib/commonjs/blank-stack/providers/blank-stack-state.js.map +0 -1
- package/lib/commonjs/shared/hooks/bounds/use-bound-registry.js +0 -152
- package/lib/commonjs/shared/hooks/bounds/use-bound-registry.js.map +0 -1
- package/lib/commonjs/shared/hooks/use-derived-value-state.js +0 -33
- package/lib/commonjs/shared/hooks/use-derived-value-state.js.map +0 -1
- package/lib/commonjs/shared/hooks/use-shared-value-state.js.map +0 -1
- package/lib/commonjs/shared/providers/gestures.js.map +0 -1
- package/lib/commonjs/shared/providers/keys.js.map +0 -1
- package/lib/commonjs/shared/providers/transition-styles.js.map +0 -1
- package/lib/commonjs/shared/providers/utils/create-provider.js.map +0 -1
- package/lib/commonjs/shared/stores/bound-store/_utils.js +0 -118
- package/lib/commonjs/shared/stores/bound-store/_utils.js.map +0 -1
- package/lib/commonjs/shared/stores/bound-store/index.js +0 -127
- package/lib/commonjs/shared/stores/bound-store/index.js.map +0 -1
- package/lib/commonjs/shared/stores/utils/reset-stores-for-screen.js +0 -19
- package/lib/commonjs/shared/stores/utils/reset-stores-for-screen.js.map +0 -1
- package/lib/commonjs/shared/types/gesture.js.map +0 -1
- package/lib/commonjs/shared/types/utils.js +0 -2
- package/lib/commonjs/shared/utils/bounds/_types/geometry.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/_types/get-bounds.js +0 -6
- package/lib/commonjs/shared/utils/bounds/_types/get-bounds.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/_utils/flatten-styles.js +0 -27
- package/lib/commonjs/shared/utils/bounds/_utils/flatten-styles.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/_utils/geometry.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/_utils/get-bounds.js +0 -49
- package/lib/commonjs/shared/utils/bounds/_utils/get-bounds.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/_utils/is-bounds-equal.js +0 -19
- package/lib/commonjs/shared/utils/bounds/_utils/is-bounds-equal.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/_utils/style-composers.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/_utils/styles.js.map +0 -1
- package/lib/module/blank-stack/providers/blank-stack-state.js +0 -59
- package/lib/module/blank-stack/providers/blank-stack-state.js.map +0 -1
- package/lib/module/shared/hooks/bounds/use-bound-registry.js +0 -146
- package/lib/module/shared/hooks/bounds/use-bound-registry.js.map +0 -1
- package/lib/module/shared/hooks/use-derived-value-state.js +0 -30
- package/lib/module/shared/hooks/use-derived-value-state.js.map +0 -1
- package/lib/module/shared/hooks/use-shared-value-state.js.map +0 -1
- package/lib/module/shared/providers/gestures.js.map +0 -1
- package/lib/module/shared/providers/keys.js.map +0 -1
- package/lib/module/shared/providers/transition-styles.js.map +0 -1
- package/lib/module/shared/providers/utils/create-provider.js.map +0 -1
- package/lib/module/shared/stores/bound-store/_utils.js +0 -113
- package/lib/module/shared/stores/bound-store/_utils.js.map +0 -1
- package/lib/module/shared/stores/bound-store/index.js +0 -123
- package/lib/module/shared/stores/bound-store/index.js.map +0 -1
- package/lib/module/shared/stores/utils/reset-stores-for-screen.js +0 -15
- package/lib/module/shared/stores/utils/reset-stores-for-screen.js.map +0 -1
- package/lib/module/shared/types/animation.js +0 -4
- package/lib/module/shared/types/animation.js.map +0 -1
- package/lib/module/shared/types/bounds.js +0 -4
- package/lib/module/shared/types/bounds.js.map +0 -1
- package/lib/module/shared/types/core.js +0 -4
- package/lib/module/shared/types/core.js.map +0 -1
- package/lib/module/shared/types/gesture.js.map +0 -1
- package/lib/module/shared/types/utils.js +0 -2
- package/lib/module/shared/types/utils.js.map +0 -1
- package/lib/module/shared/utils/bounds/_types/geometry.js.map +0 -1
- package/lib/module/shared/utils/bounds/_types/get-bounds.js +0 -4
- package/lib/module/shared/utils/bounds/_types/get-bounds.js.map +0 -1
- package/lib/module/shared/utils/bounds/_utils/flatten-styles.js +0 -23
- package/lib/module/shared/utils/bounds/_utils/flatten-styles.js.map +0 -1
- package/lib/module/shared/utils/bounds/_utils/geometry.js.map +0 -1
- package/lib/module/shared/utils/bounds/_utils/get-bounds.js +0 -44
- package/lib/module/shared/utils/bounds/_utils/get-bounds.js.map +0 -1
- package/lib/module/shared/utils/bounds/_utils/is-bounds-equal.js +0 -14
- package/lib/module/shared/utils/bounds/_utils/is-bounds-equal.js.map +0 -1
- package/lib/module/shared/utils/bounds/_utils/style-composers.js.map +0 -1
- package/lib/module/shared/utils/bounds/_utils/styles.js.map +0 -1
- package/lib/typescript/blank-stack/providers/blank-stack-state.d.ts +0 -13
- package/lib/typescript/blank-stack/providers/blank-stack-state.d.ts.map +0 -1
- package/lib/typescript/shared/hooks/bounds/use-bound-registry.d.ts +0 -17
- package/lib/typescript/shared/hooks/bounds/use-bound-registry.d.ts.map +0 -1
- package/lib/typescript/shared/hooks/use-derived-value-state.d.ts +0 -9
- package/lib/typescript/shared/hooks/use-derived-value-state.d.ts.map +0 -1
- package/lib/typescript/shared/hooks/use-shared-value-state.d.ts.map +0 -1
- package/lib/typescript/shared/providers/gestures.d.ts.map +0 -1
- package/lib/typescript/shared/providers/keys.d.ts.map +0 -1
- package/lib/typescript/shared/providers/transition-styles.d.ts +0 -11
- package/lib/typescript/shared/providers/transition-styles.d.ts.map +0 -1
- package/lib/typescript/shared/providers/utils/create-provider.d.ts.map +0 -1
- package/lib/typescript/shared/stores/animation-store.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bound-store/_utils.d.ts +0 -24
- package/lib/typescript/shared/stores/bound-store/_utils.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bound-store/index.d.ts +0 -24
- package/lib/typescript/shared/stores/bound-store/index.d.ts.map +0 -1
- package/lib/typescript/shared/stores/gesture-store.d.ts.map +0 -1
- package/lib/typescript/shared/stores/utils/reset-stores-for-screen.d.ts +0 -6
- package/lib/typescript/shared/stores/utils/reset-stores-for-screen.d.ts.map +0 -1
- package/lib/typescript/shared/types/animation.d.ts.map +0 -1
- package/lib/typescript/shared/types/bounds.d.ts.map +0 -1
- package/lib/typescript/shared/types/core.d.ts.map +0 -1
- package/lib/typescript/shared/types/gesture.d.ts.map +0 -1
- package/lib/typescript/shared/types/utils.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/_types/builder.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/_types/geometry.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/_types/get-bounds.d.ts +0 -10
- package/lib/typescript/shared/utils/bounds/_types/get-bounds.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/_utils/flatten-styles.d.ts +0 -2
- package/lib/typescript/shared/utils/bounds/_utils/flatten-styles.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/_utils/geometry.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/_utils/get-bounds.d.ts +0 -4
- package/lib/typescript/shared/utils/bounds/_utils/get-bounds.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/_utils/is-bounds-equal.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/_utils/style-composers.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/_utils/styles.d.ts.map +0 -1
- package/src/blank-stack/providers/blank-stack-state.tsx +0 -90
- package/src/shared/hooks/bounds/use-bound-registry.tsx +0 -184
- package/src/shared/hooks/use-derived-value-state.ts +0 -41
- package/src/shared/stores/bound-store/_utils.ts +0 -161
- package/src/shared/stores/bound-store/index.ts +0 -148
- package/src/shared/stores/utils/reset-stores-for-screen.ts +0 -13
- package/src/shared/utils/bounds/_types/get-bounds.ts +0 -10
- package/src/shared/utils/bounds/_utils/flatten-styles.ts +0 -21
- package/src/shared/utils/bounds/_utils/get-bounds.ts +0 -54
- /package/lib/commonjs/shared/hooks/{use-shared-value-state.js → reanimated/use-shared-value-state.js} +0 -0
- /package/lib/commonjs/shared/utils/bounds/{_utils → helpers}/geometry.js +0 -0
- /package/lib/commonjs/shared/utils/bounds/{_utils → helpers}/style-composers.js +0 -0
- /package/lib/commonjs/shared/utils/bounds/{_utils → helpers}/styles.js +0 -0
- /package/lib/commonjs/shared/utils/bounds/{_types → types}/builder.js +0 -0
- /package/lib/commonjs/shared/utils/bounds/{_types → types}/geometry.js +0 -0
- /package/lib/commonjs/shared/{providers/utils → utils}/create-provider.js +0 -0
- /package/lib/module/shared/hooks/{use-shared-value-state.js → reanimated/use-shared-value-state.js} +0 -0
- /package/lib/module/shared/utils/bounds/{_utils → helpers}/geometry.js +0 -0
- /package/lib/module/shared/utils/bounds/{_utils → helpers}/style-composers.js +0 -0
- /package/lib/module/shared/utils/bounds/{_utils → helpers}/styles.js +0 -0
- /package/lib/module/shared/utils/bounds/{_types → types}/builder.js +0 -0
- /package/lib/module/shared/utils/bounds/{_types → types}/geometry.js +0 -0
- /package/lib/module/shared/{providers/utils → utils}/create-provider.js +0 -0
- /package/lib/typescript/shared/hooks/{use-shared-value-state.d.ts → reanimated/use-shared-value-state.d.ts} +0 -0
- /package/lib/typescript/shared/utils/bounds/{_utils → helpers}/is-bounds-equal.d.ts +0 -0
- /package/lib/typescript/shared/utils/bounds/{_types → types}/geometry.d.ts +0 -0
- /package/src/shared/hooks/{use-shared-value-state.ts → reanimated/use-shared-value-state.ts} +0 -0
- /package/src/shared/hooks/{use-stable-callback-value.tsx → use-stable-callback-value.ts} +0 -0
- /package/src/shared/hooks/{use-stable-callback.tsx → use-stable-callback.ts} +0 -0
- /package/src/shared/types/{gesture.ts → gesture.types.ts} +0 -0
- /package/src/shared/types/{utils.ts → utils.types.ts} +0 -0
- /package/src/shared/utils/bounds/{_types → types}/geometry.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","useStableCallback","callback","callbackRef","useRef","useEffect","current","useCallback","args"],"sourceRoot":"../../../../src","sources":["shared/hooks/use-stable-callback.
|
|
1
|
+
{"version":3,"names":["_react","require","useStableCallback","callback","callbackRef","useRef","useEffect","current","useCallback","args"],"sourceRoot":"../../../../src","sources":["shared/hooks/use-stable-callback.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEe,SAASC,iBAAiBA,CACxCC,QAAW,EACV;EACD,MAAMC,WAAW,GAAG,IAAAC,aAAM,EAACF,QAAQ,CAAC;EAEpC,IAAAG,gBAAS,EAAC,MAAM;IACfF,WAAW,CAACG,OAAO,GAAGJ,QAAQ;EAC/B,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEd,OAAO,IAAAK,kBAAW,EAAC,CAAC,GAAGC,IAAmB,KAAK;IAC9CL,WAAW,CAACG,OAAO,CAAC,GAAGE,IAAI,CAAC;EAC7B,CAAC,EAAE,EAAE,CAAC;AACP","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeGestureHandler","_reactNativeReanimated","_useBuildGestures","_jsxRuntime","GestureContext","createContext","undefined","ScreenGestureProvider","children","parentContext","useContext","scrollConfig","useSharedValue","panGesture","nativeGesture","gestureAnimationValues","useBuildGestures","value","useMemo","jsx","Provider","GestureDetector","gesture","View","style","styles","container","exports","useGestureContext","context","Error","StyleSheet","create","flex"],"sourceRoot":"../../../../src","sources":["shared/providers/gestures.provider.tsx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qBAAA;AAEK,MAAMqB,iBAAiB,GAAGA,CAAA,KAAM;EACtC,MAAMC,OAAO,GAAG,IAAAnB,iBAAU,EAACN,cAAc,CAAC;EAE1C,IAAI,CAACyB,OAAO,EAAE;IACb,MAAM,IAAIC,KAAK,CACd,+DACD,CAAC;EACF;EAEA,OAAOD,OAAO;AACf,CAAC;AAACF,OAAA,CAAAC,iBAAA,GAAAA,iBAAA;AAEF,MAAMH,MAAM,GAAGM,uBAAU,CAACC,MAAM,CAAC;EAChCN,SAAS,EAAE;IACVO,IAAI,EAAE;EACP;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_jsxRuntime","KeysContext","createContext","undefined","KeysProvider","children","previous","current","next","value","useMemo","jsx","Provider","useKeys","context","useContext","Error"],"sourceRoot":"../../../../src","sources":["shared/providers/keys.provider.tsx"],"mappings":";;;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AAA2D,IAAAC,WAAA,GAAAD,OAAA;AAiB3D,MAAME,WAAW,gBAAG,IAAAC,oBAAa,EAE/BC,SAAS,CAAC;AASL,SAASC,YAAYA,CAA2C;EACtEC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC;AAC+B,CAAC,EAAE;EAClC,MAAMC,KAAK,GAAG,IAAAC,cAAO,EACpB,OAAO;IAAEJ,QAAQ;IAAEC,OAAO;IAAEC;EAAK,CAAC,CAAC,EACnC,CAACF,QAAQ,EAAEC,OAAO,EAAEC,IAAI,CACzB,CAAC;EAED,oBAAO,IAAAR,WAAA,CAAAW,GAAA,EAACV,WAAW,CAACW,QAAQ;IAACH,KAAK,EAAEA,KAAM;IAAAJ,QAAA,EAAEA;EAAQ,CAAuB,CAAC;AAC7E;AAEO,SAASQ,OAAOA,CAAA,EAEW;EACjC,MAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACd,WAAW,CAAC;EACvC,IAAIa,OAAO,KAAKX,SAAS,EAAE;IAC1B,MAAM,IAAIa,KAAK,CAAC,4CAA4C,CAAC;EAC9D;EACA,OAAOF,OAAO;AACf","ignoreList":[]}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RegisterBoundsProvider = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
+
var _useStableCallback = _interopRequireDefault(require("../hooks/use-stable-callback"));
|
|
10
|
+
var _useStableCallbackValue = _interopRequireDefault(require("../hooks/use-stable-callback-value"));
|
|
11
|
+
var _animation = require("../stores/animation.store");
|
|
12
|
+
var _bounds = require("../stores/bounds.store");
|
|
13
|
+
var _styles = require("../utils/bounds/helpers/styles");
|
|
14
|
+
var _createProvider = _interopRequireDefault(require("../utils/create-provider"));
|
|
15
|
+
var _keys = require("./keys.provider");
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
/**
|
|
18
|
+
* Gets the parent screen's route key for nested navigators.
|
|
19
|
+
* Returns undefined if we're not inside a nested navigator.
|
|
20
|
+
*/
|
|
21
|
+
const getParentScreenKey = current => {
|
|
22
|
+
const parent = current.navigation.getParent();
|
|
23
|
+
if (!parent) return undefined;
|
|
24
|
+
const parentState = parent.getState();
|
|
25
|
+
if (!parentState?.routes) return undefined;
|
|
26
|
+
|
|
27
|
+
// Check if our route key exists directly in parent's routes
|
|
28
|
+
const existsInParent = parentState.routes.some(r => r.key === current.route.key);
|
|
29
|
+
|
|
30
|
+
// If we don't exist in parent's routes, we're nested inside the focused route
|
|
31
|
+
if (!existsInParent && parentState.index !== undefined) {
|
|
32
|
+
return parentState.routes[parentState.index]?.key;
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Handles initial layout measurement for destination elements.
|
|
39
|
+
* Only measures if an animation is in progress (local or parent).
|
|
40
|
+
*/
|
|
41
|
+
const useInitialLayoutHandler = params => {
|
|
42
|
+
const {
|
|
43
|
+
sharedBoundTag,
|
|
44
|
+
currentScreenKey,
|
|
45
|
+
parentScreenKey,
|
|
46
|
+
maybeMeasureAndStore
|
|
47
|
+
} = params;
|
|
48
|
+
const isAnimating = _animation.AnimationStore.getAnimation(currentScreenKey, "animating");
|
|
49
|
+
const isParentAnimating = parentScreenKey ? _animation.AnimationStore.getAnimation(parentScreenKey, "animating") : null;
|
|
50
|
+
const hasMeasuredOnLayout = (0, _reactNativeReanimated.useSharedValue)(false);
|
|
51
|
+
return (0, _react.useCallback)(() => {
|
|
52
|
+
"worklet";
|
|
53
|
+
|
|
54
|
+
if (!sharedBoundTag || hasMeasuredOnLayout.value) return;
|
|
55
|
+
if (!isAnimating.value && !isParentAnimating?.value) return;
|
|
56
|
+
maybeMeasureAndStore({
|
|
57
|
+
shouldSetSource: false,
|
|
58
|
+
shouldSetDestination: true
|
|
59
|
+
});
|
|
60
|
+
hasMeasuredOnLayout.value = true;
|
|
61
|
+
}, [sharedBoundTag, hasMeasuredOnLayout, isAnimating, isParentAnimating, maybeMeasureAndStore]);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Measures non-pressable elements when screen becomes blurred.
|
|
66
|
+
* Captures bounds right before transition starts.
|
|
67
|
+
*/
|
|
68
|
+
const useBlurMeasurement = params => {
|
|
69
|
+
const {
|
|
70
|
+
sharedBoundTag,
|
|
71
|
+
next,
|
|
72
|
+
onPress,
|
|
73
|
+
maybeMeasureAndStore
|
|
74
|
+
} = params;
|
|
75
|
+
const prevNextRef = (0, _react.useRef)(next);
|
|
76
|
+
(0, _react.useLayoutEffect)(() => {
|
|
77
|
+
if (!sharedBoundTag || onPress) return;
|
|
78
|
+
const hadNext = !!prevNextRef.current;
|
|
79
|
+
const hasNext = !!next;
|
|
80
|
+
|
|
81
|
+
// Screen went from focused to blurred
|
|
82
|
+
if (!hadNext && hasNext) {
|
|
83
|
+
(0, _reactNativeReanimated.runOnUI)(maybeMeasureAndStore)({
|
|
84
|
+
shouldSetSource: true
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
prevNextRef.current = next;
|
|
88
|
+
}, [next, sharedBoundTag, onPress, maybeMeasureAndStore]);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Syncs child measurements when parent updates.
|
|
93
|
+
*/
|
|
94
|
+
const useParentSyncReaction = params => {
|
|
95
|
+
const {
|
|
96
|
+
parentContext,
|
|
97
|
+
maybeMeasureAndStore
|
|
98
|
+
} = params;
|
|
99
|
+
(0, _reactNativeReanimated.useAnimatedReaction)(() => parentContext?.updateSignal.value, value => {
|
|
100
|
+
"worklet";
|
|
101
|
+
|
|
102
|
+
if (value === 0 || value === undefined) return;
|
|
103
|
+
maybeMeasureAndStore();
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
const {
|
|
107
|
+
RegisterBoundsProvider,
|
|
108
|
+
useRegisterBoundsContext
|
|
109
|
+
} = (0, _createProvider.default)("RegisterBounds", {
|
|
110
|
+
guarded: false
|
|
111
|
+
})(({
|
|
112
|
+
style,
|
|
113
|
+
onPress,
|
|
114
|
+
sharedBoundTag,
|
|
115
|
+
animatedRef,
|
|
116
|
+
children
|
|
117
|
+
}) => {
|
|
118
|
+
const {
|
|
119
|
+
current,
|
|
120
|
+
next
|
|
121
|
+
} = (0, _keys.useKeys)();
|
|
122
|
+
const currentScreenKey = current.route.key;
|
|
123
|
+
const parentScreenKey = getParentScreenKey(current);
|
|
124
|
+
|
|
125
|
+
// Context & signals
|
|
126
|
+
const parentContext = useRegisterBoundsContext();
|
|
127
|
+
const ownSignal = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
128
|
+
const updateSignal = parentContext?.updateSignal ?? ownSignal;
|
|
129
|
+
const isAnimating = _animation.AnimationStore.getAnimation(currentScreenKey, "animating");
|
|
130
|
+
const preparedStyles = (0, _react.useMemo)(() => (0, _styles.prepareStyleForBounds)(style), [style]);
|
|
131
|
+
const emitUpdate = (0, _useStableCallbackValue.default)(() => {
|
|
132
|
+
"worklet";
|
|
133
|
+
|
|
134
|
+
const isRoot = !parentContext;
|
|
135
|
+
if (isRoot) updateSignal.value = updateSignal.value + 1;
|
|
136
|
+
});
|
|
137
|
+
const maybeMeasureAndStore = (0, _useStableCallbackValue.default)(({
|
|
138
|
+
onPress,
|
|
139
|
+
shouldSetSource,
|
|
140
|
+
shouldSetDestination
|
|
141
|
+
} = {}) => {
|
|
142
|
+
"worklet";
|
|
143
|
+
|
|
144
|
+
if (!sharedBoundTag) return;
|
|
145
|
+
const measured = (0, _reactNativeReanimated.measure)(animatedRef);
|
|
146
|
+
if (!measured) return;
|
|
147
|
+
emitUpdate();
|
|
148
|
+
|
|
149
|
+
// Always register occurrence
|
|
150
|
+
_bounds.BoundStore.registerOccurrence(sharedBoundTag, currentScreenKey, measured, preparedStyles);
|
|
151
|
+
|
|
152
|
+
// Set as source (on press or blur)
|
|
153
|
+
if (shouldSetSource) {
|
|
154
|
+
if (isAnimating.value) {
|
|
155
|
+
const existing = _bounds.BoundStore.getOccurrence(sharedBoundTag, currentScreenKey);
|
|
156
|
+
_bounds.BoundStore.setLinkSource(sharedBoundTag, currentScreenKey, existing.bounds, preparedStyles, parentScreenKey);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
_bounds.BoundStore.setLinkSource(sharedBoundTag, currentScreenKey, measured, preparedStyles, parentScreenKey);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Set as destination (on mount during animation)
|
|
163
|
+
if (shouldSetDestination) {
|
|
164
|
+
_bounds.BoundStore.setLinkDestination(sharedBoundTag, currentScreenKey, measured, preparedStyles, parentScreenKey);
|
|
165
|
+
}
|
|
166
|
+
if (onPress) (0, _reactNativeReanimated.runOnJS)(onPress)();
|
|
167
|
+
});
|
|
168
|
+
const handleInitialLayout = useInitialLayoutHandler({
|
|
169
|
+
sharedBoundTag,
|
|
170
|
+
currentScreenKey,
|
|
171
|
+
parentScreenKey,
|
|
172
|
+
maybeMeasureAndStore
|
|
173
|
+
});
|
|
174
|
+
const captureActiveOnPress = (0, _useStableCallback.default)(() => {
|
|
175
|
+
if (!sharedBoundTag) {
|
|
176
|
+
onPress?.();
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
(0, _reactNativeReanimated.runOnUI)(maybeMeasureAndStore)({
|
|
180
|
+
onPress,
|
|
181
|
+
shouldSetSource: true
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
// Side effects
|
|
186
|
+
useBlurMeasurement({
|
|
187
|
+
sharedBoundTag,
|
|
188
|
+
next,
|
|
189
|
+
onPress,
|
|
190
|
+
maybeMeasureAndStore
|
|
191
|
+
});
|
|
192
|
+
useParentSyncReaction({
|
|
193
|
+
parentContext,
|
|
194
|
+
maybeMeasureAndStore
|
|
195
|
+
});
|
|
196
|
+
return {
|
|
197
|
+
value: {
|
|
198
|
+
updateSignal
|
|
199
|
+
},
|
|
200
|
+
children: children({
|
|
201
|
+
handleInitialLayout,
|
|
202
|
+
captureActiveOnPress
|
|
203
|
+
})
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
exports.RegisterBoundsProvider = RegisterBoundsProvider;
|
|
207
|
+
//# sourceMappingURL=register-bounds.provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_useStableCallback","_interopRequireDefault","_useStableCallbackValue","_animation","_bounds","_styles","_createProvider","_keys","e","__esModule","default","getParentScreenKey","current","parent","navigation","getParent","undefined","parentState","getState","routes","existsInParent","some","r","key","route","index","useInitialLayoutHandler","params","sharedBoundTag","currentScreenKey","parentScreenKey","maybeMeasureAndStore","isAnimating","AnimationStore","getAnimation","isParentAnimating","hasMeasuredOnLayout","useSharedValue","useCallback","value","shouldSetSource","shouldSetDestination","useBlurMeasurement","next","onPress","prevNextRef","useRef","useLayoutEffect","hadNext","hasNext","runOnUI","useParentSyncReaction","parentContext","useAnimatedReaction","updateSignal","RegisterBoundsProvider","useRegisterBoundsContext","createProvider","guarded","style","animatedRef","children","useKeys","ownSignal","preparedStyles","useMemo","prepareStyleForBounds","emitUpdate","useStableCallbackValue","isRoot","measured","measure","BoundStore","registerOccurrence","existing","getOccurrence","setLinkSource","bounds","setLinkDestination","runOnJS","handleInitialLayout","captureActiveOnPress","useStableCallback","exports"],"sourceRoot":"../../../../src","sources":["shared/providers/register-bounds.provider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,sBAAA,GAAAD,OAAA;AAUA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,uBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,eAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AAAqE,SAAAG,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAyBrE;AACA;AACA;AACA;AACA,MAAMG,kBAAkB,GAAIC,OAA6B,IAAK;EAC7D,MAAMC,MAAM,GAAGD,OAAO,CAACE,UAAU,CAACC,SAAS,CAAC,CAAC;EAC7C,IAAI,CAACF,MAAM,EAAE,OAAOG,SAAS;EAE7B,MAAMC,WAAW,GAAGJ,MAAM,CAACK,QAAQ,CAAC,CAAC;EACrC,IAAI,CAACD,WAAW,EAAEE,MAAM,EAAE,OAAOH,SAAS;;EAE1C;EACA,MAAMI,cAAc,GAAGH,WAAW,CAACE,MAAM,CAACE,IAAI,CAC5CC,CAAC,IAAKA,CAAC,CAACC,GAAG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;QACD;MACD;MACA0C,kBAAU,CAACI,aAAa,CACvBhD,cAAc,EACdC,gBAAgB,EAChByC,QAAQ,EACRN,cAAc,EACdlC,eACD,CAAC;IACF;;IAEA;IACA,IAAIW,oBAAoB,EAAE;MACzB+B,kBAAU,CAACM,kBAAkB,CAC5BlD,cAAc,EACdC,gBAAgB,EAChByC,QAAQ,EACRN,cAAc,EACdlC,eACD,CAAC;IACF;IAEA,IAAIc,OAAO,EAAE,IAAAmC,8BAAO,EAACnC,OAAO,CAAC,CAAC,CAAC;EAChC,CACD,CAAC;EAED,MAAMoC,mBAAmB,GAAGtD,uBAAuB,CAAC;IACnDE,cAAc;IACdC,gBAAgB;IAChBC,eAAe;IACfC;EACD,CAAC,CAAC;EAEF,MAAMkD,oBAAoB,GAAG,IAAAC,0BAAiB,EAAC,MAAM;IACpD,IAAI,CAACtD,cAAc,EAAE;MACpBgB,OAAO,GAAG,CAAC;MACX;IACD;IACA,IAAAM,8BAAO,EAACnB,oBAAoB,CAAC,CAAC;MAAEa,OAAO;MAAEJ,eAAe,EAAE;IAAK,CAAC,CAAC;EAClE,CAAC,CAAC;;EAEF;EACAE,kBAAkB,CAAC;IAAEd,cAAc;IAAEe,IAAI;IAAEC,OAAO;IAAEb;EAAqB,CAAC,CAAC;EAC3EoB,qBAAqB,CAAC;IAAEC,aAAa;IAAErB;EAAqB,CAAC,CAAC;EAE9D,OAAO;IACNQ,KAAK,EAAE;MAAEe;IAAa,CAAC;IACvBO,QAAQ,EAAEA,QAAQ,CAAC;MAAEmB,mBAAmB;MAAEC;IAAqB,CAAC;EACjE,CAAC;AACF,CACD,CAAC;AAACE,OAAA,CAAA5B,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ScreenTransitionProvider = ScreenTransitionProvider;
|
|
7
7
|
var _rootTransitionAware = require("../components/root-transition-aware");
|
|
8
|
-
var _gestures = require("
|
|
9
|
-
var _keys = require("
|
|
10
|
-
var _transitionStyles = require("
|
|
8
|
+
var _gestures = require("./gestures.provider");
|
|
9
|
+
var _keys = require("./keys.provider");
|
|
10
|
+
var _transitionStyles = require("./transition-styles.provider");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function ScreenTransitionProvider({
|
|
13
13
|
previous,
|
|
@@ -31,4 +31,4 @@ function ScreenTransitionProvider({
|
|
|
31
31
|
})
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
//# sourceMappingURL=screen-transition
|
|
34
|
+
//# sourceMappingURL=screen-transition.provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_rootTransitionAware","require","_gestures","_keys","_transitionStyles","_jsxRuntime","ScreenTransitionProvider","previous","current","next","children","LifecycleController","jsx","KeysProvider","ScreenGestureProvider","TransitionStylesProvider","RootTransitionAware"],"sourceRoot":"../../../../src","sources":["shared/providers/screen-transition
|
|
1
|
+
{"version":3,"names":["_rootTransitionAware","require","_gestures","_keys","_transitionStyles","_jsxRuntime","ScreenTransitionProvider","previous","current","next","children","LifecycleController","jsx","KeysProvider","ScreenGestureProvider","TransitionStylesProvider","RootTransitionAware"],"sourceRoot":"../../../../src","sources":["shared/providers/screen-transition.provider.tsx"],"mappings":";;;;;;AAGA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAAwE,IAAAI,WAAA,GAAAJ,OAAA;AAUjE,SAASK,wBAAwBA,CAEtC;EACDC,QAAQ;EACRC,OAAO;EACPC,IAAI;EACJC,QAAQ;EACRC;AACmB,CAAC,EAAE;EACtB,oBACC,IAAAN,WAAA,CAAAO,GAAA,EAACT,KAAA,CAAAU,YAAY;IACZN,QAAQ,EAAEA,QAAS;IACnBC,OAAO,EAAEA,OAAQ;IACjBC,IAAI,EAAEA,IAAK;IAAAC,QAAA,eAEX,IAAAL,WAAA,CAAAO,GAAA,EAACV,SAAA,CAAAY,qBAAqB;MAAAJ,QAAA,eACrB,IAAAL,WAAA,CAAAO,GAAA,EAACD,mBAAmB;QAAAD,QAAA,eACnB,IAAAL,WAAA,CAAAO,GAAA,EAACR,iBAAA,CAAAW,wBAAwB;UAAAL,QAAA,eACxB,IAAAL,WAAA,CAAAO,GAAA,EAACZ,oBAAA,CAAAgB,mBAAmB;YAAAN,QAAA,EAAEA;UAAQ,CAAsB;QAAC,CAC5B;MAAC,CACP;IAAC,CACA;EAAC,CACX,CAAC;AAEjB","ignoreList":[]}
|
package/lib/commonjs/shared/providers/{transition-styles.js → transition-styles.provider.js}
RENAMED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.TransitionStylesContext = void 0;
|
|
6
7
|
exports.TransitionStylesProvider = TransitionStylesProvider;
|
|
7
8
|
exports.useTransitionStyles = useTransitionStyles;
|
|
8
9
|
var _react = require("react");
|
|
@@ -11,10 +12,11 @@ var _constants = require("../constants");
|
|
|
11
12
|
var _useScreenAnimation2 = require("../hooks/animation/use-screen-animation");
|
|
12
13
|
var _bounds = require("../utils/bounds");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
const TransitionStylesContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
15
|
+
const TransitionStylesContext = exports.TransitionStylesContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
15
16
|
function TransitionStylesProvider({
|
|
16
17
|
children
|
|
17
18
|
}) {
|
|
19
|
+
const parentCtx = (0, _react.useContext)(TransitionStylesContext);
|
|
18
20
|
const {
|
|
19
21
|
screenInterpolatorProps,
|
|
20
22
|
screenStyleInterpolator
|
|
@@ -22,11 +24,6 @@ function TransitionStylesProvider({
|
|
|
22
24
|
const stylesMap = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
23
25
|
"worklet";
|
|
24
26
|
|
|
25
|
-
/**
|
|
26
|
-
* ### Maintainer note
|
|
27
|
-
*
|
|
28
|
-
* From my understanding, reanimated will serialize the DerivedValue result. Thus resulting in us receiving a `bounds is not a function, it is an object` error. We'll build the bounds function inside here (the final step) and pass it alongside the interpolator instead.
|
|
29
|
-
*/
|
|
30
27
|
const props = screenInterpolatorProps.value;
|
|
31
28
|
const bounds = (0, _bounds.createBounds)(props);
|
|
32
29
|
try {
|
|
@@ -44,9 +41,10 @@ function TransitionStylesProvider({
|
|
|
44
41
|
});
|
|
45
42
|
const value = (0, _react.useMemo)(() => {
|
|
46
43
|
return {
|
|
47
|
-
stylesMap
|
|
44
|
+
stylesMap,
|
|
45
|
+
parentStylesMap: parentCtx?.stylesMap
|
|
48
46
|
};
|
|
49
|
-
}, [stylesMap]);
|
|
47
|
+
}, [stylesMap, parentCtx?.stylesMap]);
|
|
50
48
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TransitionStylesContext.Provider, {
|
|
51
49
|
value: value,
|
|
52
50
|
children: children
|
|
@@ -59,4 +57,4 @@ function useTransitionStyles() {
|
|
|
59
57
|
}
|
|
60
58
|
return ctx;
|
|
61
59
|
}
|
|
62
|
-
//# sourceMappingURL=transition-styles.js.map
|
|
60
|
+
//# sourceMappingURL=transition-styles.provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_constants","_useScreenAnimation2","_bounds","_jsxRuntime","TransitionStylesContext","exports","createContext","TransitionStylesProvider","children","parentCtx","useContext","screenInterpolatorProps","screenStyleInterpolator","_useScreenAnimation","stylesMap","useDerivedValue","props","value","bounds","createBounds","NO_STYLES","err","__DEV__","console","warn","useMemo","parentStylesMap","jsx","Provider","useTransitionStyles","ctx","Error"],"sourceRoot":"../../../../src","sources":["shared/providers/transition-styles.provider.tsx"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAC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,CACwB,CAAC;AAErC;AAEO,SAASqB,mBAAmBA,CAAA,EAAG;EACrC,MAAMC,GAAG,GAAG,IAAApB,iBAAU,EAACN,uBAAuB,CAAC;EAC/C,IAAI,CAAC0B,GAAG,EAAE;IACT,MAAM,IAAIC,KAAK,CACd,oEACD,CAAC;EACF;EACA,OAAOD,GAAG;AACX","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","store","ensure","key","bag","progress","makeMutable","closing","animating","getAnimation","type","getAll","clear","routeKey","cancelAnimation","debugStoreSize","console","log","Object","keys","length","AnimationStore","exports"],"sourceRoot":"../../../../src","sources":["shared/stores/animation
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","store","ensure","key","bag","progress","makeMutable","closing","animating","getAnimation","type","getAll","clear","routeKey","cancelAnimation","debugStoreSize","console","log","Object","keys","length","AnimationStore","exports"],"sourceRoot":"../../../../src","sources":["shared/stores/animation.store.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAaA,MAAMC,KAA2C,GAAG,CAAC,CAAC;AAEtD,MAAMC,MAAM,GAAIC,GAAc,IAAK;EAClC,IAAIC,GAAG,GAAGH,KAAK,CAACE,GAAG,CAAC;EACpB,IAAI,CAACC,GAAG,EAAE;IACTA,GAAG,GAAG;MACLC,QAAQ,EAAE,IAAAC,kCAAW,EAAC,CAAC,CAAC;MACxBC,OAAO,EAAE,IAAAD,kCAAW,EAAC,CAAC,CAAC;MACvBE,SAAS,EAAE,IAAAF,kCAAW,EAAC,CAAC;IACzB,CAAC;IACDL,KAAK,CAACE,GAAG,CAAC,GAAGC,GAAG;EACjB;EACA,OAAOA,GAAG;AACX,CAAC;AAED,SAASK,YAAYA,CACpBN,GAAc,EACdO,IAA0C,EACpB;EACtB,OAAOR,MAAM,CAACC,GAAG,CAAC,CAACO,IAAI,CAAC;AACzB;AAEA,SAASC,MAAMA,CAACR,GAAc,EAAE;EAC/B,OAAOD,MAAM,CAACC,GAAG,CAAC;AACnB;AAEA,SAASS,KAAKA,CAACC,QAAmB,EAAE;EACnC,SAAS;;EACT,MAAMT,GAAG,GAAGH,KAAK,CAACY,QAAQ,CAAC;EAC3B,IAAIT,GAAG,EAAE;IACR,IAAAU,sCAAe,EAACV,GAAG,CAACC,QAAQ,CAAC;IAC7B,IAAAS,sCAAe,EAACV,GAAG,CAACG,OAAO,CAAC;IAC5B,IAAAO,sCAAe,EAACV,GAAG,CAACI,SAAS,CAAC;EAC/B;EACA,OAAOP,KAAK,CAACY,QAAQ,CAAC;AACvB;AAEA,SAASE,cAAcA,CAAA,EAAG;EACzBC,OAAO,CAACC,GAAG,CAAC,wBAAwB,EAAEC,MAAM,CAACC,IAAI,CAAClB,KAAK,CAAC,CAACmB,MAAM,CAAC;EAChEJ,OAAO,CAACC,GAAG,CAAC,wBAAwB,EAAEC,MAAM,CAACC,IAAI,CAAClB,KAAK,CAAC,CAAC;AAC1D;AAEO,MAAMoB,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC7BZ,YAAY;EACZG,KAAK;EACLD,MAAM;EACNI;AACD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BoundStore = void 0;
|
|
7
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
+
/**
|
|
9
|
+
* Note on cleanup: We intentionally skip automatic cleanup of old links.
|
|
10
|
+
* The linkStack grows by one entry per navigation, but `getActiveLink`
|
|
11
|
+
* finds the correct link via screenKey matching regardless of stack size.
|
|
12
|
+
* This is unlikely to cause performance issues in typical apps, but if
|
|
13
|
+
* memory becomes a concern in apps with heavy navigation (hundreds of
|
|
14
|
+
* transitions), we should consider implementing cleanup on screen unmount using
|
|
15
|
+
* screenKey filtering.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const registry = (0, _reactNativeReanimated.makeMutable)({});
|
|
19
|
+
function registerOccurrence(tag, screenKey, bounds, styles = {}) {
|
|
20
|
+
"worklet";
|
|
21
|
+
|
|
22
|
+
registry.modify(state => {
|
|
23
|
+
"worklet";
|
|
24
|
+
|
|
25
|
+
if (!state[tag]) {
|
|
26
|
+
state[tag] = {
|
|
27
|
+
occurrences: {},
|
|
28
|
+
linkStack: []
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
state[tag].occurrences[screenKey] = {
|
|
32
|
+
bounds,
|
|
33
|
+
styles
|
|
34
|
+
};
|
|
35
|
+
return state;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function setLinkSource(tag, screenKey, bounds, styles = {}, parentScreenKey) {
|
|
39
|
+
"worklet";
|
|
40
|
+
|
|
41
|
+
registry.modify(state => {
|
|
42
|
+
"worklet";
|
|
43
|
+
|
|
44
|
+
if (!state[tag]) state[tag] = {
|
|
45
|
+
occurrences: {},
|
|
46
|
+
linkStack: []
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// Push new link onto stack
|
|
50
|
+
state[tag].linkStack.push({
|
|
51
|
+
source: {
|
|
52
|
+
screenKey,
|
|
53
|
+
parentScreenKey,
|
|
54
|
+
bounds,
|
|
55
|
+
styles
|
|
56
|
+
},
|
|
57
|
+
destination: null
|
|
58
|
+
});
|
|
59
|
+
return state;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function setLinkDestination(tag, screenKey, bounds, styles = {}, parentScreenKey) {
|
|
63
|
+
"worklet";
|
|
64
|
+
|
|
65
|
+
registry.modify(state => {
|
|
66
|
+
"worklet";
|
|
67
|
+
|
|
68
|
+
const stack = state[tag]?.linkStack;
|
|
69
|
+
if (!stack || stack.length === 0) return state;
|
|
70
|
+
|
|
71
|
+
// Find the topmost link without a destination
|
|
72
|
+
for (let i = stack.length - 1; i >= 0; i--) {
|
|
73
|
+
if (stack[i].destination === null) {
|
|
74
|
+
stack[i].destination = {
|
|
75
|
+
screenKey,
|
|
76
|
+
parentScreenKey,
|
|
77
|
+
bounds,
|
|
78
|
+
styles
|
|
79
|
+
};
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return state;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function getOccurrence(tag, key) {
|
|
87
|
+
"worklet";
|
|
88
|
+
|
|
89
|
+
return registry.value[tag]?.occurrences[key] ?? null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Helper to check if a screen identifier matches a given key
|
|
93
|
+
function matchesScreenKey(identifier, key) {
|
|
94
|
+
"worklet";
|
|
95
|
+
|
|
96
|
+
if (!identifier) return false;
|
|
97
|
+
return identifier.screenKey === key || identifier.parentScreenKey === key;
|
|
98
|
+
}
|
|
99
|
+
function getActiveLink(tag, screenKey, isClosing) {
|
|
100
|
+
"worklet";
|
|
101
|
+
|
|
102
|
+
const stack = registry.value[tag]?.linkStack;
|
|
103
|
+
if (!stack || stack.length === 0) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// If screenKey provided, find link involving that screen
|
|
108
|
+
if (screenKey) {
|
|
109
|
+
// When closing (backward nav), we want the link where this screen is the DESTINATION
|
|
110
|
+
// When opening (forward nav), we want the link where this screen is the DESTINATION too
|
|
111
|
+
// The source is always the "from" screen, destination is the "to" screen
|
|
112
|
+
|
|
113
|
+
if (isClosing) {
|
|
114
|
+
// Backward: find link where I am the destination (I'm going back to source)
|
|
115
|
+
for (let i = stack.length - 1; i >= 0; i--) {
|
|
116
|
+
const link = stack[i];
|
|
117
|
+
if (matchesScreenKey(link.destination, screenKey)) {
|
|
118
|
+
return link;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Forward or fallback: find any link involving this screen
|
|
124
|
+
for (let i = stack.length - 1; i >= 0; i--) {
|
|
125
|
+
const link = stack[i];
|
|
126
|
+
if (matchesScreenKey(link.source, screenKey) || matchesScreenKey(link.destination, screenKey)) {
|
|
127
|
+
return link;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
return stack[stack.length - 1] ?? null;
|
|
133
|
+
}
|
|
134
|
+
const BoundStore = exports.BoundStore = {
|
|
135
|
+
registerOccurrence,
|
|
136
|
+
setLinkSource,
|
|
137
|
+
setLinkDestination,
|
|
138
|
+
getActiveLink,
|
|
139
|
+
getOccurrence
|
|
140
|
+
};
|
|
141
|
+
//# sourceMappingURL=bounds.store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","registry","makeMutable","registerOccurrence","tag","screenKey","bounds","styles","modify","state","occurrences","linkStack","setLinkSource","parentScreenKey","push","source","destination","setLinkDestination","stack","length","i","getOccurrence","key","value","matchesScreenKey","identifier","getActiveLink","isClosing","link","BoundStore","exports"],"sourceRoot":"../../../../src","sources":["shared/stores/bounds.store.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AA8BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,QAAQ,GAAG,IAAAC,kCAAW,EAA0B,CAAC,CAAC,CAAC;AAEzD,SAASC,kBAAkBA,CAC1BC,GAAU,EACVC,SAAoB,EACpBC,MAA0B,EAC1BC,MAAkB,GAAG,CAAC,CAAC,EACtB;EACD,SAAS;;EACTN,QAAQ,CAACO,MAAM,CAAEC,KAAU,IAAK;IAC/B,SAAS;;IACT,IAAI,CAACA,KAAK,CAACL,GAAG,CAAC,EAAE;MAChBK,KAAK,CAACL,GAAG,CAAC,GAAG;QAAEM,WAAW,EAAE,CAAC,CAAC;QAAEC,SAAS,EAAE;MAAG,CAAC;IAChD;IACAF,KAAK,CAACL,GAAG,CAAC,CAACM,WAAW,CAACL,SAAS,CAAC,GAAG;MAAEC,MAAM;MAAEC;IAAO,CAAC;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ACI,IAAI,CAACb,MAAM,EAAEV,SAAS,CAAC,IACxCmB,gBAAgB,CAACI,IAAI,CAACZ,WAAW,EAAEX,SAAS,CAAC,EAC5C;QACD,OAAOuB,IAAI;MACZ;IACD;IACA,OAAO,IAAI;EACZ;EAEA,OAAOV,KAAK,CAACA,KAAK,CAACC,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI;AACvC;AAEO,MAAMU,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG;EACzB1B,kBAAkB;EAClBS,aAAa;EACbK,kBAAkB;EAClBS,aAAa;EACbL;AACD,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","store","ensure","routeKey","bag","x","makeMutable","y","normalizedX","normalizedY","isDismissing","isDragging","direction","getGesture","gestureKey","getRouteGestures","clear","cancelAnimation","GestureStore","exports"],"sourceRoot":"../../../../src","sources":["shared/stores/gesture
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","store","ensure","routeKey","bag","x","makeMutable","y","normalizedX","normalizedY","isDismissing","isDragging","direction","getGesture","gestureKey","getRouteGestures","clear","cancelAnimation","GestureStore","exports"],"sourceRoot":"../../../../src","sources":["shared/stores/gesture.store.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AA0BA,MAAMC,KAAyC,GAAG,CAAC,CAAC;AAEpD,SAASC,MAAMA,CAACC,QAAmB,EAAmB;EACrD,IAAIC,GAAG,GAAGH,KAAK,CAACE,QAAQ,CAAC;EACzB,IAAI,CAACC,GAAG,EAAE;IACTA,GAAG,GAAG;MACLC,CAAC,EAAE,IAAAC,kCAAW,EAAC,CAAC,CAAC;MACjBC,CAAC,EAAE,IAAAD,kCAAW,EAAC,CAAC,CAAC;MACjBE,WAAW,EAAE,IAAAF,kCAAW,EAAC,CAAC,CAAC;MAC3BG,WAAW,EAAE,IAAAH,kCAAW,EAAC,CAAC,CAAC;MAC3BI,YAAY,EAAE,IAAAJ,kCAAW,EAAC,CAAC,CAAC;MAC5BK,UAAU,EAAE,IAAAL,kCAAW,EAAC,CAAC,CAAC;MAC1BM,SAAS,EAAE,IAAAN,kCAAW,EACrB,IACD;IACD,CAAC;IACDL,KAAK,CAACE,QAAQ,CAAC,GAAGC,GAAG;EACtB;EACA,OAAOA,GAAG;AACX;AAEA,SAASS,UAAUA,CAACV,QAAmB,EAAEW,UAAsB,EAAE;EAChE,OAAOZ,MAAM,CAACC,QAAQ,CAAC,CAACW,UAAU,CAAC;AACpC;AAEA,SAASC,gBAAgBA,CAACZ,QAAmB,EAAE;EAC9C,OAAOD,MAAM,CAACC,QAAQ,CAAC;AACxB;AAEA,SAASa,KAAKA,CAACb,QAAmB,EAAE;EACnC,MAAMC,GAAG,GAAGH,KAAK,CAACE,QAAQ,CAAC;EAC3B,IAAIC,GAAG,EAAE;IACR,IAAAa,sCAAe,EAACb,GAAG,CAACC,CAAC,CAAC;IACtB,IAAAY,sCAAe,EAACb,GAAG,CAACG,CAAC,CAAC;IACtB,IAAAU,sCAAe,EAACb,GAAG,CAACI,WAAW,CAAC;IAChC,IAAAS,sCAAe,EAACb,GAAG,CAACK,WAAW,CAAC;IAChC,IAAAQ,sCAAe,EAACb,GAAG,CAACM,YAAY,CAAC;IACjC,IAAAO,sCAAe,EAACb,GAAG,CAACO,UAAU,CAAC;IAC/B,IAAAM,sCAAe,EAACb,GAAG,CAACQ,SAAS,CAAC;EAC/B;EACA,OAAOX,KAAK,CAACE,QAAQ,CAAC;AACvB;AAEO,MAAMe,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC3BL,UAAU;EACVE,gBAAgB;EAChBC;AACD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["shared/types/animation.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["shared/types/bounds.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["shared/types/
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["shared/types/core.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -10,4 +10,4 @@ let GestureOffsetState = exports.GestureOffsetState = /*#__PURE__*/function (Ges
|
|
|
10
10
|
GestureOffsetState[GestureOffsetState["FAILED"] = 2] = "FAILED";
|
|
11
11
|
return GestureOffsetState;
|
|
12
12
|
}({});
|
|
13
|
-
//# sourceMappingURL=gesture.js.map
|
|
13
|
+
//# sourceMappingURL=gesture.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GestureOffsetState","exports"],"sourceRoot":"../../../../src","sources":["shared/types/gesture.types.ts"],"mappings":";;;;;;IAgBYA,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["shared/types/
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["shared/types/utils.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -4,14 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.derivations = void 0;
|
|
7
|
-
var _boundStore = require("../../stores/bound-store");
|
|
8
7
|
/**
|
|
9
8
|
* Additional values to help make defining animations easier.
|
|
10
9
|
*/
|
|
11
10
|
const derivations = ({
|
|
12
11
|
current,
|
|
13
|
-
next
|
|
14
|
-
previous
|
|
12
|
+
next
|
|
15
13
|
}) => {
|
|
16
14
|
"worklet";
|
|
17
15
|
|
|
@@ -23,13 +21,9 @@ const derivations = ({
|
|
|
23
21
|
const active = focused ? current : next ?? current;
|
|
24
22
|
const isActiveTransitioning = !!(active.gesture.isDragging || active.animating);
|
|
25
23
|
const isDismissing = !!(active.gesture.isDismissing || active.closing);
|
|
26
|
-
|
|
27
|
-
// The active bound id
|
|
28
|
-
const activeBoundId = _boundStore.BoundStore.getActiveBound(current, next, previous);
|
|
29
24
|
return {
|
|
30
25
|
progress,
|
|
31
26
|
focused,
|
|
32
|
-
activeBoundId,
|
|
33
27
|
active,
|
|
34
28
|
isActiveTransitioning,
|
|
35
29
|
isDismissing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["derivations","current","next","progress","focused","active","isActiveTransitioning","gesture","isDragging","animating","isDismissing","closing","exports"],"sourceRoot":"../../../../../src","sources":["shared/utils/animation/derivations.ts"],"mappings":";;;;;;AAOA;AACA;AACA;AACO,MAAMA,WAAW,GAAGA,CAAC;EAAEC,OAAO;EAAEC;AAAwB,CAAC,KAAK;EACpE,SAAS;;EAET;EACA,MAAMC,QAAQ,GAAGF,OAAO,CAACE,QAAQ,IAAID,IAAI,EAAEC,QAAQ,IAAI,CAAC,CAAC;;EAEzD;EACA,MAAMC,OAAO,GAAG,CAACF,IAAI;EAErB,MAAMG,MAAM,GAAGD,OAAO,GAAGH,OAAO,GAAIC,IAAI,IAAID,OAAQ;EACpD,MAAMK,qBAAqB,GAAG,CAAC,EAC9BD,MAAM,CAACE,OAAO,CAACC,UAAU,IAAIH,MAAM,CAACI,SAAS,CAC7C;EAED,MAAMC,YAAY,GAAG,CAAC,EAAEL,MAAM,CAACE,OAAO,CAACG,YAAY,IAAIL,MAAM,CAACM,OAAO,CAAC;EAEtE,OAAO;IACNR,QAAQ;IACRC,OAAO;IACPC,MAAM;IACNC,qBAAqB;IACrBI;EACD,CAAC;AACF,CAAC;AAACE,OAAA,CAAAZ,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getAnchorPoint","bounds","anchor","pageX","pageY","width","height","x","y","computeRelativeGeometry","start","end","entering","scaleMode","scaleX","scaleY","sx","sy","startAspect","endAspect","aspectDifference","Math","abs","scale","max","min","startAnchor","endAnchor","endCenter","anchorOffsetX","anchorOffsetY","dx","dy","computeContentTransformGeometry","dimensions","s","screenCenterX","screenCenterY","endOffsetFromScreenCenterX","endOffsetFromScreenCenterY","scaledEndAnchorX","scaledEndAnchorY","tx","ty"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/helpers/geometry.ts"],"mappings":";;;;;;;AAQA;AACA;AACA;AACA,SAASA,cAAcA,CACtBC,MAA0B,EAC1BC,MAAoB,GAAG,QAAQ,EACJ;EAC3B,SAAS;;EAET,MAAM;IAAEC,KAAK;IAAEC,KAAK;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAAGL,MAAM;EAE9C,QAAQC,MAAM;IACb,KAAK,YAAY;MAChB,OAAO;QAAEK,CAAC,EAAEJ,KAAK;QAAEK,CAAC,EAAEJ;MAAM,CAAC;IAC9B,KAAK,KAAK;MACT,OAAO;QAAEG,CAAC,EAAEJ,KAAK,GAAGE,KAAK,GAAG,CAAC;QAAEG,CAAC,EAAEJ;MAAM,CAAC;IAC1C,KAAK,aAAa;MACjB,OAAO;QAAEG,CAAC,EAAEJ,KAAK,GAAGE,KAAK;QAAEG,CAAC,EAAEJ;MAAM,CAAC;IACtC,KAAK,SAAS;MACb,OAAO;QAAEG,CAAC,EAAEJ,KAAK;QAAEK,CAAC,EAAEJ,KAAK,GAAGE,MAAM,GAAG;MAAE,CAAC;IAC3C,KAAK,QAAQ;MACZ,OAAO;QAAEC,CAAC,EAAEJ,KAAK,GAAGE,KAAK,GAAG,CAAC;QAAEG,CAAC,EAAEJ,KAAK,GAAGE,MAAM,GAAG;MAAE,CAAC;IACvD,KAAK,UAAU;MACd,OAA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