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
|
@@ -16,7 +16,7 @@ const ComponentScreen = ({
|
|
|
16
16
|
routeKey,
|
|
17
17
|
children
|
|
18
18
|
}) => {
|
|
19
|
-
const sceneClosing = _animation.AnimationStore.
|
|
19
|
+
const sceneClosing = _animation.AnimationStore.getValue(routeKey, "closing");
|
|
20
20
|
const screenRef = (0, _reactNativeReanimated.useAnimatedRef)();
|
|
21
21
|
const animatedProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
|
|
22
22
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_interopRequireWildcard","_layoutAnchor","_animation","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","POINT_NONE","POINT_BOX_NONE","ComponentScreen","routeKey","children","sceneClosing","AnimationStore","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_interopRequireWildcard","_layoutAnchor","_animation","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","POINT_NONE","POINT_BOX_NONE","ComponentScreen","routeKey","children","sceneClosing","AnimationStore","getValue","screenRef","useAnimatedRef","animatedProps","useAnimatedProps","pointerEvents","ComponentScreenComponent","Animated","View","jsx","ref","style","StyleSheet","absoluteFill","LayoutAnchorProvider","anchorRef","exports"],"sourceRoot":"../../../../src","sources":["component-stack/components/component-screen.tsx"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAIA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAAqE,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAE,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAA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BAAwB;IACxBI,GAAG,EAAET,SAAU;IACfU,KAAK,EAAEC,uBAAU,CAACC,YAAa;IAC/BV,aAAa,EAAEA,aAAc;IAAAN,QAAA,eAE7B,IAAAxB,WAAA,CAAAoC,GAAA,EAACtC,aAAA,CAAA2C,oBAAoB;MAACC,SAAS,EAAEd,SAAU;MAAAJ,QAAA,EACzCA;IAAQ,CACY;EAAC,CACE,CAAC;AAE7B,CAAC;AAACmB,OAAA,CAAArB,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -8,6 +8,7 @@ exports.snapTo = snapTo;
|
|
|
8
8
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
9
|
var _specs = require("../configs/specs");
|
|
10
10
|
var _animation = require("../stores/animation.store");
|
|
11
|
+
var _system = require("../stores/system.store");
|
|
11
12
|
var _animateToProgress = require("../utils/animation/animate-to-progress");
|
|
12
13
|
var _logger = require("../utils/logger");
|
|
13
14
|
var _resolveSnapTarget = require("./resolve-snap-target");
|
|
@@ -15,8 +16,8 @@ const getSortedSnapPoints = descriptor => {
|
|
|
15
16
|
const snapPoints = descriptor.options?.snapPoints;
|
|
16
17
|
if (!snapPoints || snapPoints.length === 0) return null;
|
|
17
18
|
|
|
18
|
-
// Resolve 'auto' to the measured fraction stored in
|
|
19
|
-
const autoVal =
|
|
19
|
+
// Resolve 'auto' to the measured fraction stored in SystemStore
|
|
20
|
+
const autoVal = _system.SystemStore.getValue(descriptor.route.key, "resolvedAutoSnapPoint").value;
|
|
20
21
|
const resolved = snapPoints.map(p => p === "auto" ? autoVal : p).filter(p => typeof p === "number" && p > 0);
|
|
21
22
|
return resolved.length > 0 ? resolved.sort((a, b) => a - b) : null;
|
|
22
23
|
};
|
|
@@ -31,13 +32,15 @@ function snapDescriptorToIndex(descriptor, index) {
|
|
|
31
32
|
return false;
|
|
32
33
|
}
|
|
33
34
|
const targetProgress = sorted[index];
|
|
34
|
-
const animations = _animation.AnimationStore.
|
|
35
|
+
const animations = _animation.AnimationStore.getBag(descriptor.route.key);
|
|
36
|
+
const targetProgressValue = _system.SystemStore.getValue(descriptor.route.key, "targetProgress");
|
|
35
37
|
(0, _reactNativeReanimated.runOnUI)(() => {
|
|
36
38
|
"worklet";
|
|
37
39
|
|
|
38
40
|
(0, _animateToProgress.animateToProgress)({
|
|
39
41
|
target: targetProgress,
|
|
40
42
|
animations,
|
|
43
|
+
targetProgress: targetProgressValue,
|
|
41
44
|
spec: {
|
|
42
45
|
open: descriptor.options.transitionSpec?.expand ?? _specs.DefaultSnapSpec,
|
|
43
46
|
close: descriptor.options.transitionSpec?.collapse ?? _specs.DefaultSnapSpec
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_specs","_animation","_animateToProgress","_logger","_resolveSnapTarget","getSortedSnapPoints","descriptor","snapPoints","options","length","autoVal","
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_specs","_animation","_system","_animateToProgress","_logger","_resolveSnapTarget","getSortedSnapPoints","descriptor","snapPoints","options","length","autoVal","SystemStore","getValue","route","key","value","resolved","map","p","filter","sort","a","b","snapDescriptorToIndex","index","sorted","logger","warn","targetProgress","animations","AnimationStore","getBag","targetProgressValue","runOnUI","animateToProgress","target","spec","open","transitionSpec","expand","DefaultSnapSpec","close","collapse","snapTo","screenWithSnapPoints","resolveSnapTargetEntry"],"sourceRoot":"../../../../src","sources":["shared/animation/snap-to.ts"],"mappings":";;;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AAEA,MAAMO,mBAAmB,GACxBC,UAAsC,IACjB;EACrB,MAAMC,UAAU,GAAGD,UAAU,CAACE,OAAO,EAAED,UAAU;EACjD,IAAI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8BAAO,EAAC,MAAM;IACb,SAAS;;IACT,IAAAC,oCAAiB,EAAC;MACjBC,MAAM,EAAEP,cAAc;MACtBC,UAAU;MACVD,cAAc,EAAEI,mBAAmB;MACnCI,IAAI,EAAE;QACLC,IAAI,EAAE/B,UAAU,CAACE,OAAO,CAAC8B,cAAc,EAAEC,MAAM,IAAIC,sBAAe;QAClEC,KAAK,EAAEnC,UAAU,CAACE,OAAO,CAAC8B,cAAc,EAAEI,QAAQ,IAAIF;MACvD;IACD,CAAC,CAAC;EACH,CAAC,CAAC,CAAC,CAAC;EAEJ,OAAO,IAAI;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,MAAMA,CAACnB,KAAa,EAAQ;EAC3C,MAAMoB,oBAAoB,GAAG,IAAAC,yCAAsB,EAAC,CAAC;EAErD,IAAI,CAACD,oBAAoB,EAAE;IAC1BlB,cAAM,CAACC,IAAI,CAAC,+CAA+C,CAAC;IAC5D;EACD;EAEAJ,qBAAqB,CAACqB,oBAAoB,CAACtC,UAAU,EAAEkB,KAAK,CAAC;AAC9D","ignoreList":[]}
|
package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js
CHANGED
|
@@ -53,7 +53,7 @@ const resolveMeasurementWritePlan = params => {
|
|
|
53
53
|
const completeDestination = intents.completeDestination && hasPendingLink;
|
|
54
54
|
const refreshSource = intents.refreshSource && hasSourceLink;
|
|
55
55
|
const refreshDestination = intents.refreshDestination && (hasDestinationLink || hasPendingLink);
|
|
56
|
-
const registerSnapshot = intents.snapshotOnly;
|
|
56
|
+
const registerSnapshot = intents.snapshotOnly || intents.refreshSource;
|
|
57
57
|
const writesAny = registerSnapshot || captureSource || completeDestination || refreshSource || refreshDestination;
|
|
58
58
|
return {
|
|
59
59
|
captureSource,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getMeasurementIntentFlags","intent","flags","captureSource","completeDestination","refreshSource","refreshDestination","snapshotOnly","intents","Array","isArray","i","length","exports","resolveMeasurementWritePlan","params","hasPendingLink","hasSourceLink","hasDestinationLink","registerSnapshot","writesAny","wantsDestinationWrite","resolveAutoSourceCaptureSignal","enabled","nextScreenKey","tagPresence","direct","count","screenKey","entry","ancestorKeys","includes","resolvePendingDestinationCaptureSignal","resolvedSourceKey","hasPendingLinkFromSource","resolvePendingDestinationRetrySignal","retryCount","maxRetries","isAnimating","progress","retryProgressMax","retryProgressBuckets","Math","floor","resolveInitialLayoutMeasurementIntent","hasSharedBoundTag","hasMeasuredOnLayout","isAnyAnimating","resolveGroupActiveMeasurementAction","isEligible","memberId","activeId","previousActiveId","canFlushGroupActiveMeasurement","shouldTriggerScrollSettledRefresh","group","hasNextScreen","hasSettledSignal","signal","previousSignal"],"sourceRoot":"../../../../../../../src","sources":["shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts"],"mappings":";;;;;;AA8BO,MAAMA,yBAAyB,GACrCC,MAAyD,IAC7B;EAC5B,SAAS;;EACT,MAAMC,KAA6B,GAAG;IACrCC,aAAa,EAAE,KAAK;IACpBC,mBAAmB,EAAE,KAAK;IAC1BC,aAAa,EAAE,KAAK;IACpBC,kBAAkB,EAAE,KAAK;IACzBC,YAAY,EAAE;EACf,CAAC;EAED,IAAI,CAACN,MAAM,EAAE;IACZ,OAAOC,KAAK;EACb;EAEA,MAAMM,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACT,MAAM,CAAC,GAAGA,MAAM,GAAG,CAACA,MAAM,CAAC;EAEzD,KAAK,IAAIU,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,OAAO,CAACI,MAAM,EAAED,CAAC,EAAE,EAAE;IACxC,QAAQH,OAAO,CAACG,CAAC,CAAC;MACjB,KAAK,gBAAgB;QACpBT,KAAK,CAACC,aAAa,GAAG,IAAI;QAC1B;MACD,KAAK,sBAAsB;QAC1BD,KAAK,CAACE,mBAAmB,GAAG,IAAI;QAChC;MACD,KAAK,gBAAgB;QACpBF,KAAK,CAACG,aAAa,GAAG,IAAI;QAC1B;MACD,KAAK,qBAAqB;QACzBH,KAAK,CAACI,kBAAkB,GAAG,IAAI;QAC/B;MACD,KAAK,eAAe;QACnBJ,KAAK,CAACK,YAAY,GAAG,IAAI;QACzB;IACF;EACD;EAEA,OAAOL,KAAK;AACb,CAAC;AAACW,OAAA,CAAAb,yBAAA,GAAAA,yBAAA;AAEK,MAAMc,2BAA2B,GAAIC,MAK3C,IAA2B;EAC3B,SAAS;;EACT,MAAM;IAAEP,OAAO;IAAEQ,cAAc;IAAEC,aAAa;IAAEC;EAAmB,CAAC,GAAGH,MAAM;EAE7E,MAAMZ,aAAa,GAAGK,OAAO,CAACL,aAAa;EAC3C,MAAMC,mBAAmB,GAAGI,OAAO,CAACJ,mBAAmB,IAAIY,cAAc;EACzE,MAAMX,aAAa,GAAGG,OAAO,CAACH,aAAa,IAAIY,aAAa;EAC5D,MAAMX,kBAAkB,GACvBE,OAAO,CAACF,kBAAkB,KAAKY,kBAAkB,IAAIF,cAAc,CAAC;EACrE,MAAMG,gBAAgB,GAAGX,OAAO,CAACD,YAAY;
|
|
1
|
+
{"version":3,"names":["getMeasurementIntentFlags","intent","flags","captureSource","completeDestination","refreshSource","refreshDestination","snapshotOnly","intents","Array","isArray","i","length","exports","resolveMeasurementWritePlan","params","hasPendingLink","hasSourceLink","hasDestinationLink","registerSnapshot","writesAny","wantsDestinationWrite","resolveAutoSourceCaptureSignal","enabled","nextScreenKey","tagPresence","direct","count","screenKey","entry","ancestorKeys","includes","resolvePendingDestinationCaptureSignal","resolvedSourceKey","hasPendingLinkFromSource","resolvePendingDestinationRetrySignal","retryCount","maxRetries","isAnimating","progress","retryProgressMax","retryProgressBuckets","Math","floor","resolveInitialLayoutMeasurementIntent","hasSharedBoundTag","hasMeasuredOnLayout","isAnyAnimating","resolveGroupActiveMeasurementAction","isEligible","memberId","activeId","previousActiveId","canFlushGroupActiveMeasurement","shouldTriggerScrollSettledRefresh","group","hasNextScreen","hasSettledSignal","signal","previousSignal"],"sourceRoot":"../../../../../../../src","sources":["shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts"],"mappings":";;;;;;AA8BO,MAAMA,yBAAyB,GACrCC,MAAyD,IAC7B;EAC5B,SAAS;;EACT,MAAMC,KAA6B,GAAG;IACrCC,aAAa,EAAE,KAAK;IACpBC,mBAAmB,EAAE,KAAK;IAC1BC,aAAa,EAAE,KAAK;IACpBC,kBAAkB,EAAE,KAAK;IACzBC,YAAY,EAAE;EACf,CAAC;EAED,IAAI,CAACN,MAAM,EAAE;IACZ,OAAOC,KAAK;EACb;EAEA,MAAMM,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACT,MAAM,CAAC,GAAGA,MAAM,GAAG,CAACA,MAAM,CAAC;EAEzD,KAAK,IAAIU,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,OAAO,CAACI,MAAM,EAAED,CAAC,EAAE,EAAE;IACxC,QAAQH,OAAO,CAACG,CAAC,CAAC;MACjB,KAAK,gBAAgB;QACpBT,KAAK,CAACC,aAAa,GAAG,IAAI;QAC1B;MACD,KAAK,sBAAsB;QAC1BD,KAAK,CAACE,mBAAmB,GAAG,IAAI;QAChC;MACD,KAAK,gBAAgB;QACpBF,KAAK,CAACG,aAAa,GAAG,IAAI;QAC1B;MACD,KAAK,qBAAqB;QACzBH,KAAK,CAACI,kBAAkB,GAAG,IAAI;QAC/B;MACD,KAAK,eAAe;QACnBJ,KAAK,CAACK,YAAY,GAAG,IAAI;QACzB;IACF;EACD;EAEA,OAAOL,KAAK;AACb,CAAC;AAACW,OAAA,CAAAb,yBAAA,GAAAA,yBAAA;AAEK,MAAMc,2BAA2B,GAAIC,MAK3C,IAA2B;EAC3B,SAAS;;EACT,MAAM;IAAEP,OAAO;IAAEQ,cAAc;IAAEC,aAAa;IAAEC;EAAmB,CAAC,GAAGH,MAAM;EAE7E,MAAMZ,aAAa,GAAGK,OAAO,CAACL,aAAa;EAC3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,aAAa,IAAI,CAACC,gBAAgB,EAAE,OAAO,KAAK;EAC/D,IAAIC,MAAM,KAAK,CAAC,IAAIA,MAAM,KAAKC,cAAc,EAAE,OAAO,KAAK;EAC3D,OAAO,IAAI;AACZ,CAAC;AAAC9C,OAAA,CAAAyC,iCAAA,GAAAA,iCAAA","ignoreList":[]}
|
|
@@ -5,7 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useGroupActiveMeasurement = void 0;
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
+
var _constants = require("../../../constants");
|
|
9
|
+
var _animation = require("../../../stores/animation.store");
|
|
8
10
|
var _bounds = require("../../../stores/bounds");
|
|
11
|
+
var _gesture = require("../../../stores/gesture.store");
|
|
9
12
|
var _measurementRules = require("./helpers/measurement-rules");
|
|
10
13
|
var _useDeferredMeasurementTrigger = require("./use-deferred-measurement-trigger");
|
|
11
14
|
/**
|
|
@@ -20,18 +23,55 @@ const useGroupActiveMeasurement = params => {
|
|
|
20
23
|
enabled,
|
|
21
24
|
group,
|
|
22
25
|
id,
|
|
26
|
+
currentScreenKey,
|
|
23
27
|
shouldUpdateDestination,
|
|
24
|
-
isAnimating,
|
|
25
28
|
maybeMeasureAndStore
|
|
26
29
|
} = params;
|
|
27
30
|
const idStr = String(id);
|
|
28
31
|
const allGroups = _bounds.BoundStore.getGroups();
|
|
32
|
+
const progress = _animation.AnimationStore.getValue(currentScreenKey, "progress");
|
|
33
|
+
const animating = _animation.AnimationStore.getValue(currentScreenKey, "animating");
|
|
34
|
+
const entering = _animation.AnimationStore.getValue(currentScreenKey, "entering");
|
|
35
|
+
const closing = _animation.AnimationStore.getValue(currentScreenKey, "closing");
|
|
36
|
+
const dragging = _gesture.GestureStore.getValue(currentScreenKey, "dragging");
|
|
37
|
+
const dismissing = _gesture.GestureStore.getValue(currentScreenKey, "dismissing");
|
|
38
|
+
const hasSettledOpenOnce = (0, _reactNativeReanimated.useSharedValue)(false);
|
|
39
|
+
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
40
|
+
"worklet";
|
|
41
|
+
|
|
42
|
+
if (!enabled || !shouldUpdateDestination) return false;
|
|
43
|
+
return progress.value >= 1 - _constants.EPSILON && animating.value === 0 && entering.value === 0 && closing.value === 0 && dragging.value === 0 && dismissing.value === 0;
|
|
44
|
+
}, isSettledOpen => {
|
|
45
|
+
"worklet";
|
|
46
|
+
|
|
47
|
+
if (isSettledOpen) {
|
|
48
|
+
hasSettledOpenOnce.value = true;
|
|
49
|
+
}
|
|
50
|
+
}, [enabled, shouldUpdateDestination, progress, animating, entering, closing, dragging, dismissing, hasSettledOpenOnce]);
|
|
51
|
+
const isRefreshBlocked = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
52
|
+
"worklet";
|
|
53
|
+
|
|
54
|
+
if (!enabled || !shouldUpdateDestination) return 0;
|
|
55
|
+
if (!hasSettledOpenOnce.value) return 1;
|
|
56
|
+
if (progress.value < 1 - _constants.EPSILON) return 1;
|
|
57
|
+
if (animating.value !== 0) return 1;
|
|
58
|
+
if (entering.value !== 0) return 1;
|
|
59
|
+
if (closing.value !== 0) return 1;
|
|
60
|
+
if (dragging.value !== 0) return 1;
|
|
61
|
+
if (dismissing.value !== 0) return 1;
|
|
62
|
+
return 0;
|
|
63
|
+
});
|
|
29
64
|
const {
|
|
30
65
|
clearPendingMeasurement,
|
|
31
66
|
queueOrFlushMeasurement
|
|
32
67
|
} = (0, _useDeferredMeasurementTrigger.useDeferredMeasurementTrigger)({
|
|
33
68
|
enabled,
|
|
34
|
-
|
|
69
|
+
/**
|
|
70
|
+
* The reason to do extra guard checks for isAnimating is because a user may mid animation drag, causing
|
|
71
|
+
* the src component to be wrongly measured. This in turns leads to faulty src measurements being used, giving us a weird teleport
|
|
72
|
+
* animation rather than a smooth 'SET' transition when dst is actually dismissing.
|
|
73
|
+
*/
|
|
74
|
+
isAnimating: isRefreshBlocked,
|
|
35
75
|
canFlush: () => {
|
|
36
76
|
"worklet";
|
|
37
77
|
|
|
@@ -40,7 +80,7 @@ const useGroupActiveMeasurement = params => {
|
|
|
40
80
|
isEligible: !!group && shouldUpdateDestination,
|
|
41
81
|
memberId: idStr,
|
|
42
82
|
activeId: group ? allGroups.value[group]?.activeId ?? null : null
|
|
43
|
-
});
|
|
83
|
+
}) && hasSettledOpenOnce.value;
|
|
44
84
|
},
|
|
45
85
|
onFlush: () => {
|
|
46
86
|
"worklet";
|
|
@@ -71,9 +111,12 @@ const useGroupActiveMeasurement = params => {
|
|
|
71
111
|
return;
|
|
72
112
|
}
|
|
73
113
|
if (action === "queue-or-flush") {
|
|
114
|
+
if (!hasSettledOpenOnce.value) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
74
117
|
queueOrFlushMeasurement();
|
|
75
118
|
}
|
|
76
|
-
}, [enabled, group, idStr, shouldUpdateDestination, clearPendingMeasurement, queueOrFlushMeasurement]);
|
|
119
|
+
}, [enabled, group, idStr, currentScreenKey, shouldUpdateDestination, hasSettledOpenOnce, clearPendingMeasurement, queueOrFlushMeasurement]);
|
|
77
120
|
};
|
|
78
121
|
exports.useGroupActiveMeasurement = useGroupActiveMeasurement;
|
|
79
122
|
//# sourceMappingURL=use-group-active-measurement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_bounds","_measurementRules","_useDeferredMeasurementTrigger","useGroupActiveMeasurement","params","enabled","group","id","
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_constants","_animation","_bounds","_gesture","_measurementRules","_useDeferredMeasurementTrigger","useGroupActiveMeasurement","params","enabled","group","id","currentScreenKey","shouldUpdateDestination","maybeMeasureAndStore","idStr","String","allGroups","BoundStore","getGroups","progress","AnimationStore","getValue","animating","entering","closing","dragging","GestureStore","dismissing","hasSettledOpenOnce","useSharedValue","useAnimatedReaction","value","EPSILON","isSettledOpen","isRefreshBlocked","useDerivedValue","clearPendingMeasurement","queueOrFlushMeasurement","useDeferredMeasurementTrigger","isAnimating","canFlush","canFlushGroupActiveMeasurement","isEligible","memberId","activeId","onFlush","intent","previousActiveId","action","resolveGroupActiveMeasurementAction","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-group-active-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,iBAAA,GAAAL,OAAA;AAIA,IAAAM,8BAAA,GAAAN,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMO,yBAAyB,GAAIC,MAOzC,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,KAAK;IACLC,EAAE;IACFC,gBAAgB;IAChBC,uBAAuB;IACvBC;EACD,CAAC,GAAGN,MAAM;EACV,MAAMO,KAAK,GAAGC,MAAM,CAACL,EAAE,CAAC;EAExB,MAAMM,SAAS,GAAGC,kBAAU,CAACC,SAAS,CAAC,CAAC;EACxC,MAAMC,QAAQ,GAAGC,yBAAc,CAACC,QAAQ,CAACV,gBAAgB,EAAE,UAAU,CAAC;EACtE,MAAMW,SAAS,GAAGF,yBAAc,CAACC,QAAQ,CAACV,gBAAgB,EAAE,WAAW,CAAC;EACxE,MAAMY,QAAQ,GAAGH,yBAAc,CAACC,QAAQ,CAACV,gBAAgB,EAAE,UAAU,CAAC;EACtE,MAAMa,OAAO,GAAGJ,yBAAc,CAACC,QAAQ,CAACV,gBAAgB,EAAE,SAAS,CAAC;EACpE,MAAMc,QAAQ,GAAGC,qBAAY,CAACL,QAAQ,CAACV,gBAAgB,EAAE,UAAU,CAAC;EACpE,MAAMgB,UAAU,GAAGD,qBAAY,CAACL,QAAQ,CAACV,gBAAgB,EAAE,YAAY,CAAC;EACxE,MAAMiB,kBAAkB,GAAG,IAAA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AI,CAACpB,kBAAkB,CAACG,KAAK,EAAE;QAC9B;MACD;MACAM,uBAAuB,CAAC,CAAC;IAC1B;EACD,CAAC,EACD,CACC7B,OAAO,EACPC,KAAK,EACLK,KAAK,EACLH,gBAAgB,EAChBC,uBAAuB,EACvBgB,kBAAkB,EAClBQ,uBAAuB,EACvBC,uBAAuB,CAEzB,CAAC;AACF,CAAC;AAACa,OAAA,CAAA5C,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js
CHANGED
|
@@ -19,8 +19,8 @@ const useInitialLayoutHandler = params => {
|
|
|
19
19
|
expectedSourceScreenKey,
|
|
20
20
|
maybeMeasureAndStore
|
|
21
21
|
} = params;
|
|
22
|
-
const isAnimating = _animation.AnimationStore.
|
|
23
|
-
const ancestorAnimations = ancestorKeys.map(key => _animation.AnimationStore.
|
|
22
|
+
const isAnimating = _animation.AnimationStore.getValue(currentScreenKey, "animating");
|
|
23
|
+
const ancestorAnimations = ancestorKeys.map(key => _animation.AnimationStore.getValue(key, "animating"));
|
|
24
24
|
const hasMeasuredOnLayout = (0, _reactNativeReanimated.useSharedValue)(false);
|
|
25
25
|
const handleInitialLayout = (0, _react.useCallback)(() => {
|
|
26
26
|
"worklet";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_animation","_bounds","_resolvePendingSourceKey","_measurementRules","useInitialLayoutHandler","params","enabled","sharedBoundTag","currentScreenKey","ancestorKeys","expectedSourceScreenKey","maybeMeasureAndStore","isAnimating","AnimationStore","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_animation","_bounds","_resolvePendingSourceKey","_measurementRules","useInitialLayoutHandler","params","enabled","sharedBoundTag","currentScreenKey","ancestorKeys","expectedSourceScreenKey","maybeMeasureAndStore","isAnimating","AnimationStore","getValue","ancestorAnimations","map","key","hasMeasuredOnLayout","useSharedValue","handleInitialLayout","useCallback","get","isAnyAnimating","i","length","hasPendingLinkFromSource","resolvedSourceKey","resolvePendingSourceKey","BoundStore","intent","resolveInitialLayoutMeasurementIntent","hasSharedBoundTag","set","useLayoutEffect","runOnUI","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,wBAAA,GAAAJ,OAAA;AAEA,IAAAK,iBAAA,GAAAL,OAAA;AAEO,MAAMM,uBAAuB,GAAIC,MAOvC,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,cAAc;IACdC,gBAAgB;IAChBC,YAAY;IACZC,uBAAuB;IACvBC;EACD,CAAC,GAAGN,MAAM;EAEV,MAAMO,WAAW,GAAGC,yBAAc,CAACC,QAAQ,CAACN,gBAAgB,EAAE,WAAW,CAAC;EAE1E,MAAMO,kBAAkB,GAAGN,YAAY,CAACO,GAAG,CAAEC,GAAG,IAC/CJ,yBAAc,CAACC,QAAQ,CAACG,GAAG,EAAE,WAAW,CACzC,CAAC;EAED,MAAMC,mBAAmB,GAAG,IAAAC,qCAAc,EAAC,KAAK,CAAC;EAEjD,MAAMC,mBAAmB,GAAG,IAAAC,kBAAW,EAAC,MAAM;IAC7C,SAAS;;IACT,IAAI,CAACf,OAAO,EAAE;IACd,IAAI,CAACC,cAAc,IAAIW,mBAAmB,CAACI,GAAG,CAAC,CAAC,EAAE;IAElD,IAAIC,cAAc,GAAGX,WAAW,CAACU,GAAG,CAAC,CAAC;IACtC,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGT,kBAAkB,CAACU,MAAM,EAAED,CAAC,EAAE,EAAE;MACnD,IAAIT,kBAAkB,CAACS,CAAC,CAAC,CAACF,GAAG,CAAC,CAAC,EAAE;QAChCC,cAAc,GAAG,CAAC;QAClB;MACD;IACD;IAEA,IAAIG,wBAAwB,GAAG,KAAK;IAEpC,IAAIH,cAAc,EAAE;MACnB,MAAMI,iBAAiB,GAAG,IAAAC,gDAAuB,EAChDrB,cAAc,EACdG,uBACD,CAAC;MACD,IACCiB,iBAAiB,IACjBE,kBAAU,CAACH,wBAAwB,CAACnB,cAAc,EAAEoB,iBAAiB,CAAC,EACrE;QACDD,wBAAwB,GAAG,IAAI;MAChC;IACD;IAEA,MAAMI,MAAM,GAAG,IAAAC,uDAAqC,EAAC;MACpDzB,OAAO;MACP0B,iBAAiB,EAAE,CAAC,CAACzB,cAAc;MACnCW,mBAAmB,EAAEA,mBAAmB,CAACI,GAAG,CAAC,CAAC;MAC9CC,cAAc,EAAE,CAAC,CAACA,cAAc;MAChCG;IACD,CAAC,CAAC;IACF,IAAI,CAACI,MAAM,EAAE;IAEbnB,oBAAoB,CAAC;MACpBmB;IACD,CAAC,CAAC;IAEFZ,mBAAmB,CAACe,GAAG,CAAC,IAAI,CAAC;EAC9B,CAAC,EAAE,CACF3B,OAAO,EACPC,cAAc,EACdW,mBAAmB,EACnBN,WAAW,EACXG,kBAAkB,EAClBJ,oBAAoB,EACpBD,uBAAuB,CACvB,CAAC;;EAEF;EACA;EACA,IAAAwB,sBAAe,EAAC,MAAM;IACrB,IAAI,CAAC5B,OAAO,EAAE;IACd,IAAA6B,8BAAO,EAACf,mBAAmB,CAAC,CAAC,CAAC;EAC/B,CAAC,EAAE,CAACd,OAAO,EAAEc,mBAAmB,CAAC,CAAC;AACnC,CAAC;AAACgB,OAAA,CAAAhC,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -18,7 +18,6 @@ var _useAutoSourceMeasurement = require("./hooks/use-auto-source-measurement");
|
|
|
18
18
|
var _useBoundaryMeasureAndStore = require("./hooks/use-boundary-measure-and-store");
|
|
19
19
|
var _useBoundaryPresence = require("./hooks/use-boundary-presence");
|
|
20
20
|
var _useGroupActiveMeasurement = require("./hooks/use-group-active-measurement");
|
|
21
|
-
var _useGroupActiveSourceMeasurement = require("./hooks/use-group-active-source-measurement");
|
|
22
21
|
var _useInitialLayoutHandler = require("./hooks/use-initial-layout-handler");
|
|
23
22
|
var _usePendingDestinationMeasurement = require("./hooks/use-pending-destination-measurement");
|
|
24
23
|
var _usePendingDestinationRetryMeasurement = require("./hooks/use-pending-destination-retry-measurement");
|
|
@@ -78,8 +77,8 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
78
77
|
method
|
|
79
78
|
};
|
|
80
79
|
}, [anchor, scaleMode, target, method]);
|
|
81
|
-
const isAnimating = _animation.AnimationStore.
|
|
82
|
-
const progress = _animation.AnimationStore.
|
|
80
|
+
const isAnimating = _animation.AnimationStore.getValue(currentScreenKey, "animating");
|
|
81
|
+
const progress = _animation.AnimationStore.getValue(currentScreenKey, "progress");
|
|
83
82
|
const preparedStyles = (0, _react.useMemo)(() => (0, _styles.prepareStyleForBounds)(style), [style]);
|
|
84
83
|
const {
|
|
85
84
|
associatedStyles
|
|
@@ -150,20 +149,8 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
150
149
|
enabled: runtimeEnabled,
|
|
151
150
|
group,
|
|
152
151
|
id,
|
|
152
|
+
currentScreenKey,
|
|
153
153
|
shouldUpdateDestination,
|
|
154
|
-
isAnimating,
|
|
155
|
-
maybeMeasureAndStore
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
// Source-side analog for grouped retargeting: when an unfocused/source
|
|
159
|
-
// boundary becomes the active member, refresh its snapshot (and source
|
|
160
|
-
// link when one exists) so close transitions don't use stale geometry.
|
|
161
|
-
(0, _useGroupActiveSourceMeasurement.useGroupActiveSourceMeasurement)({
|
|
162
|
-
enabled: runtimeEnabled,
|
|
163
|
-
group,
|
|
164
|
-
id,
|
|
165
|
-
hasNextScreen,
|
|
166
|
-
isAnimating,
|
|
167
154
|
maybeMeasureAndStore
|
|
168
155
|
});
|
|
169
156
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_useAssociatedStyle","_layoutAnchor","_descriptors","_animation","_bounds","_styles","_useAutoSourceMeasurement","_useBoundaryMeasureAndStore","_useBoundaryPresence","_useGroupActiveMeasurement","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_useAssociatedStyle","_layoutAnchor","_descriptors","_animation","_bounds","_styles","_useAutoSourceMeasurement","_useBoundaryMeasureAndStore","_useBoundaryPresence","_useGroupActiveMeasurement","_useInitialLayoutHandler","_usePendingDestinationMeasurement","_usePendingDestinationRetryMeasurement","_useScrollSettledMeasurement","_buildBoundaryMatchKey","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","setGroupSelectionOnUI","group","id","BoundStore","setGroupActiveId","createBoundaryComponent","Wrapped","options","alreadyAnimated","AnimatedComponent","Animated","createAnimatedComponent","Inner","forwardRef","props","_ref","enabled","anchor","scaleMode","target","method","style","onPress","rest","sharedBoundTag","buildBoundaryMatchKey","animatedRef","useAnimatedRef","previousScreenKey","preferredSourceScreenKey","currentScreenKey","nextScreenKey","ancestorKeys","navigatorKey","ancestorNavigatorKeys","hasConfiguredInterpolator","useDescriptorDerivations","runtimeEnabled","hasNextScreen","shouldUpdateDestination","layoutAnchor","useLayoutAnchorContext","boundaryConfig","useMemo","undefined","isAnimating","AnimationStore","getValue","progress","preparedStyles","prepareStyleForBounds","associatedStyles","useAssociatedStyles","resetTransformOnUnset","maybeMeasureAndStore","useBoundaryMeasureAndStore","shouldRunDestinationEffects","useBoundaryPresence","useAutoSourceMeasurement","usePendingDestinationMeasurement","expectedSourceScreenKey","usePendingDestinationRetryMeasurement","animating","useGroupActiveMeasurement","useScrollSettledMeasurement","useInitialLayoutHandler","handlePress","useCallback","args","runOnUI","String","intent","resolvedOnPress","jsx","ref","collapsable","memo","BoundaryView","RNView","displayName","BoundaryPressable","Pressable","Boundary","exports","View"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/index.tsx"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,yBAAA,GAAAV,OAAA;AACA,IAAAW,2BAAA,GAAAX,OAAA;AACA,IAAAY,oBAAA,GAAAZ,OAAA;AACA,IAAAa,0BAAA,GAAAb,OAAA;AACA,IAAAc,wBAAA,GAAAd,OAAA;AACA,IAAAe,iCAAA,GAAAf,OAAA;AACA,IAAAgB,sCAAA,GAAAhB,OAAA;AACA,IAAAiB,4BAAA,GAAAjB,OAAA;AAEA,IAAAkB,sBAAA,GAAAlB,OAAA;AAAyE,IAAAmB,WAAA,GAAAnB,OAAA;AAAA,SAAAG,wBAAAiB,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAnB,uBAAA,YAAAA,CAAAiB,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA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AAY;EAClB;EACAI,SAAS,EAAED;AACZ,CAAC","ignoreList":[]}
|
|
@@ -47,9 +47,9 @@ const NativeScreen = ({
|
|
|
47
47
|
const topIndex = routesLength - 1;
|
|
48
48
|
const topRouteKey = routes[topIndex]?.key ?? routeKey;
|
|
49
49
|
const screenRef = (0, _reactNativeReanimated.useAnimatedRef)();
|
|
50
|
-
const sceneClosing = _animation.AnimationStore.
|
|
51
|
-
const topSceneProgress = _animation.AnimationStore.
|
|
52
|
-
const topSceneClosing = _animation.AnimationStore.
|
|
50
|
+
const sceneClosing = _animation.AnimationStore.getValue(routeKey, "closing");
|
|
51
|
+
const topSceneProgress = _animation.AnimationStore.getValue(topRouteKey, "progress");
|
|
52
|
+
const topSceneClosing = _animation.AnimationStore.getValue(topRouteKey, "closing");
|
|
53
53
|
const screenActivity = (0, _reactNativeReanimated.useSharedValue)(ScreenActivity.TRANSITIONING_OR_BELOW_TOP);
|
|
54
54
|
(0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
55
55
|
if (!topSceneProgress) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_interopRequireWildcard","_reactNativeScreens","_constants","_useStack","_layoutAnchor","_managed","_animation","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PASSTHROUGH","ScreenActivity","POINT_NONE","POINT_BOX_NONE","AnimatedNativeScreen","Animated","createAnimatedComponent","RNSScreen","NativeScreen","routeKey","index","isPreloaded","children","freezeOnBlur","shouldFreeze","flags","DISABLE_NATIVE_SCREENS","routes","optimisticFocusedIndex","useStack","activeScreensLimit","backdropBehaviors","useManagedStackContext","routesLength","length","topIndex","topRouteKey","key","screenRef","useAnimatedRef","sceneClosing","AnimationStore","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_interopRequireWildcard","_reactNativeScreens","_constants","_useStack","_layoutAnchor","_managed","_animation","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PASSTHROUGH","ScreenActivity","POINT_NONE","POINT_BOX_NONE","AnimatedNativeScreen","Animated","createAnimatedComponent","RNSScreen","NativeScreen","routeKey","index","isPreloaded","children","freezeOnBlur","shouldFreeze","flags","DISABLE_NATIVE_SCREENS","routes","optimisticFocusedIndex","useStack","activeScreensLimit","backdropBehaviors","useManagedStackContext","routesLength","length","topIndex","topRouteKey","key","screenRef","useAnimatedRef","sceneClosing","AnimationStore","getValue","topSceneProgress","topSceneClosing","screenActivity","useSharedValue","TRANSITIONING_OR_BELOW_TOP","useDerivedValue","INACTIVE","focusedIndex","value","topIsClosing","postCloseActiveStart","Math","max","next","ON_TOP","outputValue","v","interpolate","EPSILON","Extrapolation","CLAMP","trunc","animatedProps","useAnimatedProps","activity","isClosing","activeIndex","isActive","activeBackdrop","activeAllowsPassthrough","isAllowedPassthroughBelow","pointerEvents","activityState","jsx","View","ref","collapsable","style","StyleSheet","absoluteFill","LayoutAnchorProvider","anchorRef","enabled","exports"],"sourceRoot":"../../../../src","sources":["shared/components/native-screen.tsx"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAQA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AAA2D,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAE,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,CAAA,EAAAC,C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AAY,EAAEA,YAAa;IAC3B0C,aAAa,EAAEA,aAAc;IAAA3C,QAAA,eAE7B,IAAAhC,WAAA,CAAAsF,GAAA,EAACzF,aAAA,CAAAgG,oBAAoB;MAACC,SAAS,EAAE9C,SAAU;MAAAhB,QAAA,EACzCA;IAAQ,CACY;EAAC,CACF,CAAC;AAEzB,CAAC;AAACgE,OAAA,CAAApE,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -27,7 +27,7 @@ const DeferredVisibilityHost = exports.DeferredVisibilityHost = /*#__PURE__*/(0,
|
|
|
27
27
|
const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
28
28
|
"worklet";
|
|
29
29
|
|
|
30
|
-
return resolutionMode.value === "deferred" ? _constants.HIDDEN_STYLE : _constants.
|
|
30
|
+
return resolutionMode.value === "deferred" ? _constants.HIDDEN_STYLE : _constants.VISIBLE_STYLE;
|
|
31
31
|
});
|
|
32
32
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
33
33
|
collapsable: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_constants","_styles","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DeferredVisibilityHost","exports","memo","children","resolutionMode","useScreenStyles","animatedStyle","useAnimatedStyle","value","HIDDEN_STYLE","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_constants","_styles","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DeferredVisibilityHost","exports","memo","children","resolutionMode","useScreenStyles","animatedStyle","useAnimatedStyle","value","HIDDEN_STYLE","VISIBLE_STYLE","jsx","View","collapsable","style","styles","host","StyleShe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A;AAMzE;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMkB,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,gBAAG,IAAAE,WAAI,EAAC,CAAC;EAAEC;AAAgB,CAAC,KAAK;EACnE,MAAM;IAAEC;EAAe,CAAC,GAAG,IAAAC,uBAAe,EAAC,CAAC;EAE5C,MAAMC,aAAa,GAAG,IAAAC,uCAAgB,EAAC,MAAM;IAC5C,SAAS;;IACT,OAAOH,cAAc,CAACI,KAAK,KAAK,UAAU,GAAGC,uBAAY,GAAGC,wBAAa;EAC1E,CAAC,CAAC;EAEF,oBACC,IAAA9B,WAAA,CAAA+B,GAAA,EAACnC,sBAAA,CAAAe,OAAQ,CAACqB,IAAI;IAACC,WAAW,EAAE,KAAM;IAACC,KAAK,EAAE,CAACC,MAAM,CAACC,IAAI,EAAEV,aAAa,CAAE;IAAAH,QAAA,EACrEA;EAAQ,CACK,CAAC;AAElB,CAAC,CAAC;AAEF,MAAMY,MAAM,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAChCF,IAAI,EAAE;IACLG,IAAI,EAAE;EACP;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
10
10
|
var _descriptors = require("../../../providers/screen/descriptors");
|
|
11
11
|
var _animation = require("../../../stores/animation.store");
|
|
12
|
+
var _system = require("../../../stores/system.store");
|
|
12
13
|
var _animateToProgress = require("../../../utils/animation/animate-to-progress");
|
|
13
14
|
function useContentLayout() {
|
|
14
15
|
const {
|
|
@@ -21,9 +22,12 @@ function useContentLayout() {
|
|
|
21
22
|
height: screenHeight
|
|
22
23
|
} = (0, _reactNative.useWindowDimensions)();
|
|
23
24
|
const routeKey = current.route.key;
|
|
24
|
-
const animations = _animation.AnimationStore.
|
|
25
|
-
const
|
|
26
|
-
const
|
|
25
|
+
const animations = _animation.AnimationStore.getBag(routeKey);
|
|
26
|
+
const targetProgressValue = _system.SystemStore.getValue(routeKey, "targetProgress");
|
|
27
|
+
const resolvedAutoSnapPointValue = _system.SystemStore.getValue(routeKey, "resolvedAutoSnapPoint");
|
|
28
|
+
const measuredContentLayoutValue = _system.SystemStore.getValue(routeKey, "measuredContentLayout");
|
|
29
|
+
const experimental_animateOnInitialMount = current.options.experimental_animateOnInitialMount;
|
|
30
|
+
const transitionSpec = current.options.transitionSpec;
|
|
27
31
|
return (0, _react.useCallback)(event => {
|
|
28
32
|
const {
|
|
29
33
|
width,
|
|
@@ -31,30 +35,30 @@ function useContentLayout() {
|
|
|
31
35
|
} = event.nativeEvent.layout;
|
|
32
36
|
if (width <= 0 || height <= 0) return;
|
|
33
37
|
const fraction = Math.min(height / screenHeight, 1);
|
|
34
|
-
|
|
35
|
-
(0, _reactNativeReanimated.runOnUI)((nextWidth, nextHeight, nextFraction, isInitialScreen, spec) => {
|
|
38
|
+
(0, _reactNativeReanimated.runOnUI)((nextWidth, nextHeight, nextFraction) => {
|
|
36
39
|
"worklet";
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
measuredContentLayoutValue.value = {
|
|
39
42
|
width: nextWidth,
|
|
40
43
|
height: nextHeight
|
|
41
44
|
};
|
|
42
|
-
const isFirstMeasurement =
|
|
43
|
-
|
|
45
|
+
const isFirstMeasurement = resolvedAutoSnapPointValue.value <= 0;
|
|
46
|
+
resolvedAutoSnapPointValue.value = nextFraction;
|
|
44
47
|
if (!isFirstMeasurement || animations.progress.value !== 0 || animations.animating.value !== 0) {
|
|
45
48
|
return;
|
|
46
49
|
}
|
|
47
|
-
if (
|
|
48
|
-
|
|
50
|
+
if (isFirstKey && !experimental_animateOnInitialMount) {
|
|
51
|
+
targetProgressValue.value = nextFraction;
|
|
49
52
|
animations.progress.value = nextFraction;
|
|
50
53
|
return;
|
|
51
54
|
}
|
|
52
55
|
(0, _animateToProgress.animateToProgress)({
|
|
53
56
|
target: nextFraction,
|
|
54
|
-
spec,
|
|
55
|
-
animations
|
|
57
|
+
spec: transitionSpec,
|
|
58
|
+
animations,
|
|
59
|
+
targetProgress: targetProgressValue
|
|
56
60
|
});
|
|
57
|
-
})(width, height, fraction
|
|
58
|
-
}, [animations,
|
|
61
|
+
})(width, height, fraction);
|
|
62
|
+
}, [animations, targetProgressValue, resolvedAutoSnapPointValue, measuredContentLayoutValue, isFirstKey, screenHeight, experimental_animateOnInitialMount, transitionSpec]);
|
|
59
63
|
}
|
|
60
64
|
//# sourceMappingURL=use-content-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_descriptors","_animation","_animateToProgress","useContentLayout","current","useDescriptors","isFirstKey","useDescriptorDerivations","height","screenHeight","useWindowDimensions","routeKey","route","key","animations","AnimationStore","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_descriptors","_animation","_system","_animateToProgress","useContentLayout","current","useDescriptors","isFirstKey","useDescriptorDerivations","height","screenHeight","useWindowDimensions","routeKey","route","key","animations","AnimationStore","getBag","targetProgressValue","SystemStore","getValue","resolvedAutoSnapPointValue","measuredContentLayoutValue","experimental_animateOnInitialMount","options","transitionSpec","useCallback","event","width","nativeEvent","layout","fraction","Math","min","runOnUI","nextWidth","nextHeight","nextFraction","value","isFirstMeasurement","progress","animating","animateToProgress","target","spec","targetProgress"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/hooks/use-content-layout.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AAEO,SAASO,gBAAgBA,CAAA,EAAG;EAClC,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAC,2BAAc,EA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ACE,kBAAkB,IACnBxB,UAAU,CAACyB,QAAQ,CAACF,KAAK,KAAK,CAAC,IAC/BvB,UAAU,CAAC0B,SAAS,CAACH,KAAK,KAAK,CAAC,EAC/B;QACD;MACD;MAEA,IAAI/B,UAAU,IAAI,CAACgB,kCAAkC,EAAE;QACtDL,mBAAmB,CAACoB,KAAK,GAAGD,YAAY;QACxCtB,UAAU,CAACyB,QAAQ,CAACF,KAAK,GAAGD,YAAY;QACxC;MACD;MAEA,IAAAK,oCAAiB,EAAC;QACjBC,MAAM,EAAEN,YAAY;QACpBO,IAAI,EAAEnB,cAAc;QACpBV,UAAU;QACV8B,cAAc,EAAE3B;MACjB,CAAC,CAAC;IACH,CAAC,CAAC,CAACU,KAAK,EAAEnB,MAAM,EAAEsB,QAAQ,CAAC;EAC5B,CAAC,EACD,CACChB,UAAU,EACVG,mBAAmB,EACnBG,0BAA0B,EAC1BC,0BAA0B,EAC1Bf,UAAU,EACVG,YAAY,EACZa,kCAAkC,EAClCE,cAAc,CAEhB,CAAC;AACF","ignoreList":[]}
|
|
@@ -14,6 +14,7 @@ var _descriptors = require("../../../providers/screen/descriptors");
|
|
|
14
14
|
var _styles = require("../../../providers/screen/styles.provider");
|
|
15
15
|
var _animation = require("../../../stores/animation.store");
|
|
16
16
|
var _gesture = require("../../../stores/gesture.store");
|
|
17
|
+
var _system = require("../../../stores/system.store");
|
|
17
18
|
var _animateToProgress = require("../../../utils/animation/animate-to-progress");
|
|
18
19
|
var _findCollapseTarget = require("../../../utils/gesture/find-collapse-target");
|
|
19
20
|
var _useBackdropPointerEvents = require("../hooks/use-backdrop-pointer-events");
|
|
@@ -35,8 +36,9 @@ const BackdropLayer = exports.BackdropLayer = /*#__PURE__*/(0, _react.memo)(func
|
|
|
35
36
|
} = (0, _useBackdropPointerEvents.useBackdropPointerEvents)();
|
|
36
37
|
const BackdropComponent = current.options.backdropComponent;
|
|
37
38
|
const routeKey = current.route.key;
|
|
38
|
-
const animations = _animation.AnimationStore.
|
|
39
|
-
const
|
|
39
|
+
const animations = _animation.AnimationStore.getBag(routeKey);
|
|
40
|
+
const targetProgressValue = _system.SystemStore.getValue(routeKey, "targetProgress");
|
|
41
|
+
const resolvedAutoSnapPointValue = _system.SystemStore.getValue(routeKey, "resolvedAutoSnapPoint");
|
|
40
42
|
const AnimatedBackdropComponent = (0, _react.useMemo)(() => BackdropComponent ? _reactNativeReanimated.default.createAnimatedComponent(BackdropComponent) : null, [BackdropComponent]);
|
|
41
43
|
const handleBackdropPress = (0, _react.useCallback)(() => {
|
|
42
44
|
if (backdropBehavior === "dismiss") {
|
|
@@ -52,12 +54,12 @@ const BackdropLayer = exports.BackdropLayer = /*#__PURE__*/(0, _react.memo)(func
|
|
|
52
54
|
dismissScreen();
|
|
53
55
|
return;
|
|
54
56
|
}
|
|
55
|
-
const gestures = _gesture.GestureStore.
|
|
57
|
+
const gestures = _gesture.GestureStore.getBag(routeKey);
|
|
56
58
|
const transitionSpec = current.options.transitionSpec;
|
|
57
59
|
(0, _reactNativeReanimated.runOnUI)(() => {
|
|
58
60
|
"worklet";
|
|
59
61
|
|
|
60
|
-
const resolvedSnaps = rawSnapPoints.map(point => point === "auto" ?
|
|
62
|
+
const resolvedSnaps = rawSnapPoints.map(point => point === "auto" ? resolvedAutoSnapPointValue.value : point).filter(point => typeof point === "number");
|
|
61
63
|
const {
|
|
62
64
|
target,
|
|
63
65
|
shouldDismiss
|
|
@@ -74,11 +76,12 @@ const BackdropLayer = exports.BackdropLayer = /*#__PURE__*/(0, _react.memo)(func
|
|
|
74
76
|
target,
|
|
75
77
|
spec,
|
|
76
78
|
animations,
|
|
79
|
+
targetProgress: targetProgressValue,
|
|
77
80
|
onAnimationFinish: shouldDismiss ? dismissScreen : undefined
|
|
78
81
|
});
|
|
79
82
|
})();
|
|
80
83
|
}
|
|
81
|
-
}, [animations,
|
|
84
|
+
}, [animations, targetProgressValue, resolvedAutoSnapPointValue, backdropBehavior, current, dismissScreen, routeKey]);
|
|
82
85
|
const animatedBackdropStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
83
86
|
"worklet";
|
|
84
87
|
|