react-native-screen-transitions 3.0.0-beta.8 → 3.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -5
- package/lib/commonjs/blank-stack/components/Overlay.js +7 -4
- package/lib/commonjs/blank-stack/components/Overlay.js.map +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 +9 -5
- package/lib/commonjs/blank-stack/components/StackView.js.map +1 -1
- package/lib/commonjs/blank-stack/hooks/use-overlay-animation.js +5 -9
- package/lib/commonjs/blank-stack/hooks/use-overlay-animation.js.map +1 -1
- package/lib/commonjs/blank-stack/index.js +7 -0
- package/lib/commonjs/blank-stack/index.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.native.js +4 -3
- 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 +2 -4
- package/lib/commonjs/shared/hooks/gestures/use-parent-gesture-registry.js.map +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 +211 -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} +9 -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 +7 -4
- 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 +8 -4
- package/lib/module/blank-stack/components/StackView.js.map +1 -1
- package/lib/module/blank-stack/hooks/use-overlay-animation.js +5 -9
- package/lib/module/blank-stack/hooks/use-overlay-animation.js.map +1 -1
- package/lib/module/blank-stack/index.js +1 -0
- package/lib/module/blank-stack/index.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.native.js +3 -2
- package/lib/module/native-stack/views/NativeStackView.native.js.map +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 +2 -4
- 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 +206 -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} +8 -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/Overlay.d.ts.map +1 -1
- 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 +1 -0
- 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/native-stack/views/NativeStackView.native.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/gestures/use-parent-gesture-registry.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 +25 -19
- 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 +5 -2
- package/src/blank-stack/components/Screens.tsx +1 -1
- package/src/blank-stack/components/StackView.tsx +7 -2
- package/src/blank-stack/hooks/use-overlay-animation.tsx +6 -21
- package/src/blank-stack/index.ts +1 -0
- package/src/blank-stack/types.ts +2 -2
- package/src/native-stack/types.ts +1 -1
- package/src/native-stack/views/NativeStackView.native.tsx +4 -2
- 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 +12 -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 +2 -4
- 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 +290 -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} +18 -16
- 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/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/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/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/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,152 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useBoundsRegistry = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
-
var _keys = require("../../providers/keys");
|
|
10
|
-
var _boundStore = require("../../stores/bound-store");
|
|
11
|
-
var _isBoundsEqual = require("../../utils/bounds/_utils/is-bounds-equal");
|
|
12
|
-
var _styles = require("../../utils/bounds/_utils/styles");
|
|
13
|
-
var _useStableCallback = _interopRequireDefault(require("../use-stable-callback"));
|
|
14
|
-
var _useStableCallbackValue = _interopRequireDefault(require("../use-stable-callback-value"));
|
|
15
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
-
const MeasurementUpdateContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
18
|
-
const useBoundsRegistry = ({
|
|
19
|
-
sharedBoundTag,
|
|
20
|
-
animatedRef,
|
|
21
|
-
style,
|
|
22
|
-
onPress
|
|
23
|
-
}) => {
|
|
24
|
-
const {
|
|
25
|
-
previous,
|
|
26
|
-
current,
|
|
27
|
-
next
|
|
28
|
-
} = (0, _keys.useKeys)();
|
|
29
|
-
const preparedStyles = (0, _react.useMemo)(() => (0, _styles.prepareStyleForBounds)(style), [style]);
|
|
30
|
-
const ROOT_MEASUREMENT_SIGNAL = (0, _react.useContext)(MeasurementUpdateContext);
|
|
31
|
-
const ROOT_SIGNAL = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
32
|
-
const IS_ROOT = !ROOT_MEASUREMENT_SIGNAL;
|
|
33
|
-
const emitUpdate = (0, _useStableCallbackValue.default)(() => {
|
|
34
|
-
"worklet";
|
|
35
|
-
|
|
36
|
-
if (IS_ROOT) ROOT_SIGNAL.value = ROOT_SIGNAL.value + 1;
|
|
37
|
-
});
|
|
38
|
-
const maybeMeasureAndStore = (0, _useStableCallbackValue.default)(({
|
|
39
|
-
onPress,
|
|
40
|
-
skipMarkingActive
|
|
41
|
-
}) => {
|
|
42
|
-
"worklet";
|
|
43
|
-
|
|
44
|
-
// Currently, there's no necessity to measure when the current route is blurred ( could potentially change in the future )
|
|
45
|
-
if (!sharedBoundTag || next) return;
|
|
46
|
-
const measured = (0, _reactNativeReanimated.measure)(animatedRef);
|
|
47
|
-
if (!measured) {
|
|
48
|
-
console.warn(`[react-native-screen-transitions] measure() returned null for sharedBoundTag="${sharedBoundTag}"`);
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const key = current.route.key;
|
|
52
|
-
if ((0, _isBoundsEqual.isBoundsEqual)({
|
|
53
|
-
measured,
|
|
54
|
-
key,
|
|
55
|
-
sharedBoundTag
|
|
56
|
-
})) {
|
|
57
|
-
emitUpdate();
|
|
58
|
-
if (!skipMarkingActive) {
|
|
59
|
-
_boundStore.BoundStore.setRouteActive(key, sharedBoundTag);
|
|
60
|
-
}
|
|
61
|
-
if (onPress) (0, _reactNativeReanimated.runOnJS)(onPress)();
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
emitUpdate();
|
|
65
|
-
_boundStore.BoundStore.setBounds(key, sharedBoundTag, measured, preparedStyles);
|
|
66
|
-
if (!skipMarkingActive) {
|
|
67
|
-
_boundStore.BoundStore.setRouteActive(key, sharedBoundTag);
|
|
68
|
-
}
|
|
69
|
-
if (onPress) (0, _reactNativeReanimated.runOnJS)(onPress)();
|
|
70
|
-
});
|
|
71
|
-
const hasMeasuredOnLayout = (0, _reactNativeReanimated.useSharedValue)(false);
|
|
72
|
-
const handleInitialLayout = (0, _useStableCallbackValue.default)(() => {
|
|
73
|
-
"worklet";
|
|
74
|
-
|
|
75
|
-
const prevKey = previous?.route.key;
|
|
76
|
-
if (!sharedBoundTag || hasMeasuredOnLayout.value || !prevKey) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
const prevBounds = _boundStore.BoundStore.getBounds(prevKey)?.[sharedBoundTag];
|
|
80
|
-
if (prevBounds) {
|
|
81
|
-
// Should skip mark active if we are in a transition
|
|
82
|
-
maybeMeasureAndStore({
|
|
83
|
-
skipMarkingActive: true
|
|
84
|
-
});
|
|
85
|
-
// Should not measure again while in transition
|
|
86
|
-
hasMeasuredOnLayout.value = true;
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
const captureActiveOnPress = (0, _useStableCallback.default)(() => {
|
|
90
|
-
if (!sharedBoundTag) {
|
|
91
|
-
if (onPress) onPress();
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// In this case, we DO want to mark active
|
|
96
|
-
(0, _reactNativeReanimated.runOnUI)(maybeMeasureAndStore)({
|
|
97
|
-
onPress
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
const MeasurementSyncProvider = (0, _react.useMemo)(() => {
|
|
101
|
-
if (!IS_ROOT || !sharedBoundTag) {
|
|
102
|
-
return _react.Fragment;
|
|
103
|
-
}
|
|
104
|
-
return ({
|
|
105
|
-
children
|
|
106
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(MeasurementUpdateContext.Provider, {
|
|
107
|
-
value: {
|
|
108
|
-
updateSignal: ROOT_SIGNAL
|
|
109
|
-
},
|
|
110
|
-
children: children
|
|
111
|
-
});
|
|
112
|
-
}, [IS_ROOT, sharedBoundTag, ROOT_SIGNAL]);
|
|
113
|
-
const prevNextRef = (0, _react.useRef)(next);
|
|
114
|
-
/**
|
|
115
|
-
* Measure non-pressable elements when the screen goes from focused to blurred
|
|
116
|
-
* (or when a new `next` descriptor appears) so we capture final bounds
|
|
117
|
-
* right before the transition starts.
|
|
118
|
-
*/
|
|
119
|
-
(0, _react.useLayoutEffect)(() => {
|
|
120
|
-
if (!sharedBoundTag || onPress) return;
|
|
121
|
-
const hadNext = !!prevNextRef.current;
|
|
122
|
-
const hasNext = !!next;
|
|
123
|
-
if (!hadNext && hasNext) {
|
|
124
|
-
(0, _reactNativeReanimated.runOnUI)(maybeMeasureAndStore)({});
|
|
125
|
-
}
|
|
126
|
-
prevNextRef.current = next;
|
|
127
|
-
}, [next, sharedBoundTag, onPress, maybeMeasureAndStore]);
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Signal child shared elements (nested under this provider) to refresh their
|
|
131
|
-
* measurements when the root updates, while preventing them from marking
|
|
132
|
-
* themselves active during that sync.
|
|
133
|
-
*/
|
|
134
|
-
(0, _reactNativeReanimated.useAnimatedReaction)(() => ROOT_MEASUREMENT_SIGNAL?.updateSignal.value, current => {
|
|
135
|
-
"worklet";
|
|
136
|
-
|
|
137
|
-
// We don't want to run on the initial amount)
|
|
138
|
-
if (current === 0 || current === undefined) return;
|
|
139
|
-
|
|
140
|
-
// Children should not have the ability to mark active
|
|
141
|
-
maybeMeasureAndStore({
|
|
142
|
-
skipMarkingActive: true
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
return {
|
|
146
|
-
handleInitialLayout,
|
|
147
|
-
captureActiveOnPress,
|
|
148
|
-
MeasurementSyncProvider
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
exports.useBoundsRegistry = useBoundsRegistry;
|
|
152
|
-
//# sourceMappingURL=use-bound-registry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_keys","_boundStore","_isBoundsEqual","_styles","_useStableCallback","_interopRequireDefault","_useStableCallbackValue","_jsxRuntime","e","__esModule","default","MeasurementUpdateContext","createContext","useBoundsRegistry","sharedBoundTag","animatedRef","style","onPress","previous","current","next","useKeys","preparedStyles","useMemo","prepareStyleForBounds","ROOT_MEASUREMENT_SIGNAL","useContext","ROOT_SIGNAL","useSharedValue","IS_ROOT","emitUpdate","useStableCallbackValue","value","maybeMeasureAndStore","skipMarkingActive","measured","measure","console","warn","key","route","isBoundsEqual","BoundStore","setRouteActive","runOnJS","setBounds","hasMeasuredOnLayout","handleInitialLayout","prevKey","prevBounds","getBounds","captureActiveOnPress","useStableCallback","runOnUI","MeasurementSyncProvider","Fragment","children","jsx","Provider","updateSignal","prevNextRef","useRef","useLayoutEffect","hadNext","hasNext","useAnimatedReaction","undefined","exports"],"sourceRoot":"../../../../../src","sources":["shared/hooks/bounds/use-bound-registry.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,sBAAA,GAAAD,OAAA;AAUA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,uBAAA,GAAAD,sBAAA,CAAAP,OAAA;AAAkE,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAO,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAkBlE,MAAMG,wBAAwB,gBAC7B,IAAAC,oBAAa,EAAsC,IAAI,CAAC;AAElD,MAAMC,iBAAiB,GAAGA,CAAC;EACjCC,cAAc;EACdC,WAAW;EACXC,KAAK;EACLC;AACuB,CAAC,KAAK;EAC7B,MAAM;IAAEC,QAAQ;IAAEC,OAAO;IAAEC;EAAK,CAAC,GAAG,IAAAC,aAAO,EAAC,CAAC;EAC7C,MAAMC,cAAc,GAAG,IAAAC,cAAO,EAAC,MAAM,IAAAC,6BAAqB,EAAC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ACyB,CACnC;EACF,CAAC,EAAE,CAAC3B,OAAO,EAAEf,cAAc,EAAEa,WAAW,CAAC,CAAC;EAE1C,MAAMiC,WAAW,GAAG,IAAAC,aAAM,EAACzC,IAAI,CAAC;EAChC;AACD;AACA;AACA;AACA;EACC,IAAA0C,sBAAe,EAAC,MAAM;IACrB,IAAI,CAAChD,cAAc,IAAIG,OAAO,EAAE;IAEhC,MAAM8C,OAAO,GAAG,CAAC,CAACH,WAAW,CAACzC,OAAO;IACrC,MAAM6C,OAAO,GAAG,CAAC,CAAC5C,IAAI;IAEtB,IAAI,CAAC2C,OAAO,IAAIC,OAAO,EAAE;MACxB,IAAAX,8BAAO,EAACpB,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;IAClC;IAEA2B,WAAW,CAACzC,OAAO,GAAGC,IAAI;EAC3B,CAAC,EAAE,CAACA,IAAI,EAAEN,cAAc,EAAEG,OAAO,EAAEgB,oBAAoB,CAAC,CAAC;;EAEzD;AACD;AACA;AACA;AACA;EACC,IAAAgC,0CAAmB,EAClB,MAAMxC,uBAAuB,EAAEkC,YAAY,CAAC3B,KAAK,EAChDb,OAAO,IAAK;IACZ,SAAS;;IAET;IACA,IAAIA,OAAO,KAAK,CAAC,IAAIA,OAAO,KAAK+C,SAAS,EAAE;;IAE5C;IACAjC,oBAAoB,CAAC;MAAEC,iBAAiB,EAAE;IAAK,CAAC,CAAC;EAClD,CACD,CAAC;EAED,OAAO;IACNa,mBAAmB;IACnBI,oBAAoB;IACpBG;EACD,CAAC;AACF,CAAC;AAACa,OAAA,CAAAtD,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useDerivedValueState = useDerivedValueState;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
-
/**
|
|
10
|
-
* Derives React state from a Reanimated worklet.
|
|
11
|
-
*
|
|
12
|
-
* @param processor - The worklet function that calculates the value
|
|
13
|
-
* @param dependencies - Array of dependencies for the worklet
|
|
14
|
-
* @returns The derived value as React State
|
|
15
|
-
*/
|
|
16
|
-
function useDerivedValueState(processor, dependencies = []) {
|
|
17
|
-
const derivedValue = (0, _reactNativeReanimated.useDerivedValue)(processor, dependencies);
|
|
18
|
-
const [state, setState] = (0, _react.useState)(() => {
|
|
19
|
-
const readOnUI = (0, _reactNativeReanimated.executeOnUIRuntimeSync)(sv => {
|
|
20
|
-
"worklet";
|
|
21
|
-
|
|
22
|
-
return sv.value;
|
|
23
|
-
});
|
|
24
|
-
return readOnUI(derivedValue);
|
|
25
|
-
});
|
|
26
|
-
(0, _reactNativeReanimated.useAnimatedReaction)(() => derivedValue.value, (curr, prev) => {
|
|
27
|
-
if (curr !== prev) {
|
|
28
|
-
(0, _reactNativeReanimated.runOnJS)(setState)(curr);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
return state;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=use-derived-value-state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","useDerivedValueState","processor","dependencies","derivedValue","useDerivedValue","state","setState","useState","readOnUI","executeOnUIRuntimeSync","sv","value","useAnimatedReaction","curr","prev","runOnJS"],"sourceRoot":"../../../../src","sources":["shared/hooks/use-derived-value-state.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,oBAAoBA,CACnCC,SAAkB,EAClBC,YAAmB,GAAG,EAAE,EACpB;EACJ,MAAMC,YAAY,GAAG,IAAAC,sCAAe,EAACH,SAAS,EAAEC,YAAY,CAAC;EAE7D,MAAM,CAACG,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAAI,MAAM;IAC3C,MAAMC,QAAQ,GAAG,IAAAC,6CAAsB,EAAEC,EAAkB,IAAK;MAC/D,SAAS;;MACT,OAAOA,EAAE,CAACC,KAAK;IAChB,CAAC,CAAC;IACF,OAAOH,QAAQ,CAACL,YAAY,CAAC;EAC9B,CAAC,CAAC;EAEF,IAAAS,0CAAmB,EAClB,MAAMT,YAAY,CAACQ,KAAK,EACxB,CAACE,IAAI,EAAEC,IAAI,KAAK;IACf,IAAID,IAAI,KAAKC,IAAI,EAAE;MAClB,IAAAC,8BAAO,EAACT,QAAQ,CAAC,CAACO,IAAI,CAAC;IACxB;EACD,CACD,CAAC;EAED,OAAOR,KAAK;AACb","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","useSharedValueState","sharedValue","state","setState","useState","readOnUI","executeOnUIRuntimeSync","sv","value","useAnimatedReaction","runOnJS"],"sourceRoot":"../../../../src","sources":["shared/hooks/use-shared-value-state.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAOA;AACA;AACA;AACA;AACO,SAASE,mBAAmBA,CAAIC,WAA2B,EAAK;EACtE,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAAI,MAAM;IAC3C,MAAMC,QAAQ,GAAG,IAAAC,6CAAsB,EAAEC,EAAkB,IAAK;MAC/D,SAAS;;MACT,OAAOA,EAAE,CAACC,KAAK;IAChB,CAAC,CAAC;IACF,OAAOH,QAAQ,CAACJ,WAAW,CAAC;EAC7B,CAAC,CAAC;EAEF,IAAAQ,0CAAmB,EAClB,MAAMR,WAAW,CAACO,KAAK,EACtBA,KAAK,IAAK,IAAAE,8BAAO,EAACP,QAAQ,CAAC,CAACK,KAAK,CACnC,CAAC;EAED,OAAON,KAAK;AACb","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
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.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,0BAAA,GAAAF,OAAA;AAEA,IAAAG,sBAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAAwE,IAAAK,WAAA,GAAAL,OAAA;AAwBxE,MAAMM,cAAc,gBAAG,IAAAC,oBAAa,EAAiCC,SAAS,CAAC;AAExE,MAAMC,qBAAqB,GAAGA,CAAC;EAAEC;AAA+B,CAAC,KAAK;EAC5E,MAAMC,aAAa,GAAG,IAAAC,iBAAU,EAACN,cAAc,CAAC;EAEhD,MAAMO,YAAY,GAAG,IAAAC,qCAAc,EAAsB,IAAI,CAAC;EAE9D,MAAM;IAAEC,UAAU;IAAEC,aAAa;IAAEC;EAAuB,CAAC,GAC1D,IAAAC,kCAAgB,EAAC;IAChBL,YAAY;IACZF;EACD,CAAC,CAAC;EAEH,MAAMQ,KAAyB,GAAG,IAAAC,cAAO,EACxC,OAAO;IACNL,UAAU;IACVF,YAAY;IACZG,aAAa;IACbC,sBAAsB;IACtBN,aAAa,EAAEA,aAAa,IAAI;EACjC,CAAC,CAAC,EACF,CACCI,UAAU,EACVF,YAAY,EACZG,aAAa,EACbC,sBAAsB,EACtBN,aAAa,CAEf,CAAC;EAED,oBACC,IAAAN,WAAA,CAAAgB,GAAA,EAACf,cAAc,CAACgB,QAAQ;IAACH,KAAK,EAAEA,KAAM;IAAAT,QAAA,eACrC,IAAAL,WAAA,CAAAgB,GAAA,EAACnB,0BAAA,CAAAqB,eAAe;MAACC,OAAO,EAAET,UAAW;MAAAL,QAAA,eACpC,IAAAL,WAAA,CAAAgB,GAAA,EAACpB,YAAA,CAAAwB,IAAI;QAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;QAAAlB,QAAA,EAAEA;MAAQ,CAAO;IAAC,CAChC;EAAC,CACM,CAAC;AAE5B,CAAC;AAACmB,OAAA,CAAApB,qBAAA,GAAAA,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":[]}
|
|
@@ -1 +0,0 @@
|
|
|
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.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":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_constants","_useScreenAnimation2","_bounds","_jsxRuntime","TransitionStylesContext","createContext","TransitionStylesProvider","children","screenInterpolatorProps","screenStyleInterpolator","_useScreenAnimation","stylesMap","useDerivedValue","props","value","bounds","createBounds","NO_STYLES","err","__DEV__","console","warn","useMemo","jsx","Provider","useTransitionStyles","ctx","useContext","Error"],"sourceRoot":"../../../../src","sources":["shared/providers/transition-styles.tsx"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AAA+C,IAAAK,WAAA,GAAAL,OAAA;AAM/C,MAAMM,uBAAuB,gBAAG,IAAAC,oBAAa,EAInC,IAAI,CAAC;AAER,SAASC,wBAAwBA,CAAC;EAAEC;AAAgB,CAAC,EAAE;EAC7D,MAAM;IAAEC,uBAAuB;IAAEC;EAAwB,CAAC,GACzD,IAAAC,wCAAmB,EAAC,CAAC;EAEtB,MAAMC,SAAS,GAAG,IAAAC,sCAAe,EAA8B,MAAM;IACpE,SAAS;;IAET;AACF;AACA;AACA;AACA;IACE,MAAMC,KAAK,GAAGL,uBAAuB,CAACM,KAAK;IAE3C,MAAMC,MAAM,GAAG,IAAAC,oBAAY,EAACH,KAAK,CAAC;IAClC,IAAI;MACH,IAAI,CAACJ,uBAAuB,EAAE,OAAOQ,oBAAS;MAE9C,OAAOR,uBAAuB,CAAC;QAC9B,GAAGI,KAAK;QACRE;MACD,CAAC,CAAC;IACH,CAAC,CAAC,OAAOG,GAAG,EAAE;MACb,IAAIC,OAAO,EAAE;QACZC,OAAO,CAACC,IAAI,CACX,6EAA6E,EAC7EH,GACD,CAAC;MACF;MACA,OAAOD,oBAAS;IACjB;EACD,CAAC,CAAC;EAEF,MAAMH,KAAK,GAAG,IAAAQ,cAAO,EAAC,MAAM;IAC3B,OAAO;MACNX;IACD,CAAC;EACF,CAAC,EAAE,CAACA,SAAS,CAAC,CAAC;EAEf,oBACC,IAAAR,WAAA,CAAAoB,GAAA,EAACnB,uBAAuB,CAACoB,QAAQ;IAACV,KAAK,EAAEA,KAAM;IAAAP,QAAA,EAC7CA;EAAQ,CACwB,CAAC;AAErC;AAEO,SAASkB,mBAAmBA,CAAA,EAAG;EACrC,MAAMC,GAAG,GAAG,IAAAC,iBAAU,EAACvB,uBAAuB,CAAC;EAC/C,IAAI,CAACsB,GAAG,EAAE;IACT,MAAM,IAAIE,KAAK,CACd,oEACD,CAAC;EACF;EACA,OAAOF,GAAG;AACX","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_jsxRuntime","createProvider","name","options","factory","guarded","Context","createContext","displayName","Provider","props","children","enabled","value","Error","memoValue","useMemo","jsx","useEnhancedContext","context","useContext"],"sourceRoot":"../../../../../src","sources":["shared/providers/utils/create-provider.tsx"],"mappings":";;;;;;AAKA,IAAAA,MAAA,GAAAC,OAAA;AAMe,IAAAC,WAAA,GAAAD,OAAA;AAXf;AACA;AACA;AACA;AACA;;AASe,SAASE,cAAcA,CAGpCC,IAAkB,EAAEC,OAA+B,EAAE;EACtD,OACCC,OAIC,IACG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__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.pairKey = pairKey;
|
|
7
|
-
exports.resolveActiveBound = resolveActiveBound;
|
|
8
|
-
function pairKey(fromKey, toKey) {
|
|
9
|
-
"worklet";
|
|
10
|
-
|
|
11
|
-
return fromKey && toKey ? `${fromKey}|${toKey}` : "";
|
|
12
|
-
}
|
|
13
|
-
const hasBound = (s, id) => {
|
|
14
|
-
"worklet";
|
|
15
|
-
|
|
16
|
-
return !!id && !!s && !!s.bounds && !!s.bounds[id];
|
|
17
|
-
};
|
|
18
|
-
const getRoutePair = (current, next, previous) => {
|
|
19
|
-
"worklet";
|
|
20
|
-
|
|
21
|
-
const isClosing = !!next;
|
|
22
|
-
const fromKey = isClosing ? current.route.key : previous?.route.key;
|
|
23
|
-
const toKey = isClosing ? next?.route.key : current.route.key;
|
|
24
|
-
const other = next ?? previous;
|
|
25
|
-
return {
|
|
26
|
-
fromKey,
|
|
27
|
-
toKey,
|
|
28
|
-
other
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
const resolveFromPairCache = (fromKey, toKey, other, getPairCache) => {
|
|
32
|
-
"worklet";
|
|
33
|
-
|
|
34
|
-
if (fromKey && toKey) {
|
|
35
|
-
const cached = getPairCache(fromKey, toKey);
|
|
36
|
-
if (hasBound(other, cached)) return cached;
|
|
37
|
-
}
|
|
38
|
-
return "";
|
|
39
|
-
};
|
|
40
|
-
const resolveFromRequested = (reqId, current, other) => {
|
|
41
|
-
"worklet";
|
|
42
|
-
|
|
43
|
-
if (hasBound(other, reqId)) return reqId;
|
|
44
|
-
if (hasBound(current, reqId)) return reqId;
|
|
45
|
-
return "";
|
|
46
|
-
};
|
|
47
|
-
const resolveFromInteresection = (current, other, fromKey, getRouteActive) => {
|
|
48
|
-
"worklet";
|
|
49
|
-
|
|
50
|
-
if (!other) return "";
|
|
51
|
-
const a = Object.keys(current.bounds);
|
|
52
|
-
const b = Object.keys(other.bounds);
|
|
53
|
-
const inter = a.filter(k => b.includes(k));
|
|
54
|
-
const otherHasAny = b.length > 0;
|
|
55
|
-
const routeActive = fromKey ? getRouteActive(fromKey) : null;
|
|
56
|
-
if (inter.length > 0) {
|
|
57
|
-
if (routeActive && inter.includes(routeActive)) return routeActive;
|
|
58
|
-
return inter[0];
|
|
59
|
-
}
|
|
60
|
-
if (routeActive && hasBound(other, routeActive)) return routeActive;
|
|
61
|
-
if (b.length === 1) return b[0];
|
|
62
|
-
if (!otherHasAny) {
|
|
63
|
-
if (routeActive && hasBound(current, routeActive)) return routeActive;
|
|
64
|
-
if (a.length === 1) return a[0];
|
|
65
|
-
}
|
|
66
|
-
return "";
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Util function to get the active bound id for a given transition state.
|
|
71
|
-
*
|
|
72
|
-
* It will check by ( priority from highest to lowest ):
|
|
73
|
-
* 1. Requested id
|
|
74
|
-
* 2. Cache
|
|
75
|
-
* 3. Intersection
|
|
76
|
-
*/
|
|
77
|
-
function resolveActiveBound({
|
|
78
|
-
current,
|
|
79
|
-
next,
|
|
80
|
-
previous,
|
|
81
|
-
getPairCache,
|
|
82
|
-
setPairCache,
|
|
83
|
-
getRouteActive
|
|
84
|
-
}) {
|
|
85
|
-
"worklet";
|
|
86
|
-
|
|
87
|
-
const {
|
|
88
|
-
fromKey,
|
|
89
|
-
toKey,
|
|
90
|
-
other
|
|
91
|
-
} = getRoutePair(current, next, previous);
|
|
92
|
-
|
|
93
|
-
// Resolve requested from per-route most recently used (last active bound by route)
|
|
94
|
-
const requestedId = fromKey ? getRouteActive(fromKey) : null;
|
|
95
|
-
const byRequested = resolveFromRequested(requestedId, current, other);
|
|
96
|
-
if (byRequested) {
|
|
97
|
-
if (fromKey && toKey && hasBound(current, byRequested) && hasBound(other, byRequested)) {
|
|
98
|
-
setPairCache(fromKey, toKey, byRequested);
|
|
99
|
-
}
|
|
100
|
-
return byRequested;
|
|
101
|
-
}
|
|
102
|
-
const byPairCache = resolveFromPairCache(fromKey, toKey, other, getPairCache);
|
|
103
|
-
if (byPairCache) {
|
|
104
|
-
if (fromKey && toKey && hasBound(current, byPairCache) && hasBound(other, byPairCache)) {
|
|
105
|
-
setPairCache(fromKey, toKey, byPairCache);
|
|
106
|
-
}
|
|
107
|
-
return byPairCache;
|
|
108
|
-
}
|
|
109
|
-
const byIntersection = resolveFromInteresection(current, other, fromKey, getRouteActive);
|
|
110
|
-
if (byIntersection) {
|
|
111
|
-
if (fromKey && toKey && hasBound(current, byIntersection) && hasBound(other, byIntersection)) {
|
|
112
|
-
setPairCache(fromKey, toKey, byIntersection);
|
|
113
|
-
}
|
|
114
|
-
return byIntersection;
|
|
115
|
-
}
|
|
116
|
-
return "";
|
|
117
|
-
}
|
|
118
|
-
//# sourceMappingURL=_utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["pairKey","fromKey","toKey","hasBound","s","id","bounds","getRoutePair","current","next","previous","isClosing","route","key","other","resolveFromPairCache","getPairCache","cached","resolveFromRequested","reqId","resolveFromInteresection","getRouteActive","a","Object","keys","b","inter","filter","k","includes","otherHasAny","length","routeActive","resolveActiveBound","setPairCache","requestedId","byRequested","byPairCache","byIntersection"],"sourceRoot":"../../../../../src","sources":["shared/stores/bound-store/_utils.ts"],"mappings":";;;;;;;AAeO,SAASA,OAAOA,CAACC,OAAgB,EAAEC,KAAc,EAAE;EACzD,SAAS;;EACT,OAAOD,OAAO,IAAIC,KAAK,GAAG,GAAGD,OAAO,IAAIC,KAAK,EAAE,GAAG,EAAE;AACrD;AAEA,MAAMC,QAAQ,GAAGA,CAACC,CAAoC,EAAEC,EAAkB,KAAK;EAC9E,SAAS;;EACT,OAAO,CAAC,CAACA,EAAE,IAAI,CAAC,CAACD,CAAC,IAAI,CAAC,CAACA,CAAC,CAACE,MAAM,IAAI,CAAC,CAACF,CAAC,CAACE,MAAM,CAACD,EAAE,CAAC;AACnD,CAAC;AAED,MAAME,YAAY,GAAGA,CACpBC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
-
});
|
|
6
|
-
exports.BoundStore = void 0;
|
|
7
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
var _utils = require("./_utils");
|
|
9
|
-
const registry = (0, _reactNativeReanimated.makeMutable)({});
|
|
10
|
-
const pairCache = (0, _reactNativeReanimated.makeMutable)({});
|
|
11
|
-
const lastActiveByRoute = (0, _reactNativeReanimated.makeMutable)({});
|
|
12
|
-
function setBounds(screenId, boundId, bounds = null, styles = {}) {
|
|
13
|
-
"worklet";
|
|
14
|
-
|
|
15
|
-
registry.modify(state => {
|
|
16
|
-
"worklet";
|
|
17
|
-
|
|
18
|
-
if (!state[screenId]) {
|
|
19
|
-
state[screenId] = {};
|
|
20
|
-
}
|
|
21
|
-
state[screenId][boundId] = {
|
|
22
|
-
bounds,
|
|
23
|
-
styles
|
|
24
|
-
};
|
|
25
|
-
return state;
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
function getBounds(screenId) {
|
|
29
|
-
"worklet";
|
|
30
|
-
|
|
31
|
-
return registry.value[screenId] ?? {};
|
|
32
|
-
}
|
|
33
|
-
function setRouteActive(routeKey, boundId) {
|
|
34
|
-
"worklet";
|
|
35
|
-
|
|
36
|
-
lastActiveByRoute.modify(state => {
|
|
37
|
-
"worklet";
|
|
38
|
-
|
|
39
|
-
state[routeKey] = boundId;
|
|
40
|
-
return state;
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
function getRouteActive(routeKey) {
|
|
44
|
-
"worklet";
|
|
45
|
-
|
|
46
|
-
return lastActiveByRoute.value[routeKey] ?? null;
|
|
47
|
-
}
|
|
48
|
-
function setPairCache(fromKey, toKey, boundId) {
|
|
49
|
-
"worklet";
|
|
50
|
-
|
|
51
|
-
const key = (0, _utils.pairKey)(fromKey, toKey);
|
|
52
|
-
if (!key) return;
|
|
53
|
-
pairCache.modify(state => {
|
|
54
|
-
"worklet";
|
|
55
|
-
|
|
56
|
-
state[key] = boundId;
|
|
57
|
-
return state;
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function getPairCache(fromKey, toKey) {
|
|
61
|
-
"worklet";
|
|
62
|
-
|
|
63
|
-
const key = (0, _utils.pairKey)(fromKey, toKey);
|
|
64
|
-
if (!key) return null;
|
|
65
|
-
return pairCache.value[key] ?? null;
|
|
66
|
-
}
|
|
67
|
-
function clear(routeKey) {
|
|
68
|
-
"worklet";
|
|
69
|
-
|
|
70
|
-
registry.modify(state => {
|
|
71
|
-
"worklet";
|
|
72
|
-
|
|
73
|
-
delete state[routeKey];
|
|
74
|
-
return state;
|
|
75
|
-
});
|
|
76
|
-
lastActiveByRoute.modify(state => {
|
|
77
|
-
"worklet";
|
|
78
|
-
|
|
79
|
-
if (state[routeKey]) delete state[routeKey];
|
|
80
|
-
return state;
|
|
81
|
-
});
|
|
82
|
-
pairCache.modify(state => {
|
|
83
|
-
"worklet";
|
|
84
|
-
|
|
85
|
-
const keys = Object.keys(state);
|
|
86
|
-
for (let i = 0; i < keys.length; i++) {
|
|
87
|
-
const k = keys[i];
|
|
88
|
-
const [from, to] = k.split("|");
|
|
89
|
-
if (from === routeKey || to === routeKey) {
|
|
90
|
-
delete state[k];
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return state;
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
function debugBoundStore() {
|
|
97
|
-
"worklet";
|
|
98
|
-
|
|
99
|
-
console.log("[BoundStore] registry keys:", Object.keys(registry.value));
|
|
100
|
-
console.log("[BoundStore] registry size:", Object.keys(registry.value).length);
|
|
101
|
-
console.log("[BoundStore] pairCache keys:", Object.keys(pairCache.value));
|
|
102
|
-
console.log("[BoundStore] pairCache size:", Object.keys(pairCache.value).length);
|
|
103
|
-
console.log("[BoundStore] lastActiveByRoute keys:", Object.keys(lastActiveByRoute.value));
|
|
104
|
-
console.log("[BoundStore] lastActiveByRoute size:", Object.keys(lastActiveByRoute.value).length);
|
|
105
|
-
}
|
|
106
|
-
function getActiveBound(current, next, previous) {
|
|
107
|
-
"worklet";
|
|
108
|
-
|
|
109
|
-
return (0, _utils.resolveActiveBound)({
|
|
110
|
-
current,
|
|
111
|
-
next,
|
|
112
|
-
previous,
|
|
113
|
-
getPairCache,
|
|
114
|
-
setPairCache,
|
|
115
|
-
getRouteActive
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
const BoundStore = exports.BoundStore = {
|
|
119
|
-
setBounds,
|
|
120
|
-
getBounds,
|
|
121
|
-
setRouteActive,
|
|
122
|
-
getRouteActive,
|
|
123
|
-
clear,
|
|
124
|
-
getActiveBound,
|
|
125
|
-
debugBoundStore
|
|
126
|
-
};
|
|
127
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_utils","registry","makeMutable","pairCache","lastActiveByRoute","setBounds","screenId","boundId","bounds","styles","modify","state","getBounds","value","setRouteActive","routeKey","getRouteActive","setPairCache","fromKey","toKey","key","pairKey","getPairCache","clear","keys","Object","i","length","k","from","to","split","debugBoundStore","console","log","getActiveBound","current","next","previous","resolveActiveBound","BoundStore","exports"],"sourceRoot":"../../../../../src","sources":["shared/stores/bound-store/index.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAD,OAAA;AAOA,MAAME,QAAQ,GAAG,IAAAC,kCAAW,EAAa,CAAC,CAAC,CAAC;AAC5C,MAAMC,SAAS,GAAG,IAAAD,kCAAW,EAAyB,CAAC,CAAC,CAAC;AACzD,MAAME,iBAAiB,GAAG,IAAAF,kCAAW,EAAyB,CAAC,CAAC,CAAC;AAEjE,SAASG,SAASA,CACjBC,QAAgB,EAChBC,OAAe,EACfC,MAAiC,GAAG,IAAI,EACxCC,MAAkB,GAAG,CAAC,CAAC,EACtB;EACD,SAAS;;EACTR,QAAQ,CAACS,MAAM,CAAEC,KAAU,IAAK;IAC/B,SAAS;;IACT,IAAI,CAACA,KAAK,CAACL,QAAQ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;EACzEoB,OAAO,CAACC,GAAG,CACV,8BAA8B,EAC9BT,MAAM,CAACD,IAAI,CAACrB,SAAS,CAACU,KAAK,CAAC,CAACc,MAC9B,CAAC;EACDM,OAAO,CAACC,GAAG,CACV,sCAAsC,EACtCT,MAAM,CAACD,IAAI,CAACpB,iBAAiB,CAACS,KAAK,CACpC,CAAC;EACDoB,OAAO,CAACC,GAAG,CACV,sCAAsC,EACtCT,MAAM,CAACD,IAAI,CAACpB,iBAAiB,CAACS,KAAK,CAAC,CAACc,MACtC,CAAC;AACF;AAEA,SAASQ,cAAcA,CACtBC,OAA8B,EAC9BC,IAAuC,EACvCC,QAA2C,EAC1C;EACD,SAAS;;EACT,OAAO,IAAAC,yBAAkB,EAAC;IACzBH,OAAO;IACPC,IAAI;IACJC,QAAQ;IACRhB,YAAY;IACZL,YAAY;IACZD;EACD,CAAC,CAAC;AACH;AAEO,MAAMwB,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG;EACzBnC,SAAS;EACTO,SAAS;EACTE,cAAc;EACdE,cAAc;EACdO,KAAK;EACLY,cAAc;EACdH;AACD,CAAC","ignoreList":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.resetStoresForScreen = void 0;
|
|
7
|
-
var _animationStore = require("../animation-store");
|
|
8
|
-
var _boundStore = require("../bound-store");
|
|
9
|
-
var _gestureStore = require("../gesture-store");
|
|
10
|
-
/**
|
|
11
|
-
* Reset all stores for a given screen
|
|
12
|
-
*/
|
|
13
|
-
const resetStoresForScreen = current => {
|
|
14
|
-
_animationStore.AnimationStore.clear(current.route.key);
|
|
15
|
-
_gestureStore.GestureStore.clear(current.route.key);
|
|
16
|
-
_boundStore.BoundStore.clear(current.route.key);
|
|
17
|
-
};
|
|
18
|
-
exports.resetStoresForScreen = resetStoresForScreen;
|
|
19
|
-
//# sourceMappingURL=reset-stores-for-screen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_animationStore","require","_boundStore","_gestureStore","resetStoresForScreen","current","AnimationStore","clear","route","key","GestureStore","BoundStore","exports"],"sourceRoot":"../../../../../src","sources":["shared/stores/utils/reset-stores-for-screen.ts"],"mappings":";;;;;;AACA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACO,MAAMG,oBAAoB,GAAIC,OAA8B,IAAK;EACvEC,8BAAc,CAACC,KAAK,CAACF,OAAO,CAACG,KAAK,CAACC,GAAG,CAAC;EACvCC,0BAAY,CAACH,KAAK,CAACF,OAAO,CAACG,KAAK,CAACC,GAAG,CAAC;EACrCE,sBAAU,CAACJ,KAAK,CAACF,OAAO,CAACG,KAAK,CAACC,GAAG,CAAC;AACpC,CAAC;AAACG,OAAA,CAAAR,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["GestureOffsetState","exports"],"sourceRoot":"../../../../src","sources":["shared/types/gesture.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 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/_types/geometry.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/_types/get-bounds.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.flattenStyle = flattenStyle;
|
|
7
|
-
function flattenStyle(style) {
|
|
8
|
-
"worklet";
|
|
9
|
-
|
|
10
|
-
if (style === null || typeof style !== "object") {
|
|
11
|
-
return style;
|
|
12
|
-
}
|
|
13
|
-
if (!Array.isArray(style)) {
|
|
14
|
-
return style;
|
|
15
|
-
}
|
|
16
|
-
const result = {};
|
|
17
|
-
for (let i = 0, styleLength = style.length; i < styleLength; ++i) {
|
|
18
|
-
const computedStyle = flattenStyle(style[i]);
|
|
19
|
-
if (computedStyle) {
|
|
20
|
-
for (const key in computedStyle) {
|
|
21
|
-
result[key] = computedStyle[key];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return result;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=flatten-styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["flattenStyle","style","Array","isArray","result","i","styleLength","length","computedStyle","key"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/_utils/flatten-styles.ts"],"mappings":";;;;;;AAAO,SAASA,YAAYA,CAAaC,KAAiB,EAAc;EACvE,SAAS;;EACT,IAAIA,KAAK,KAAK,IAAI,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAChD,OAAOA,KAAK;EACb;EAEA,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE;IAC1B,OAAOA,KAAK;EACb;EAEA,MAAMG,MAAqC,GAAG,CAAC,CAAC;EAChD,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEC,WAAW,GAAGL,KAAK,CAACM,MAAM,EAAEF,CAAC,GAAGC,WAAW,EAAE,EAAED,CAAC,EAAE;IACjE,MAAMG,aAAa,GAAGR,YAAY,CAACC,KAAK,CAACI,CAAC,CAAC,CAAC;IAC5C,IAAIG,aAAa,EAAE;MAClB,KAAK,MAAMC,GAAG,IAAID,aAAa,EAAE;QAChCJ,MAAM,CAACK,GAAG,CAAC,GAAGD,aAAa,CAACC,GAAG,CAAC;MACjC;IACD;EACD;EACA,OAAOL,MAAM;AACd","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
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/_utils/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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C,aAAa,GAAGF,UAAU,CAAC7B,KAAK,GAAG,CAAC;EAC1C,MAAMgC,aAAa,GAAGH,UAAU,CAAC5B,MAAM,GAAG,CAAC;;EAE3C;EACA,MAAMgC,0BAA0B,GAAGX,SAAS,CAACpB,CAAC,GAAG6B,aAAa;EAC9D,MAAMG,0BAA0B,GAAGZ,SAAS,CAACnB,CAAC,GAAG6B,aAAa;;EAE9D;EACA,MAAMG,gBAAgB,GAAGJ,aAAa,GAAGE,0BAA0B,GAAGH,CAAC;EACvE,MAAMM,gBAAgB,GAAGJ,aAAa,GAAGE,0BAA0B,GAAGJ,CAAC;;EAEvE;EACA,MAAMO,EAAE,GAAGhB,WAAW,CAACnB,CAAC,GAAGiC,gBAAgB;EAC3C,MAAMG,EAAE,GAAGjB,WAAW,CAAClB,CAAC,GAAGiC,gBAAgB;EAE3C,OAAO;IACNC,EAAE;IACFC,EAAE;IACFR,CAAC;IACDvB;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getBounds = void 0;
|
|
7
|
-
const fallbackBounds = {
|
|
8
|
-
bounds: {
|
|
9
|
-
width: 0,
|
|
10
|
-
height: 0,
|
|
11
|
-
x: 0,
|
|
12
|
-
y: 0,
|
|
13
|
-
pageX: 0,
|
|
14
|
-
pageY: 0
|
|
15
|
-
},
|
|
16
|
-
styles: {}
|
|
17
|
-
};
|
|
18
|
-
const getBounds = props => {
|
|
19
|
-
"worklet";
|
|
20
|
-
|
|
21
|
-
const boundId = props.id;
|
|
22
|
-
const phase = props.phase;
|
|
23
|
-
if (phase && boundId) {
|
|
24
|
-
const phaseMap = {
|
|
25
|
-
current: props.current?.bounds[boundId],
|
|
26
|
-
next: props.next?.bounds[boundId],
|
|
27
|
-
previous: props.previous?.bounds[boundId]
|
|
28
|
-
};
|
|
29
|
-
const phaseBounds = phaseMap[phase];
|
|
30
|
-
if (!phaseBounds) {
|
|
31
|
-
return fallbackBounds;
|
|
32
|
-
}
|
|
33
|
-
return {
|
|
34
|
-
bounds: phaseBounds.bounds,
|
|
35
|
-
styles: phaseBounds?.styles
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
if (!props.next && boundId) {
|
|
39
|
-
const previousBounds = props.previous?.bounds[boundId];
|
|
40
|
-
return previousBounds || fallbackBounds;
|
|
41
|
-
}
|
|
42
|
-
if (boundId) {
|
|
43
|
-
const nextBounds = props.next?.bounds[boundId];
|
|
44
|
-
return nextBounds || fallbackBounds;
|
|
45
|
-
}
|
|
46
|
-
return fallbackBounds;
|
|
47
|
-
};
|
|
48
|
-
exports.getBounds = getBounds;
|
|
49
|
-
//# sourceMappingURL=get-bounds.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["fallbackBounds","bounds","width","height","x","y","pageX","pageY","styles","getBounds","props","boundId","id","phase","phaseMap","current","next","previous","phaseBounds","previousBounds","nextBounds","exports"],"sourceRoot":"../../../../../../src","sources":["shared/utils/bounds/_utils/get-bounds.ts"],"mappings":";;;;;;AAIA,MAAMA,cAAc,GAAG;EACtBC,MAAM,EAAE;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,CAAC,EAAE,CAAC;IACJC,CAAC,EAAE,CAAC;IACJC,KAAK,EAAE,CAAC;IACRC,KAAK,EAAE;EACR,CAAC;EACDC,MAAM,EAAE,CAAC;AACV,CAAC;AAEM,MAAMC,SAAS,GAAIC,KAAsB,IAAiB;EAChE,SAAS;;EACT,MAAMC,OAAO,GAAGD,KAAK,CAACE,EAAE;EACxB,MAAMC,KAAK,GAAGH,KAAK,CAACG,KAAK;EAEzB,IAAIA,KAAK,IAAIF,OAAO,EAAE;IACrB,MAAMG,QAAQ,GAAG;MAChBC,OAAO,EAAEL,KAAK,CAACK,OAAO,EAAEd,MAAM,CAACU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