react-native-screen-transitions 3.4.0-alpha.3 → 3.4.0-alpha.4
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/lib/commonjs/component-stack/components/component-screen.js +1 -1
- package/lib/commonjs/component-stack/components/component-screen.js.map +1 -1
- package/lib/commonjs/shared/animation/snap-to.js +6 -3
- package/lib/commonjs/shared/animation/snap-to.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +47 -4
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +2 -2
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js +3 -16
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/commonjs/shared/components/native-screen.js +3 -3
- package/lib/commonjs/shared/components/native-screen.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/deferred-visibility-host.js +1 -1
- package/lib/commonjs/shared/components/screen-container/deferred-visibility-host.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +18 -14
- package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +8 -5
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +12 -28
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +17 -4
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +4 -2
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +6 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js +13 -11
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/index.js +5 -3
- package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -1
- package/lib/commonjs/shared/configs/presets.js +3 -4
- package/lib/commonjs/shared/configs/presets.js.map +1 -1
- package/lib/commonjs/shared/constants.js +16 -2
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js +2 -2
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js +12 -9
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js +5 -5
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/helpers/register-direction-claims.js +1 -1
- package/lib/commonjs/shared/providers/gestures/helpers/register-direction-claims.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/use-build-gestures.js +1 -1
- package/lib/commonjs/shared/providers/gestures/use-build-gestures.js.map +1 -1
- package/lib/commonjs/shared/providers/register-bounds.provider.js +5 -5
- package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/has-transitions-enabled.js +17 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/has-transitions-enabled.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js +72 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +22 -108
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +42 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/helpers/resolve-interpolated-style-output.js +17 -3
- package/lib/commonjs/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles.provider.js +4 -1
- package/lib/commonjs/shared/providers/screen/styles.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/direct.provider.js +1 -1
- package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
- package/lib/commonjs/shared/stores/animation.store.js +12 -40
- package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
- package/lib/commonjs/shared/stores/gesture.store.js +13 -33
- package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
- package/lib/commonjs/shared/stores/system.store.js +31 -0
- package/lib/commonjs/shared/stores/system.store.js.map +1 -0
- package/lib/commonjs/shared/types/bounds.types.js +1 -3
- package/lib/commonjs/shared/types/bounds.types.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js +2 -2
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/index.js +23 -50
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/zoom/build.js +96 -355
- package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/zoom/config.js +15 -101
- package/lib/commonjs/shared/utils/bounds/zoom/config.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/zoom/math.js +154 -0
- package/lib/commonjs/shared/utils/bounds/zoom/math.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/zoom/types.js +1 -3
- package/lib/commonjs/shared/utils/bounds/zoom/types.js.map +1 -1
- package/lib/commonjs/shared/utils/create-store.js +54 -0
- package/lib/commonjs/shared/utils/create-store.js.map +1 -0
- package/lib/module/component-stack/components/component-screen.js +1 -1
- package/lib/module/component-stack/components/component-screen.js.map +1 -1
- package/lib/module/shared/animation/snap-to.js +6 -3
- package/lib/module/shared/animation/snap-to.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +48 -5
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +2 -2
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/index.js +3 -16
- package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/module/shared/components/native-screen.js +3 -3
- package/lib/module/shared/components/native-screen.js.map +1 -1
- package/lib/module/shared/components/screen-container/deferred-visibility-host.js +2 -2
- package/lib/module/shared/components/screen-container/deferred-visibility-host.js.map +1 -1
- package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +18 -14
- package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js +8 -5
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +13 -29
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +19 -6
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +4 -2
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +6 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js +13 -11
- package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/index.js +5 -3
- package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -1
- package/lib/module/shared/configs/presets.js +3 -4
- package/lib/module/shared/configs/presets.js.map +1 -1
- package/lib/module/shared/constants.js +16 -2
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/hooks/animation/use-associated-style.js +2 -2
- package/lib/module/shared/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js +12 -9
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js +5 -5
- package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -1
- package/lib/module/shared/providers/gestures/helpers/register-direction-claims.js +1 -1
- package/lib/module/shared/providers/gestures/helpers/register-direction-claims.js.map +1 -1
- package/lib/module/shared/providers/gestures/use-build-gestures.js +1 -1
- package/lib/module/shared/providers/gestures/use-build-gestures.js.map +1 -1
- package/lib/module/shared/providers/register-bounds.provider.js +5 -5
- package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/has-transitions-enabled.js +12 -0
- package/lib/module/shared/providers/screen/animation/helpers/has-transitions-enabled.js.map +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js +67 -0
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +22 -108
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +37 -0
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -0
- package/lib/module/shared/providers/screen/helpers/resolve-interpolated-style-output.js +15 -2
- package/lib/module/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +1 -1
- package/lib/module/shared/providers/screen/styles.provider.js +5 -2
- package/lib/module/shared/providers/screen/styles.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/direct.provider.js +1 -1
- package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/helpers/use-processed-routes.js +1 -1
- package/lib/module/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
- package/lib/module/shared/stores/animation.store.js +12 -40
- package/lib/module/shared/stores/animation.store.js.map +1 -1
- package/lib/module/shared/stores/gesture.store.js +13 -33
- package/lib/module/shared/stores/gesture.store.js.map +1 -1
- package/lib/module/shared/stores/system.store.js +27 -0
- package/lib/module/shared/stores/system.store.js.map +1 -0
- package/lib/module/shared/types/bounds.types.js +9 -1
- package/lib/module/shared/types/bounds.types.js.map +1 -1
- package/lib/module/shared/utils/animation/animate-to-progress.js +2 -2
- package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/index.js +23 -50
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/zoom/build.js +89 -348
- package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/zoom/config.js +12 -98
- package/lib/module/shared/utils/bounds/zoom/config.js.map +1 -1
- package/lib/module/shared/utils/bounds/zoom/math.js +136 -0
- package/lib/module/shared/utils/bounds/zoom/math.js.map +1 -0
- package/lib/module/shared/utils/bounds/zoom/types.js +1 -1
- package/lib/module/shared/utils/bounds/zoom/types.js.map +1 -1
- package/lib/module/shared/utils/create-store.js +50 -0
- package/lib/module/shared/utils/create-store.js.map +1 -0
- package/lib/typescript/shared/animation/snap-to.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts +1 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts +2 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts +2 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/index.d.ts.map +1 -1
- package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
- 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/index.d.ts +3 -3
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts +2 -2
- package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/use-build-gestures.d.ts.map +1 -1
- package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/has-transitions-enabled.d.ts +8 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/has-transitions-enabled.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts +22 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +4 -2
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +21 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/helpers/resolve-interpolated-style-output.d.ts +6 -2
- package/lib/typescript/shared/providers/screen/helpers/resolve-interpolated-style-output.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts +10 -17
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/gesture.store.d.ts +24 -14
- package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/system.store.d.ts +27 -0
- package/lib/typescript/shared/stores/system.store.d.ts.map +1 -0
- package/lib/typescript/shared/types/animation.types.d.ts +38 -9
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +14 -42
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +2 -2
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +11 -0
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts +3 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/index.d.ts +2 -3
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +2 -3
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/config.d.ts +15 -41
- package/lib/typescript/shared/utils/bounds/zoom/config.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/math.d.ts +44 -0
- package/lib/typescript/shared/utils/bounds/zoom/math.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +8 -13
- package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/create-store.d.ts +14 -0
- package/lib/typescript/shared/utils/create-store.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/component-stack/components/component-screen.tsx +1 -1
- package/src/shared/animation/snap-to.ts +10 -4
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +1 -1
- package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +82 -10
- package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +2 -5
- package/src/shared/components/create-boundary-component/index.tsx +3 -22
- package/src/shared/components/native-screen.tsx +3 -9
- package/src/shared/components/screen-container/deferred-visibility-host.tsx +2 -2
- package/src/shared/components/screen-container/hooks/use-content-layout.ts +42 -43
- package/src/shared/components/screen-container/layers/backdrop.tsx +12 -6
- package/src/shared/components/screen-container/layers/content.tsx +17 -49
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +26 -5
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.ts +4 -2
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition/index.ts +8 -0
- package/src/shared/components/screen-lifecycle/hooks/use-open-transition.ts +21 -10
- package/src/shared/components/screen-lifecycle/index.tsx +8 -2
- package/src/shared/configs/presets.ts +8 -7
- package/src/shared/constants.ts +14 -0
- package/src/shared/hooks/animation/use-associated-style.ts +2 -8
- package/src/shared/index.ts +2 -0
- package/src/shared/providers/gestures/handlers/use-handlers.ts +13 -10
- package/src/shared/providers/gestures/helpers/gesture-snap-points.ts +12 -10
- package/src/shared/providers/gestures/helpers/register-direction-claims.ts +1 -1
- package/src/shared/providers/gestures/use-build-gestures.ts +1 -3
- package/src/shared/providers/register-bounds.provider.tsx +5 -11
- package/src/shared/providers/screen/animation/helpers/has-transitions-enabled.ts +14 -0
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state.ts +108 -0
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +37 -199
- package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +77 -0
- package/src/shared/providers/screen/helpers/resolve-interpolated-style-output.ts +24 -4
- package/src/shared/providers/screen/styles.provider.tsx +5 -1
- package/src/shared/providers/stack/direct.provider.tsx +1 -1
- package/src/shared/providers/stack/helpers/use-processed-routes.ts +1 -1
- package/src/shared/stores/animation.store.ts +11 -61
- package/src/shared/stores/gesture.store.ts +25 -45
- package/src/shared/stores/system.store.ts +44 -0
- package/src/shared/types/animation.types.ts +41 -9
- package/src/shared/types/bounds.types.ts +25 -25
- package/src/shared/types/index.ts +2 -0
- package/src/shared/types/screen.types.ts +12 -0
- package/src/shared/utils/animation/animate-to-progress.ts +4 -2
- package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +0 -1
- package/src/shared/utils/bounds/index.ts +26 -75
- package/src/shared/utils/bounds/zoom/build.ts +167 -494
- package/src/shared/utils/bounds/zoom/config.ts +14 -164
- package/src/shared/utils/bounds/zoom/math.ts +193 -0
- package/src/shared/utils/bounds/zoom/types.ts +15 -17
- package/src/shared/utils/create-store.ts +62 -0
- package/lib/commonjs/shared/utils/bounds/types/frame-props.js +0 -6
- package/lib/commonjs/shared/utils/bounds/types/frame-props.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/zoom/accessor.js +0 -54
- package/lib/commonjs/shared/utils/bounds/zoom/accessor.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/zoom/index.js +0 -20
- package/lib/commonjs/shared/utils/bounds/zoom/index.js.map +0 -1
- package/lib/module/shared/utils/bounds/types/frame-props.js +0 -4
- package/lib/module/shared/utils/bounds/types/frame-props.js.map +0 -1
- package/lib/module/shared/utils/bounds/zoom/accessor.js +0 -49
- package/lib/module/shared/utils/bounds/zoom/accessor.js.map +0 -1
- package/lib/module/shared/utils/bounds/zoom/index.js +0 -5
- package/lib/module/shared/utils/bounds/zoom/index.js.map +0 -1
- package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts +0 -5
- package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts +0 -17
- package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/zoom/index.d.ts +0 -3
- package/lib/typescript/shared/utils/bounds/zoom/index.d.ts.map +0 -1
- package/src/shared/utils/bounds/types/frame-props.ts +0 -5
- package/src/shared/utils/bounds/zoom/accessor.ts +0 -69
- package/src/shared/utils/bounds/zoom/index.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useLayoutEffect","runOnUI","useSharedValue","AnimationStore","BoundStore","resolvePendingSourceKey","resolveInitialLayoutMeasurementIntent","useInitialLayoutHandler","params","enabled","sharedBoundTag","currentScreenKey","ancestorKeys","expectedSourceScreenKey","maybeMeasureAndStore","isAnimating","
|
|
1
|
+
{"version":3,"names":["useCallback","useLayoutEffect","runOnUI","useSharedValue","AnimationStore","BoundStore","resolvePendingSourceKey","resolveInitialLayoutMeasurementIntent","useInitialLayoutHandler","params","enabled","sharedBoundTag","currentScreenKey","ancestorKeys","expectedSourceScreenKey","maybeMeasureAndStore","isAnimating","getValue","ancestorAnimations","map","key","hasMeasuredOnLayout","handleInitialLayout","get","isAnyAnimating","i","length","hasPendingLinkFromSource","resolvedSourceKey","intent","hasSharedBoundTag","set"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,eAAe,QAAQ,OAAO;AACpD,SAASC,OAAO,EAAEC,cAAc,QAAQ,yBAAyB;AACjE,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,uBAAuB,QAAQ,uCAAuC;AAE/E,SAASC,qCAAqC,QAAQ,6BAA6B;AAEnF,OAAO,MAAMC,uBAAuB,GAAIC,MAOvC,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,cAAc;IACdC,gBAAgB;IAChBC,YAAY;IACZC,uBAAuB;IACvBC;EACD,CAAC,GAAGN,MAAM;EAEV,MAAMO,WAAW,GAAGZ,cAAc,CAACa,QAAQ,CAACL,gBAAgB,EAAE,WAAW,CAAC;EAE1E,MAAMM,kBAAkB,GAAGL,YAAY,CAACM,GAAG,CAAEC,GAAG,IAC/ChB,cAAc,CAACa,QAAQ,CAACG,GAAG,EAAE,WAAW,CACzC,CAAC;EAED,MAAMC,mBAAmB,GAAGlB,cAAc,CAAC,KAAK,CAAC;EAEjD,MAAMmB,mBAAmB,GAAGtB,WAAW,CAAC,MAAM;IAC7C,SAAS;;IACT,IAAI,CAACU,OAAO,EAAE;IACd,IAAI,CAACC,cAAc,IAAIU,mBAAmB,CAACE,GAAG,C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useAutoSourceMeasurement } from "./hooks/use-auto-source-measurement";
|
|
|
13
13
|
import { useBoundaryMeasureAndStore } from "./hooks/use-boundary-measure-and-store";
|
|
14
14
|
import { useBoundaryPresence } from "./hooks/use-boundary-presence";
|
|
15
15
|
import { useGroupActiveMeasurement } from "./hooks/use-group-active-measurement";
|
|
16
|
-
import { useGroupActiveSourceMeasurement } from "./hooks/use-group-active-source-measurement";
|
|
17
16
|
import { useInitialLayoutHandler } from "./hooks/use-initial-layout-handler";
|
|
18
17
|
import { usePendingDestinationMeasurement } from "./hooks/use-pending-destination-measurement";
|
|
19
18
|
import { usePendingDestinationRetryMeasurement } from "./hooks/use-pending-destination-retry-measurement";
|
|
@@ -72,8 +71,8 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
72
71
|
method
|
|
73
72
|
};
|
|
74
73
|
}, [anchor, scaleMode, target, method]);
|
|
75
|
-
const isAnimating = AnimationStore.
|
|
76
|
-
const progress = AnimationStore.
|
|
74
|
+
const isAnimating = AnimationStore.getValue(currentScreenKey, "animating");
|
|
75
|
+
const progress = AnimationStore.getValue(currentScreenKey, "progress");
|
|
77
76
|
const preparedStyles = useMemo(() => prepareStyleForBounds(style), [style]);
|
|
78
77
|
const {
|
|
79
78
|
associatedStyles
|
|
@@ -144,20 +143,8 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
144
143
|
enabled: runtimeEnabled,
|
|
145
144
|
group,
|
|
146
145
|
id,
|
|
146
|
+
currentScreenKey,
|
|
147
147
|
shouldUpdateDestination,
|
|
148
|
-
isAnimating,
|
|
149
|
-
maybeMeasureAndStore
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
// Source-side analog for grouped retargeting: when an unfocused/source
|
|
153
|
-
// boundary becomes the active member, refresh its snapshot (and source
|
|
154
|
-
// link when one exists) so close transitions don't use stale geometry.
|
|
155
|
-
useGroupActiveSourceMeasurement({
|
|
156
|
-
enabled: runtimeEnabled,
|
|
157
|
-
group,
|
|
158
|
-
id,
|
|
159
|
-
hasNextScreen,
|
|
160
|
-
isAnimating,
|
|
161
148
|
maybeMeasureAndStore
|
|
162
149
|
});
|
|
163
150
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","memo","useCallback","useMemo","Pressable","View","RNView","Animated","runOnUI","useAnimatedRef","useAssociatedStyles","useLayoutAnchorContext","useDescriptorDerivations","AnimationStore","BoundStore","prepareStyleForBounds","useAutoSourceMeasurement","useBoundaryMeasureAndStore","useBoundaryPresence","useGroupActiveMeasurement","
|
|
1
|
+
{"version":3,"names":["forwardRef","memo","useCallback","useMemo","Pressable","View","RNView","Animated","runOnUI","useAnimatedRef","useAssociatedStyles","useLayoutAnchorContext","useDescriptorDerivations","AnimationStore","BoundStore","prepareStyleForBounds","useAutoSourceMeasurement","useBoundaryMeasureAndStore","useBoundaryPresence","useGroupActiveMeasurement","useInitialLayoutHandler","usePendingDestinationMeasurement","usePendingDestinationRetryMeasurement","useScrollSettledMeasurement","buildBoundaryMatchKey","jsx","_jsx","setGroupSelectionOnUI","group","id","setGroupActiveId","createBoundaryComponent","Wrapped","options","alreadyAnimated","AnimatedComponent","createAnimatedComponent","Inner","props","_ref","enabled","anchor","scaleMode","target","method","style","onPress","rest","sharedBoundTag","animatedRef","previousScreenKey","preferredSourceScreenKey","currentScreenKey","nextScreenKey","ancestorKeys","navigatorKey","ancestorNavigatorKeys","hasConfiguredInterpolator","runtimeEnabled","hasNextScreen","shouldUpdateDestination","layoutAnchor","boundaryConfig","undefined","isAnimating","getValue","progress","preparedStyles","associatedStyles","resetTransformOnUnset","maybeMeasureAndStore","shouldRunDestinationEffects","expectedSourceScreenKey","animating","handlePress","args","String","intent","resolvedOnPress","ref","collapsable","BoundaryView","displayName","BoundaryPressable","Boundary"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/index.tsx"],"mappings":";;AAAA,SAECA,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,OAAO,QACD,OAAO;AACd,SA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;AACA;AACA;AACA,OAAO,MAAME,QAAQ,GAAG;EACvB;EACA/E,IAAI,EAAE4E,YAAY;EAClB;EACA7E,SAAS,EAAE+E;AACZ,CAAC","ignoreList":[]}
|
|
@@ -42,9 +42,9 @@ export const NativeScreen = ({
|
|
|
42
42
|
const topIndex = routesLength - 1;
|
|
43
43
|
const topRouteKey = routes[topIndex]?.key ?? routeKey;
|
|
44
44
|
const screenRef = useAnimatedRef();
|
|
45
|
-
const sceneClosing = AnimationStore.
|
|
46
|
-
const topSceneProgress = AnimationStore.
|
|
47
|
-
const topSceneClosing = AnimationStore.
|
|
45
|
+
const sceneClosing = AnimationStore.getValue(routeKey, "closing");
|
|
46
|
+
const topSceneProgress = AnimationStore.getValue(topRouteKey, "progress");
|
|
47
|
+
const topSceneClosing = AnimationStore.getValue(topRouteKey, "closing");
|
|
48
48
|
const screenActivity = useSharedValue(ScreenActivity.TRANSITIONING_OR_BELOW_TOP);
|
|
49
49
|
useDerivedValue(() => {
|
|
50
50
|
if (!topSceneProgress) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","Animated","Extrapolation","interpolate","useAnimatedProps","useAnimatedRef","useDerivedValue","useSharedValue","Screen","RNSScreen","EPSILON","useStack","LayoutAnchorProvider","useManagedStackContext","AnimationStore","jsx","_jsx","PASSTHROUGH","ScreenActivity","POINT_NONE","POINT_BOX_NONE","AnimatedNativeScreen","createAnimatedComponent","NativeScreen","routeKey","index","isPreloaded","children","freezeOnBlur","shouldFreeze","flags","DISABLE_NATIVE_SCREENS","routes","optimisticFocusedIndex","activeScreensLimit","backdropBehaviors","routesLength","length","topIndex","topRouteKey","key","screenRef","sceneClosing","
|
|
1
|
+
{"version":3,"names":["StyleSheet","Animated","Extrapolation","interpolate","useAnimatedProps","useAnimatedRef","useDerivedValue","useSharedValue","Screen","RNSScreen","EPSILON","useStack","LayoutAnchorProvider","useManagedStackContext","AnimationStore","jsx","_jsx","PASSTHROUGH","ScreenActivity","POINT_NONE","POINT_BOX_NONE","AnimatedNativeScreen","createAnimatedComponent","NativeScreen","routeKey","index","isPreloaded","children","freezeOnBlur","shouldFreeze","flags","DISABLE_NATIVE_SCREENS","routes","optimisticFocusedIndex","activeScreensLimit","backdropBehaviors","routesLength","length","topIndex","topRouteKey","key","screenRef","sceneClosing","getValue","topSceneProgress","topSceneClosing","screenActivity","TRANSITIONING_OR_BELOW_TOP","set","INACTIVE","focusedIndex","value","topIsClosing","get","postCloseActiveStart","Math","max","next","ON_TOP","outputValue","v","CLAMP","trunc","animatedProps","activity","isClosing","activeIndex","isActive","activeBackdrop","activeAllowsPassthrough","isAllowedPassthroughBelow","pointerEvents","activityState","View","ref","collapsable","style","absoluteFill","anchorRef","enabled"],"sourceRoot":"../../../../src","sources":["shared/components/native-screen.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAmB,cAAc;AACpD,OAAOC,QAAQ,IACdC,aAAa,EACbC,WAAW,EACXC,gBAAgB,EAChBC,cAAc,EACdC,eAAe,EACfC,cAAc,QACR,yBAAyB;AAChC,SAASC,MAAM,IAAIC,SAAS,QAAQ,sBAAsB;AAC1D,SAASC,OAAO,QAAQ,cAAc;AACtC,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,oBAAoB,QAAQ,qCAAqC;AAC1E,SAASC,sBAAsB,QAAQ,qCAAqC;AAC5E,SAASC,cAAc,QAAQ,2BAA2B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3D,MAAMC,WAAW,GAAG,aAAa;AAAC,IAU7BC,cAAc,0BAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA,EAAdA,cAAc;AAMnB,MAAMC,UAAU,GAAG,MAAe;AAClC,MAAMC,cAAc,GAAG,UAAmB;AAE1C,MAAMC,oBAAoB,GAAGpB,QAAQ,CAACqB,uBAAuB,CAACb,SAAS,CAAC;AAExE,O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3BmC,aAAa,EAAEA,aAAc;IAAApC,QAAA,eAE7BX,IAAA,CAACJ,oBAAoB;MAACkE,SAAS,EAAErC,SAAU;MAAAd,QAAA,EACzCA;IAAQ,CACY;EAAC,CACF,CAAC;AAEzB,CAAC","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { memo } from "react";
|
|
4
4
|
import { StyleSheet } from "react-native";
|
|
5
5
|
import Animated, { useAnimatedStyle } from "react-native-reanimated";
|
|
6
|
-
import { HIDDEN_STYLE,
|
|
6
|
+
import { HIDDEN_STYLE, VISIBLE_STYLE } from "../../constants";
|
|
7
7
|
import { useScreenStyles } from "../../providers/screen/styles.provider";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
/**
|
|
@@ -22,7 +22,7 @@ export const DeferredVisibilityHost = /*#__PURE__*/memo(({
|
|
|
22
22
|
const animatedStyle = useAnimatedStyle(() => {
|
|
23
23
|
"worklet";
|
|
24
24
|
|
|
25
|
-
return resolutionMode.value === "deferred" ? HIDDEN_STYLE :
|
|
25
|
+
return resolutionMode.value === "deferred" ? HIDDEN_STYLE : VISIBLE_STYLE;
|
|
26
26
|
});
|
|
27
27
|
return /*#__PURE__*/_jsx(Animated.View, {
|
|
28
28
|
collapsable: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","StyleSheet","Animated","useAnimatedStyle","HIDDEN_STYLE","
|
|
1
|
+
{"version":3,"names":["memo","StyleSheet","Animated","useAnimatedStyle","HIDDEN_STYLE","VISIBLE_STYLE","useScreenStyles","jsx","_jsx","DeferredVisibilityHost","children","resolutionMode","animatedStyle","value","View","collapsable","style","styles","host","create","flex"],"sourceRoot":"../../../../../src","sources":["shared/components/screen-container/deferred-visibility-host.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,IAAIC,gBAAgB,QAAQ,yBAAyB;AACpE,SAASC,YAAY,EAAEC,aAAa,QAAQ,iBAAiB;AAC7D,SAASC,eAAe,QAAQ,wCAAwC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,gBAAGT,IAAI,CAAC,CAAC;EAAEU;AAAgB,CAAC,KAAK;EACnE,MAAM;IAAEC;EAAe,CAAC,GAAGL,eAAe,CAAC,CAAC;EAE5C,MAAMM,aAAa,GAAGT,gBAAgB,CAAC,MAAM;IAC5C,SAAS;;IACT,OAAOQ,cAAc,CAACE,KAAK,KAAK,UAAU,GAAGT,YAAY,GAAGC,aAAa;EAC1E,CAAC,CAAC;EAEF,oBACCG,IAAA,CAACN,QAAQ,CAACY,IAAI;IAACC,WAAW,EAAE,KAAM;IAACC,KAAK,EAAE,CAACC,MAAM,CAACC,IAAI,EAAEN,aAAa,CAAE;IAAAF,QAAA,EACrEA;EAAQ,CACK,CAAC;AAElB,CAAC,CAAC;AAEF,MAAMO,MAAM,GAAGhB,UAAU,CAACkB,MAAM,CAAC;EAChCD,IAAI,EAAE;IACLE,IAAI,EAAE;EACP;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ import { useWindowDimensions } from "react-native";
|
|
|
5
5
|
import { runOnUI } from "react-native-reanimated";
|
|
6
6
|
import { useDescriptorDerivations, useDescriptors } from "../../../providers/screen/descriptors";
|
|
7
7
|
import { AnimationStore } from "../../../stores/animation.store";
|
|
8
|
+
import { SystemStore } from "../../../stores/system.store";
|
|
8
9
|
import { animateToProgress } from "../../../utils/animation/animate-to-progress";
|
|
9
10
|
export function useContentLayout() {
|
|
10
11
|
const {
|
|
@@ -17,9 +18,12 @@ export function useContentLayout() {
|
|
|
17
18
|
height: screenHeight
|
|
18
19
|
} = useWindowDimensions();
|
|
19
20
|
const routeKey = current.route.key;
|
|
20
|
-
const animations = AnimationStore.
|
|
21
|
-
const
|
|
22
|
-
const
|
|
21
|
+
const animations = AnimationStore.getBag(routeKey);
|
|
22
|
+
const targetProgressValue = SystemStore.getValue(routeKey, "targetProgress");
|
|
23
|
+
const resolvedAutoSnapPointValue = SystemStore.getValue(routeKey, "resolvedAutoSnapPoint");
|
|
24
|
+
const measuredContentLayoutValue = SystemStore.getValue(routeKey, "measuredContentLayout");
|
|
25
|
+
const experimental_animateOnInitialMount = current.options.experimental_animateOnInitialMount;
|
|
26
|
+
const transitionSpec = current.options.transitionSpec;
|
|
23
27
|
return useCallback(event => {
|
|
24
28
|
const {
|
|
25
29
|
width,
|
|
@@ -27,30 +31,30 @@ export function useContentLayout() {
|
|
|
27
31
|
} = event.nativeEvent.layout;
|
|
28
32
|
if (width <= 0 || height <= 0) return;
|
|
29
33
|
const fraction = Math.min(height / screenHeight, 1);
|
|
30
|
-
|
|
31
|
-
runOnUI((nextWidth, nextHeight, nextFraction, isInitialScreen, spec) => {
|
|
34
|
+
runOnUI((nextWidth, nextHeight, nextFraction) => {
|
|
32
35
|
"worklet";
|
|
33
36
|
|
|
34
|
-
|
|
37
|
+
measuredContentLayoutValue.value = {
|
|
35
38
|
width: nextWidth,
|
|
36
39
|
height: nextHeight
|
|
37
40
|
};
|
|
38
|
-
const isFirstMeasurement =
|
|
39
|
-
|
|
41
|
+
const isFirstMeasurement = resolvedAutoSnapPointValue.value <= 0;
|
|
42
|
+
resolvedAutoSnapPointValue.value = nextFraction;
|
|
40
43
|
if (!isFirstMeasurement || animations.progress.value !== 0 || animations.animating.value !== 0) {
|
|
41
44
|
return;
|
|
42
45
|
}
|
|
43
|
-
if (
|
|
44
|
-
|
|
46
|
+
if (isFirstKey && !experimental_animateOnInitialMount) {
|
|
47
|
+
targetProgressValue.value = nextFraction;
|
|
45
48
|
animations.progress.value = nextFraction;
|
|
46
49
|
return;
|
|
47
50
|
}
|
|
48
51
|
animateToProgress({
|
|
49
52
|
target: nextFraction,
|
|
50
|
-
spec,
|
|
51
|
-
animations
|
|
53
|
+
spec: transitionSpec,
|
|
54
|
+
animations,
|
|
55
|
+
targetProgress: targetProgressValue
|
|
52
56
|
});
|
|
53
|
-
})(width, height, fraction
|
|
54
|
-
}, [animations,
|
|
57
|
+
})(width, height, fraction);
|
|
58
|
+
}, [animations, targetProgressValue, resolvedAutoSnapPointValue, measuredContentLayoutValue, isFirstKey, screenHeight, experimental_animateOnInitialMount, transitionSpec]);
|
|
55
59
|
}
|
|
56
60
|
//# sourceMappingURL=use-content-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useWindowDimensions","runOnUI","useDescriptorDerivations","useDescriptors","AnimationStore","animateToProgress","useContentLayout","current","isFirstKey","height","screenHeight","routeKey","route","key","animations","
|
|
1
|
+
{"version":3,"names":["useCallback","useWindowDimensions","runOnUI","useDescriptorDerivations","useDescriptors","AnimationStore","SystemStore","animateToProgress","useContentLayout","current","isFirstKey","height","screenHeight","routeKey","route","key","animations","getBag","targetProgressValue","getValue","resolvedAutoSnapPointValue","measuredContentLayoutValue","experimental_animateOnInitialMount","options","transitionSpec","event","width","nativeEvent","layout","fraction","Math","min","nextWidth","nextHeight","nextFraction","value","isFirstMeasurement","progress","animating","target","spec","targetProgress"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/hooks/use-content-layout.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAAiCC,mBAAmB,QAAQ,cAAc;AAC1E,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SACCC,wBAAwB,EACxBC,cAAc,QACR,uCAAuC;AAC9C,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,iBAAiB,QAAQ,8CAA8C;AAEhF,OAAO,SAASC,gBAAgBA,CAAA,EAAG;EAClC,MAAM;IAAEC;EAAQ,CAAC,GAAGL,cAAc,CAAC,CAAC;EACpC,MAAM;IAAEM;EAAW,CAAC,GAAGP,wBAAwB,CAAC,CAAC;EACjD,MAAM;IAAE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C/B;QACD;MACD;MAEA,IAAIzB,UAAU,IAAI,CAACY,kCAAkC,EAAE;QACtDJ,mBAAmB,CAACiB,KAAK,GAAGD,YAAY;QACxClB,UAAU,CAACqB,QAAQ,CAACF,KAAK,GAAGD,YAAY;QACxC;MACD;MAEA3B,iBAAiB,CAAC;QACjBgC,MAAM,EAAEL,YAAY;QACpBM,IAAI,EAAEhB,cAAc;QACpBR,UAAU;QACVyB,cAAc,EAAEvB;MACjB,CAAC,CAAC;IACH,CAAC,CAAC,CAACQ,KAAK,EAAEf,MAAM,EAAEkB,QAAQ,CAAC;EAC5B,CAAC,EACD,CACCb,UAAU,EACVE,mBAAmB,EACnBE,0BAA0B,EAC1BC,0BAA0B,EAC1BX,UAAU,EACVE,YAAY,EACZU,kCAAkC,EAClCE,cAAc,CAEhB,CAAC;AACF","ignoreList":[]}
|
|
@@ -10,6 +10,7 @@ import { useDescriptors } from "../../../providers/screen/descriptors";
|
|
|
10
10
|
import { useScreenStyles } from "../../../providers/screen/styles.provider";
|
|
11
11
|
import { AnimationStore } from "../../../stores/animation.store";
|
|
12
12
|
import { GestureStore } from "../../../stores/gesture.store";
|
|
13
|
+
import { SystemStore } from "../../../stores/system.store";
|
|
13
14
|
import { animateToProgress } from "../../../utils/animation/animate-to-progress";
|
|
14
15
|
import { findCollapseTarget } from "../../../utils/gesture/find-collapse-target";
|
|
15
16
|
import { useBackdropPointerEvents } from "../hooks/use-backdrop-pointer-events";
|
|
@@ -30,8 +31,9 @@ export const BackdropLayer = /*#__PURE__*/memo(function BackdropLayer() {
|
|
|
30
31
|
} = useBackdropPointerEvents();
|
|
31
32
|
const BackdropComponent = current.options.backdropComponent;
|
|
32
33
|
const routeKey = current.route.key;
|
|
33
|
-
const animations = AnimationStore.
|
|
34
|
-
const
|
|
34
|
+
const animations = AnimationStore.getBag(routeKey);
|
|
35
|
+
const targetProgressValue = SystemStore.getValue(routeKey, "targetProgress");
|
|
36
|
+
const resolvedAutoSnapPointValue = SystemStore.getValue(routeKey, "resolvedAutoSnapPoint");
|
|
35
37
|
const AnimatedBackdropComponent = useMemo(() => BackdropComponent ? Animated.createAnimatedComponent(BackdropComponent) : null, [BackdropComponent]);
|
|
36
38
|
const handleBackdropPress = useCallback(() => {
|
|
37
39
|
if (backdropBehavior === "dismiss") {
|
|
@@ -47,12 +49,12 @@ export const BackdropLayer = /*#__PURE__*/memo(function BackdropLayer() {
|
|
|
47
49
|
dismissScreen();
|
|
48
50
|
return;
|
|
49
51
|
}
|
|
50
|
-
const gestures = GestureStore.
|
|
52
|
+
const gestures = GestureStore.getBag(routeKey);
|
|
51
53
|
const transitionSpec = current.options.transitionSpec;
|
|
52
54
|
runOnUI(() => {
|
|
53
55
|
"worklet";
|
|
54
56
|
|
|
55
|
-
const resolvedSnaps = rawSnapPoints.map(point => point === "auto" ?
|
|
57
|
+
const resolvedSnaps = rawSnapPoints.map(point => point === "auto" ? resolvedAutoSnapPointValue.value : point).filter(point => typeof point === "number");
|
|
56
58
|
const {
|
|
57
59
|
target,
|
|
58
60
|
shouldDismiss
|
|
@@ -69,11 +71,12 @@ export const BackdropLayer = /*#__PURE__*/memo(function BackdropLayer() {
|
|
|
69
71
|
target,
|
|
70
72
|
spec,
|
|
71
73
|
animations,
|
|
74
|
+
targetProgress: targetProgressValue,
|
|
72
75
|
onAnimationFinish: shouldDismiss ? dismissScreen : undefined
|
|
73
76
|
});
|
|
74
77
|
})();
|
|
75
78
|
}
|
|
76
|
-
}, [animations,
|
|
79
|
+
}, [animations, targetProgressValue, resolvedAutoSnapPointValue, backdropBehavior, current, dismissScreen, routeKey]);
|
|
77
80
|
const animatedBackdropStyle = useAnimatedStyle(() => {
|
|
78
81
|
"worklet";
|
|
79
82
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","useCallback","useMemo","Pressable","StyleSheet","Animated","runOnUI","useAnimatedProps","useAnimatedStyle","DefaultSnapSpec","NO_PROPS","NO_STYLES","useNavigationHelpers","useDescriptors","useScreenStyles","AnimationStore","GestureStore","animateToProgress","findCollapseTarget","useBackdropPointerEvents","jsx","_jsx","jsxs","_jsxs","BackdropLayer","stylesMap","current","dismissScreen","isBackdropActive","backdropBehavior","BackdropComponent","options","backdropComponent","routeKey","route","key","animations","
|
|
1
|
+
{"version":3,"names":["memo","useCallback","useMemo","Pressable","StyleSheet","Animated","runOnUI","useAnimatedProps","useAnimatedStyle","DefaultSnapSpec","NO_PROPS","NO_STYLES","useNavigationHelpers","useDescriptors","useScreenStyles","AnimationStore","GestureStore","SystemStore","animateToProgress","findCollapseTarget","useBackdropPointerEvents","jsx","_jsx","jsxs","_jsxs","BackdropLayer","stylesMap","current","dismissScreen","isBackdropActive","backdropBehavior","BackdropComponent","options","backdropComponent","routeKey","route","key","animations","getBag","targetProgressValue","getValue","resolvedAutoSnapPointValue","AnimatedBackdropComponent","createAnimatedComponent","handleBackdropPress","rawSnapPoints","snapPoints","canDismiss","gestureEnabled","length","gestures","transitionSpec","resolvedSnaps","map","point","value","filter","target","shouldDismiss","progress","dismissing","spec","open","expand","close","collapse","targetProgress","onAnimationFinish","undefined","animatedBackdropStyle","backdrop","style","animatedBackdropProps","props","absoluteFillObject","pointerEvents","onPress","children","animatedProps","View"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/layers/backdrop.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAClD,SAASC,SAAS,EAAEC,UAAU,QAAQ,cAAc;AACpD,OAAOC,QAAQ,IACdC,OAAO,EACPC,gBAAgB,EAChBC,gBAAgB,QACV,yBAAyB;AAChC,SAASC,eAAe,QAAQ,wBAAwB;AACxD,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACxD,SAASC,oBAAoB,QAAQ,kDAAkD;AACvF,SAASC,cAAc,QAAQ,uCAAuC;AACtE,SAASC,eAAe,QAAQ,2CAA2C;AAC3E,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,YAAY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AAC,EAAE,CACF/B,UAAU,EACVE,mBAAmB,EACnBE,0BAA0B,EAC1BX,gBAAgB,EAChBH,OAAO,EACPC,aAAa,EACbM,QAAQ,CACR,CAAC;EAEF,MAAMmC,qBAAqB,GAAG7D,gBAAgB,CAAC,MAAM;IACpD,SAAS;;IACT,OAAOkB,SAAS,CAAC6B,KAAK,CAACe,QAAQ,EAAEC,KAAK,IAAI5D,SAAS;EACpD,CAAC,CAAC;EAEF,MAAM6D,qBAAqB,GAAGjE,gBAAgB,CAAC,MAAM;IACpD,SAAS;;IACT,OAAOmB,SAAS,CAAC6B,KAAK,CAACe,QAAQ,EAAEG,KAAK,IAAI/D,QAAQ;EACnD,CAAC,CAAC;EAEF,oBACCc,KAAA,CAACrB,SAAS;IACToE,KAAK,EAAEnE,UAAU,CAACsE,kBAAmB;IACrCC,aAAa,EAAE9C,gBAAgB,GAAG,MAAM,GAAG,MAAO;IAClD+C,OAAO,EAAE/C,gBAAgB,GAAGe,mBAAmB,GAAGwB,SAAU;IAAAS,QAAA,GAK3DnC,yBAAyB,iBACzBpB,IAAA,CAACoB,yBAAyB;MACzB6B,KAAK,EAAE,CAACnE,UAAU,CAACsE,kBAAkB,CAAE;MACvCI,aAAa,EAAEN;IAAsB,CACrC,CACD,eACDlD,IAAA,CAACjB,QAAQ,CAAC0E,IAAI;MACbR,KAAK,EAAE,CAACnE,UAAU,CAACsE,kBAAkB,EAAEL,qBAAqB;IAAE,CAC9D,CAAC;EAAA,CACQ,CAAC;AAEd,CAAC,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ import { memo } from "react";
|
|
|
5
5
|
import { StyleSheet, View } from "react-native";
|
|
6
6
|
import { GestureDetector } from "react-native-gesture-handler";
|
|
7
7
|
import Animated, { useAnimatedProps, useAnimatedStyle } from "react-native-reanimated";
|
|
8
|
-
import {
|
|
8
|
+
import { NO_PROPS, NO_STYLES } from "../../../constants";
|
|
9
9
|
import { useGestureContext } from "../../../providers/gestures";
|
|
10
10
|
import { useDescriptors } from "../../../providers/screen/descriptors";
|
|
11
11
|
import { useScreenStyles } from "../../../providers/screen/styles.provider";
|
|
@@ -38,51 +38,35 @@ export const ContentLayer = /*#__PURE__*/memo(({
|
|
|
38
38
|
|
|
39
39
|
return stylesMap.value.content?.style || NO_STYLES;
|
|
40
40
|
});
|
|
41
|
-
const animatedNavigationContainerStyle = useAnimatedStyle(() => {
|
|
42
|
-
"worklet";
|
|
43
|
-
|
|
44
|
-
return stylesMap.value[NAVIGATION_MASK_CONTAINER_STYLE_ID]?.style || NO_STYLES;
|
|
45
|
-
});
|
|
46
41
|
const animatedContentProps = useAnimatedProps(() => {
|
|
47
42
|
"worklet";
|
|
48
43
|
|
|
49
44
|
return stylesMap.value.content?.props ?? NO_PROPS;
|
|
50
45
|
});
|
|
51
|
-
const surfaceChildren = /*#__PURE__*/_jsx(SurfaceContainer, {
|
|
52
|
-
pointerEvents: contentPointerEvents,
|
|
53
|
-
children: hasAutoSnapPoint ? /*#__PURE__*/_jsx(View, {
|
|
54
|
-
collapsable: false,
|
|
55
|
-
onLayout: handleContentLayout,
|
|
56
|
-
children: children
|
|
57
|
-
}) : children
|
|
58
|
-
});
|
|
59
|
-
const navigationContainer = /*#__PURE__*/_jsx(Animated.View, {
|
|
60
|
-
style: [styles.navigationContainer, animatedNavigationContainerStyle],
|
|
61
|
-
pointerEvents: contentPointerEvents,
|
|
62
|
-
collapsable: false,
|
|
63
|
-
children: surfaceChildren
|
|
64
|
-
});
|
|
65
|
-
const navigationScopedChildren = isNavigationMaskEnabled ? /*#__PURE__*/_jsx(MaybeMaskedNavigationContainer, {
|
|
66
|
-
pointerEvents: contentPointerEvents,
|
|
67
|
-
enabled: isNavigationMaskEnabled,
|
|
68
|
-
children: navigationContainer
|
|
69
|
-
}) : navigationContainer;
|
|
70
46
|
return /*#__PURE__*/_jsx(GestureDetector, {
|
|
71
47
|
gesture: gestureContext.panGesture,
|
|
72
48
|
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
73
49
|
style: [styles.content, animatedContentStyle],
|
|
74
50
|
animatedProps: animatedContentProps,
|
|
75
51
|
pointerEvents: contentPointerEvents,
|
|
76
|
-
children:
|
|
52
|
+
children: /*#__PURE__*/_jsx(MaybeMaskedNavigationContainer, {
|
|
53
|
+
pointerEvents: contentPointerEvents,
|
|
54
|
+
enabled: isNavigationMaskEnabled,
|
|
55
|
+
children: /*#__PURE__*/_jsx(SurfaceContainer, {
|
|
56
|
+
pointerEvents: contentPointerEvents,
|
|
57
|
+
children: hasAutoSnapPoint ? /*#__PURE__*/_jsx(View, {
|
|
58
|
+
collapsable: false,
|
|
59
|
+
onLayout: handleContentLayout,
|
|
60
|
+
children: children
|
|
61
|
+
}) : children
|
|
62
|
+
})
|
|
63
|
+
})
|
|
77
64
|
})
|
|
78
65
|
});
|
|
79
66
|
});
|
|
80
67
|
const styles = StyleSheet.create({
|
|
81
68
|
content: {
|
|
82
69
|
flex: 1
|
|
83
|
-
},
|
|
84
|
-
navigationContainer: {
|
|
85
|
-
flex: 1
|
|
86
70
|
}
|
|
87
71
|
});
|
|
88
72
|
//# sourceMappingURL=content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","StyleSheet","View","GestureDetector","Animated","useAnimatedProps","useAnimatedStyle","
|
|
1
|
+
{"version":3,"names":["memo","StyleSheet","View","GestureDetector","Animated","useAnimatedProps","useAnimatedStyle","NO_PROPS","NO_STYLES","useGestureContext","useDescriptors","useScreenStyles","resolveNavigationMaskEnabled","useBackdropPointerEvents","useContentLayout","MaybeMaskedNavigationContainer","SurfaceContainer","jsx","_jsx","ContentLayer","children","stylesMap","current","pointerEvents","isBackdropActive","gestureContext","isNavigationMaskEnabled","options","contentPointerEvents","hasAutoSnapPoint","snapPoints","includes","handleContentLayout","animatedContentStyle","value","content","style","animatedContentProps","props","gesture","panGesture","styles","animatedProps","enabled","collapsable","onLayout","create","flex"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/layers/content.ts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D,SAAS;;IACT,OAAOe,SAAS,CAACa,KAAK,CAACC,OAAO,EAAEC,KAAK,IAAI5B,SAAS;EACnD,CAAC,CAAC;EAEF,MAAM6B,oBAAoB,GAAGhC,gBAAgB,CAAC,MAAM;IACnD,SAAS;;IACT,OAAOgB,SAAS,CAACa,KAAK,CAACC,OAAO,EAAEG,KAAK,IAAI/B,QAAQ;EAClD,CAAC,CAAC;EAEF,oBACCW,IAAA,CAACf,eAAe;IAACoC,OAAO,EAAEd,cAAc,CAAEe,UAAW;IAAApB,QAAA,eACpDF,IAAA,CAACd,QAAQ,CAACF,IAAI;MACbkC,KAAK,EAAE,CAACK,MAAM,CAACN,OAAO,EAAEF,oBAAoB,CAAE;MAC9CS,aAAa,EAAEL,oBAAqB;MACpCd,aAAa,EAAEK,oBAAqB;MAAAR,QAAA,eAEpCF,IAAA,CAACH,8BAA8B;QAC9BQ,aAAa,EAAEK,oBAAqB;QACpCe,OAAO,EAAEjB,uBAAwB;QAAAN,QAAA,eAEjCF,IAAA,CAACF,gBAAgB;UAACO,aAAa,EAAEK,oBAAqB;UAAAR,QAAA,EACpDS,gBAAgB,gBAChBX,IAAA,CAAChB,IAAI;YAAC0C,WAAW,EAAE,KAAM;YAACC,QAAQ,EAAEb,mBAAoB;YAAAZ,QAAA,EACtDA;UAAQ,CACJ,CAAC,GAEPA;QACA,CACgB;MAAC,CACY;IAAC,CACnB;EAAC,CACA,CAAC;AAEpB,CAAC,CAAC;AAEF,MAAMqB,MAAM,GAAGxC,UAAU,CAAC6C,MAAM,CAAC;EAChCX,OAAO,EAAE;IACRY,IAAI,EAAE;EACP;AACD,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { memo,
|
|
3
|
+
import { memo, useCallback } from "react";
|
|
4
4
|
import { StyleSheet, View } from "react-native";
|
|
5
5
|
import Animated, { useAnimatedStyle } from "react-native-reanimated";
|
|
6
|
-
import { NAVIGATION_MASK_ELEMENT_STYLE_ID, NO_STYLES } from "../../../constants";
|
|
6
|
+
import { NAVIGATION_MASK_CONTAINER_STYLE_ID, NAVIGATION_MASK_ELEMENT_STYLE_ID, NO_STYLES } from "../../../constants";
|
|
7
7
|
import { useScreenStyles } from "../../../providers/screen/styles.provider";
|
|
8
8
|
import { logger } from "../../../utils/logger";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -27,15 +27,19 @@ export const MaybeMaskedNavigationContainer = /*#__PURE__*/memo(({
|
|
|
27
27
|
|
|
28
28
|
return stylesMap.value[NAVIGATION_MASK_ELEMENT_STYLE_ID]?.style || NO_STYLES;
|
|
29
29
|
});
|
|
30
|
-
|
|
30
|
+
const animatedNavigationMaskContainerStyle = useAnimatedStyle(() => {
|
|
31
|
+
"worklet";
|
|
32
|
+
|
|
33
|
+
return stylesMap.value[NAVIGATION_MASK_CONTAINER_STYLE_ID]?.style || NO_STYLES;
|
|
34
|
+
});
|
|
35
|
+
const maybeLogWarning = useCallback(() => {
|
|
31
36
|
if (!enabled) return;
|
|
32
37
|
if (LazyMaskedView !== View) return;
|
|
33
38
|
if (hasWarnedMissingMaskedView) return;
|
|
34
39
|
hasWarnedMissingMaskedView = true;
|
|
35
40
|
logger.warn("navigationMaskEnabled requires @react-native-masked-view/masked-view. Install it to enable navigation bounds masking.");
|
|
36
41
|
}, [enabled]);
|
|
37
|
-
if (!enabled)
|
|
38
|
-
if (LazyMaskedView === View) {
|
|
42
|
+
if (!enabled || LazyMaskedView === View) {
|
|
39
43
|
return children;
|
|
40
44
|
}
|
|
41
45
|
return /*#__PURE__*/_jsx(LazyMaskedView, {
|
|
@@ -47,13 +51,22 @@ export const MaybeMaskedNavigationContainer = /*#__PURE__*/memo(({
|
|
|
47
51
|
pointerEvents: "none"
|
|
48
52
|
}),
|
|
49
53
|
pointerEvents: pointerEvents,
|
|
50
|
-
|
|
54
|
+
onLayout: maybeLogWarning,
|
|
55
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
56
|
+
style: [styles.navigationContainer, animatedNavigationMaskContainerStyle],
|
|
57
|
+
pointerEvents: pointerEvents,
|
|
58
|
+
collapsable: false,
|
|
59
|
+
children: children
|
|
60
|
+
})
|
|
51
61
|
});
|
|
52
62
|
});
|
|
53
63
|
const styles = StyleSheet.create({
|
|
54
64
|
navigationMaskedRoot: {
|
|
55
65
|
flex: 1
|
|
56
66
|
},
|
|
67
|
+
navigationContainer: {
|
|
68
|
+
flex: 1
|
|
69
|
+
},
|
|
57
70
|
navigationMaskElement: {
|
|
58
71
|
backgroundColor: "white"
|
|
59
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","
|
|
1
|
+
{"version":3,"names":["memo","useCallback","StyleSheet","View","Animated","useAnimatedStyle","NAVIGATION_MASK_CONTAINER_STYLE_ID","NAVIGATION_MASK_ELEMENT_STYLE_ID","NO_STYLES","useScreenStyles","logger","jsx","_jsx","LazyMaskedView","require","default","_","hasWarnedMissingMaskedView","MaybeMaskedNavigationContainer","enabled","children","pointerEvents","stylesMap","animatedNavigationMaskStyle","value","style","animatedNavigationMaskContainerStyle","maybeLogWarning","warn","styles","navigationMaskedRoot","maskElement","navigationMaskElement","onLayout","navigationContainer","collapsable","create","flex","backgroundColor"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/layers/maybe-masked-navigation-container.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,WAAW,QAAQ,OAAO;AACzC,SAASC,UAAU,EAAEC,IAAI,QAAwB,cAAc;AAC/D,OAAOC,QAAQ,IAAIC,gBAAgB,QAAQ,yBAAyB;AACpE,SACCC,kCAAkC,EAClCC,gCAAgC,EAChCC,SAAS,QACH,oBAAoB;AAC3B,SAASC,eAAe,QAAQ,2CAA2C;AAC3E,SAASC,MAAM,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,I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aAAa,EAAC;IAAM,CACpB,CACD;IACDA,aAAa,EAAEA,aAAc;IAC7BY,QAAQ,EAAEN,eAAgB;IAAAP,QAAA,eAE1BR,IAAA,CAACR,QAAQ,CAACD,IAAI;MACbsB,KAAK,EAAE,CACNI,MAAM,CAACK,mBAAmB,EAC1BR,oCAAoC,CACnC;MACFL,aAAa,EAAEA,aAAc;MAC7Bc,WAAW,EAAE,KAAM;MAAAf,QAAA,EAElBA;IAAQ,CACK;EAAC,CACD,CAAC;AAEnB,CACD,CAAC;AAED,MAAMS,MAAM,GAAG3B,UAAU,CAACkC,MAAM,CAAC;EAChCN,oBAAoB,EAAE;IACrBO,IAAI,EAAE;EACP,CAAC;EACDH,mBAAmB,EAAE;IACpBG,IAAI,EAAE;EACP,CAAC;EACDL,qBAAqB,EAAE;IACtBM,eAAe,EAAE;EAClB;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -4,9 +4,11 @@ import { runOnUI } from "react-native-reanimated";
|
|
|
4
4
|
import { AnimationStore } from "../../../../../stores/animation.store";
|
|
5
5
|
import { BoundStore } from "../../../../../stores/bounds";
|
|
6
6
|
import { GestureStore } from "../../../../../stores/gesture.store";
|
|
7
|
+
import { SystemStore } from "../../../../../stores/system.store";
|
|
7
8
|
export const resetStoresForScreen = (routeKey, isBranchScreen, branchNavigatorKey) => {
|
|
8
|
-
AnimationStore.
|
|
9
|
-
GestureStore.
|
|
9
|
+
AnimationStore.clearBag(routeKey);
|
|
10
|
+
GestureStore.clearBag(routeKey);
|
|
11
|
+
SystemStore.clearBag(routeKey);
|
|
10
12
|
runOnUI(() => {
|
|
11
13
|
"worklet";
|
|
12
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["runOnUI","AnimationStore","BoundStore","GestureStore","resetStoresForScreen","routeKey","isBranchScreen","branchNavigatorKey","clear","clearByBranch","clearByAncestor"],"sourceRoot":"../../../../../../../../src","sources":["shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,yBAAyB;AACjD,SAASC,cAAc,QAAQ,uCAAuC;AACtE,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,YAAY,QAAQ,qCAAqC;
|
|
1
|
+
{"version":3,"names":["runOnUI","AnimationStore","BoundStore","GestureStore","SystemStore","resetStoresForScreen","routeKey","isBranchScreen","branchNavigatorKey","clearBag","clear","clearByBranch","clearByAncestor"],"sourceRoot":"../../../../../../../../src","sources":["shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,yBAAyB;AACjD,SAASC,cAAc,QAAQ,uCAAuC;AACtE,SAASC,UAAU,QAAQ,8BAA8B;AACzD,SAASC,YAAY,QAAQ,qCAAqC;AAClE,SAASC,WAAW,QAAQ,oCAAoC;AAEhE,OAAO,MAAMC,oBAAoB,GAAGA,CACnCC,QAAgB,EAChBC,cAAuB,EACvBC,kBAA2B,KACvB;EACJP,cAAc,CAACQ,QAAQ,CAACH,QAAQ,CAAC;EACjCH,YAAY,CAACM,QAAQ,CAACH,QAAQ,CAAC;EAC/BF,WAAW,CAACK,QAAQ,CAACH,QAAQ,CAAC;EAE9BN,OAAO,CAAC,MAAM;IACb,SAAS;;IACT,IAAI,CAACO,cAAc,EAAE;IAErBL,UAAU,CAACQ,KAAK,CAACJ,QAAQ,CAAC;IAE1B,IAAIE,kBAAkB,EAAE;MACvBN,UAAU,CAACS,aAAa,CAACH,kBAAkB,CAAC;MAC5C;IACD;IAEAN,UAAU,CAACU,eAAe,CAACN,QAAQ,CAAC;EACrC,CAAC,CAAC,CAAC,CAAC;AACL,CAAC","ignoreList":[]}
|
|
@@ -20,6 +20,7 @@ import { useNavigatorHistoryRegistry } from "./helpers/use-navigator-history-reg
|
|
|
20
20
|
const useManagedClose = ({
|
|
21
21
|
current,
|
|
22
22
|
animations,
|
|
23
|
+
targetProgress,
|
|
23
24
|
activate,
|
|
24
25
|
deactivate,
|
|
25
26
|
resetStores
|
|
@@ -50,6 +51,7 @@ const useManagedClose = ({
|
|
|
50
51
|
target: "close",
|
|
51
52
|
spec: transitionSpec,
|
|
52
53
|
animations,
|
|
54
|
+
targetProgress,
|
|
53
55
|
onAnimationFinish: handleCloseEnd
|
|
54
56
|
});
|
|
55
57
|
});
|
|
@@ -61,6 +63,7 @@ const useManagedClose = ({
|
|
|
61
63
|
const useNativeStackClose = ({
|
|
62
64
|
current,
|
|
63
65
|
animations,
|
|
66
|
+
targetProgress,
|
|
64
67
|
activate,
|
|
65
68
|
deactivate,
|
|
66
69
|
resetStores
|
|
@@ -92,6 +95,7 @@ const useNativeStackClose = ({
|
|
|
92
95
|
target: "close",
|
|
93
96
|
spec: current.options.transitionSpec,
|
|
94
97
|
animations,
|
|
98
|
+
targetProgress,
|
|
95
99
|
onAnimationFinish: finished => {
|
|
96
100
|
deactivate();
|
|
97
101
|
if (finished) {
|
|
@@ -113,7 +117,7 @@ const useNativeStackClose = ({
|
|
|
113
117
|
/**
|
|
114
118
|
* Unified close handler that branches on stack type.
|
|
115
119
|
*/
|
|
116
|
-
export function useCloseTransition(current, animations, activate, deactivate) {
|
|
120
|
+
export function useCloseTransition(current, animations, targetProgress, activate, deactivate) {
|
|
117
121
|
const routeKey = current.route.key;
|
|
118
122
|
const {
|
|
119
123
|
navigatorKey
|
|
@@ -132,6 +136,7 @@ export function useCloseTransition(current, animations, activate, deactivate) {
|
|
|
132
136
|
const closeParams = {
|
|
133
137
|
current,
|
|
134
138
|
animations,
|
|
139
|
+
targetProgress,
|
|
135
140
|
activate,
|
|
136
141
|
deactivate,
|
|
137
142
|
resetStores
|
package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useLayoutEffect","runOnJS","useAnimatedReaction","useDerivedValue","useStack","useSharedValueState","useStableCallback","useGestureContext","useDescriptorDerivations","useStackCoreContext","useManagedStackContext","StackType","animateToProgress","resetStoresForScreen","useNavigatorHistoryRegistry","useManagedClose","current","animations","activate","deactivate","resetStores","handleCloseRoute","closingRouteKeysShared","routeKey","route","key","handleCloseEnd","finished","requestAnimationFrame","transitionSpec","options","keys","value","includes","isClosing","wasClosing","target","spec","onAnimationFinish","useNativeStackClose","gestureCtx","isAncestorDismissingViaGesture","ancestorContext","gestureAnimationValues","dismissing","handleBeforeRemove","e","isEnabled","enableTransitions","navigation","state","getState","routeIndex","routes","findIndex","isFirstScreen","closing","set","preventDefault","dispatch","data","action","addListener","useCloseTransition","navigatorKey","flags","isBranchScreen","branchNavigatorKey","isNativeStack","STACK_TYPE","NATIVE","closeParams"],"sourceRoot":"../../../../../../../src","sources":["shared/components/screen-lifecycle/hooks/use-close-transition/index.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AACvC,SACCC,OAAO,
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","runOnJS","useAnimatedReaction","useDerivedValue","useStack","useSharedValueState","useStableCallback","useGestureContext","useDescriptorDerivations","useStackCoreContext","useManagedStackContext","StackType","animateToProgress","resetStoresForScreen","useNavigatorHistoryRegistry","useManagedClose","current","animations","targetProgress","activate","deactivate","resetStores","handleCloseRoute","closingRouteKeysShared","routeKey","route","key","handleCloseEnd","finished","requestAnimationFrame","transitionSpec","options","keys","value","includes","isClosing","wasClosing","target","spec","onAnimationFinish","useNativeStackClose","gestureCtx","isAncestorDismissingViaGesture","ancestorContext","gestureAnimationValues","dismissing","handleBeforeRemove","e","isEnabled","enableTransitions","navigation","state","getState","routeIndex","routes","findIndex","isFirstScreen","closing","set","preventDefault","dispatch","data","action","addListener","useCloseTransition","navigatorKey","flags","isBranchScreen","branchNavigatorKey","isNativeStack","STACK_TYPE","NATIVE","closeParams"],"sourceRoot":"../../../../../../../src","sources":["shared/components/screen-lifecycle/hooks/use-close-transition/index.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AACvC,SACCC,OAA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