react-native-screen-transitions 3.4.0-alpha.2 → 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 +4 -18
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/commonjs/shared/components/create-transition-aware-component.js +1 -2
- package/lib/commonjs/shared/components/create-transition-aware-component.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 +43 -0
- package/lib/commonjs/shared/components/screen-container/deferred-visibility-host.js.map +1 -0
- 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/index.js +7 -4
- package/lib/commonjs/shared/components/screen-container/index.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.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +17 -24
- 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 +9 -10
- package/lib/commonjs/shared/configs/presets.js.map +1 -1
- package/lib/commonjs/shared/constants.js +26 -6
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js +11 -36
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/commonjs/shared/index.js +4 -10
- package/lib/commonjs/shared/index.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 +50 -0
- package/lib/commonjs/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles.provider.js +34 -10
- 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 +2 -2
- 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 +100 -363
- 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 +4 -18
- package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/module/shared/components/create-transition-aware-component.js +1 -2
- package/lib/module/shared/components/create-transition-aware-component.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 +38 -0
- package/lib/module/shared/components/screen-container/deferred-visibility-host.js.map +1 -0
- 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/index.js +7 -4
- package/lib/module/shared/components/screen-container/index.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.map +1 -1
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +20 -27
- 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 +10 -11
- package/lib/module/shared/configs/presets.js.map +1 -1
- package/lib/module/shared/constants.js +25 -5
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/hooks/animation/use-associated-style.js +12 -37
- package/lib/module/shared/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/module/shared/index.js +1 -1
- package/lib/module/shared/index.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 +44 -0
- package/lib/module/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +1 -0
- package/lib/module/shared/providers/screen/styles.provider.js +33 -11
- 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 +3 -3
- 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 +94 -357
- 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/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/deferred-visibility-host.d.ts +13 -0
- package/lib/typescript/shared/components/screen-container/deferred-visibility-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/index.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 +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/index.d.ts.map +1 -1
- package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +9 -3
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts +5 -11
- package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +4 -4
- 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 +14 -0
- package/lib/typescript/shared/providers/screen/helpers/resolve-interpolated-style-output.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles.provider.d.ts +4 -2
- 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 +40 -6
- 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 +16 -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 +11 -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 -23
- package/src/shared/components/create-transition-aware-component.tsx +0 -1
- package/src/shared/components/native-screen.tsx +3 -9
- package/src/shared/components/screen-container/deferred-visibility-host.tsx +37 -0
- package/src/shared/components/screen-container/hooks/use-content-layout.ts +42 -43
- package/src/shared/components/screen-container/index.tsx +5 -2
- package/src/shared/components/screen-container/layers/backdrop.tsx +12 -6
- package/src/shared/components/screen-container/layers/content.tsx +3 -0
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +30 -32
- 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 +18 -17
- package/src/shared/constants.ts +19 -3
- package/src/shared/hooks/animation/use-associated-style.ts +12 -62
- package/src/shared/index.ts +4 -3
- 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 +61 -0
- package/src/shared/providers/screen/styles.provider.tsx +99 -72
- 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 +43 -6
- package/src/shared/types/bounds.types.ts +25 -25
- package/src/shared/types/index.ts +2 -0
- package/src/shared/types/screen.types.ts +17 -0
- package/src/shared/utils/animation/animate-to-progress.ts +4 -2
- package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +3 -3
- package/src/shared/utils/bounds/index.ts +26 -75
- package/src/shared/utils/bounds/zoom/build.ts +174 -497
- 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
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ScreenContainer = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _deferredVisibilityHost = require("./deferred-visibility-host");
|
|
9
10
|
var _useBackdropPointerEvents = require("./hooks/use-backdrop-pointer-events");
|
|
10
11
|
var _backdrop = require("./layers/backdrop");
|
|
11
12
|
var _content = require("./layers/content");
|
|
@@ -16,12 +17,14 @@ const ScreenContainer = exports.ScreenContainer = /*#__PURE__*/(0, _react.memo)(
|
|
|
16
17
|
const {
|
|
17
18
|
pointerEvents
|
|
18
19
|
} = (0, _useBackdropPointerEvents.useBackdropPointerEvents)();
|
|
19
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
20
21
|
style: styles.container,
|
|
21
22
|
pointerEvents: pointerEvents,
|
|
22
|
-
children:
|
|
23
|
-
children:
|
|
24
|
-
|
|
23
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_deferredVisibilityHost.DeferredVisibilityHost, {
|
|
24
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_backdrop.BackdropLayer, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_content.ContentLayer, {
|
|
25
|
+
children: children
|
|
26
|
+
})]
|
|
27
|
+
})
|
|
25
28
|
});
|
|
26
29
|
});
|
|
27
30
|
const styles = _reactNative.StyleSheet.create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_useBackdropPointerEvents","_backdrop","_content","_jsxRuntime","ScreenContainer","exports","memo","children","pointerEvents","useBackdropPointerEvents","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_deferredVisibilityHost","_useBackdropPointerEvents","_backdrop","_content","_jsxRuntime","ScreenContainer","exports","memo","children","pointerEvents","useBackdropPointerEvents","jsx","View","style","styles","container","jsxs","DeferredVisibilityHost","BackdropLayer","ContentLayer","StyleSheet","create","flex"],"sourceRoot":"../../../../../src","sources":["shared/components/screen-container/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,yBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAAgD,IAAAM,WAAA,GAAAN,OAAA;AAMzC,MAAMO,eAAe,GAAAC,OAAA,CAAAD,eAAA,gBAAG,IAAAE,WAAI,EAAC,CAAC;EAAEC;AAAgB,CAAC,KAAK;EAC5D,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,kDAAwB,EAAC,CAAC;EAEpD,oBACC,IAAAN,WAAA,CAAAO,GAAA,EAACZ,YAAA,CAAAa,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAACN,aAAa,EAAEA,aAAc;IAAAD,QAAA,eAC3D,IAAAJ,WAAA,CAAAY,IAAA,EAAChB,uBAAA,CAAAiB,sBAAsB;MAAAT,QAAA,gBACtB,IAAAJ,WAAA,CAAAO,GAAA,EAACT,SAAA,CAAAgB,aAAa,IAAE,CAAC,eACjB,IAAAd,WAAA,CAAAO,GAAA,EAACR,QAAA,CAAAgB,YAAY;QAAAX,QAAA,EAAEA;MAAQ,CAAe,CAAC;IAAA,CAChB;EAAC,CACpB,CAAC;AAET,CAAC,CAAC;AAEF,MAAMM,MAAM,GAAGM,uBAAU,CAACC,MAAM,CAAC;EAChCN,SAAS,EAAE;IACVO,IAAI,EAAE;EACP;AACD,CAAC,CAAC","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
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_specs","_constants","_useNavigationHelpers","_descriptors","_styles","_animation","_gesture","_animateToProgress","_findCollapseTarget","_useBackdropPointerEvents","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BackdropLayer","exports","memo","stylesMap","useScreenStyles","current","useDescriptors","dismissScreen","useNavigationHelpers","isBackdropActive","backdropBehavior","useBackdropPointerEvents","BackdropComponent","options","backdropComponent","routeKey","route","key","animations","AnimationStore","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_specs","_constants","_useNavigationHelpers","_descriptors","_styles","_animation","_gesture","_system","_animateToProgress","_findCollapseTarget","_useBackdropPointerEvents","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BackdropLayer","exports","memo","stylesMap","useScreenStyles","current","useDescriptors","dismissScreen","useNavigationHelpers","isBackdropActive","backdropBehavior","useBackdropPointerEvents","BackdropComponent","options","backdropComponent","routeKey","route","key","animations","AnimationStore","getBag","targetProgressValue","SystemStore","getValue","resolvedAutoSnapPointValue","AnimatedBackdropComponent","useMemo","Animated","createAnimatedComponent","handleBackdropPress","useCallback","rawSnapPoints","snapPoints","canDismiss","gestureEnabled","length","gestures","GestureStore","transitionSpec","runOnUI","resolvedSnaps","map","point","value","filter","target","shouldDismiss","findCollapseTarget","progress","dismissing","spec","open","expand","DefaultSnapSpec","close","collapse","animateToProgress","targetProgress","onAnimationFinish","undefined","animatedBackdropStyle","useAnimatedStyle","backdrop","style","NO_STYLES","animatedBackdropProps","useAnimatedProps","props","NO_PROPS","jsxs","Pressable","StyleSheet","absoluteFillObject","pointerEvents","onPress","children","jsx","animatedProps","View"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/layers/backdrop.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,OAAA,GAAAX,OAAA;AACA,IAAAY,kBAAA,GAAAZ,OAAA;AACA,IAAAa,mBAAA,GAAAb,OAAA;AACA,IAAAc,yBAAA,GAAAd,OAAA;AAAgF,IAAAe,WAAA,GAAAf,OAAA;AAAA,SAAAG,wBAAAa,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAf,uBAAA,YAAAA,CAAAa,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,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CA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reList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeGestureHandler","_reactNativeReanimated","_interopRequireWildcard","_constants","_gestures","_descriptors","_styles","_resolveScreenTransitionOptions","_useBackdropPointerEvents","_useContentLayout","_maybeMaskedNavigationContainer","_surfaceContainer","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ContentLayer","exports","memo","children","stylesMap","useScreenStyles","current","useDescriptors","pointerEvents","isBackdropActive","useBackdropPointerEvents","gestureContext","useGestureContext","isNavigationMaskEnabled","resolveNavigationMaskEnabled","options","contentPointerEvents","hasAutoSnapPoint","snapPoints","includes","handleContentLayout","useContentLayout","animatedContentStyle","useAnimatedStyle","value","content","style","NO_STYLES","animatedContentProps","useAnimatedProps","props","NO_PROPS","jsx","GestureDetector","gesture","panGesture","View","styles","animatedProps","MaybeMaskedNavigationContainer","enabled","SurfaceContainer","collapsable","onLayout","StyleSheet","create","flex"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/layers/content.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAC,uBAAA,CAAAJ,OAAA;AAIA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,+BAAA,GAAAT,OAAA;AACA,IAAAU,yBAAA,GAAAV,OAAA;AACA,IAAAW,iBAAA,GAAAX,OAAA;AACA,IAAAY,+BAAA,GAAAZ,OAAA;AACA,IAAAa,iBAAA,GAAAb,OAAA;AAAuD,IAAAc,WAAA,GAAAd,OAAA;AAAA,SAAAI,wBAAAW,CAAA,EAAAC,CAAA,6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
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeGestureHandler","_reactNativeReanimated","_interopRequireWildcard","_constants","_gestures","_descriptors","_styles","_resolveScreenTransitionOptions","_useBackdropPointerEvents","_useContentLayout","_maybeMaskedNavigationContainer","_surfaceContainer","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ContentLayer","exports","memo","children","stylesMap","useScreenStyles","current","useDescriptors","pointerEvents","isBackdropActive","useBackdropPointerEvents","gestureContext","useGestureContext","isNavigationMaskEnabled","resolveNavigationMaskEnabled","options","contentPointerEvents","hasAutoSnapPoint","snapPoints","includes","handleContentLayout","useContentLayout","animatedContentStyle","useAnimatedStyle","value","content","style","NO_STYLES","animatedContentProps","useAnimatedProps","props","NO_PROPS","jsx","GestureDetector","gesture","panGesture","View","styles","animatedProps","MaybeMaskedNavigationContainer","enabled","SurfaceContainer","collapsable","onLayout","StyleSheet","create","flex"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/layers/content.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAC,uBAAA,CAAAJ,OAAA;AAIA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,+BAAA,GAAAT,OAAA;AACA,IAAAU,yBAAA,GAAAV,OAAA;AACA,IAAAW,iBAAA,GAAAX,OAAA;AACA,IAAAY,+BAAA,GAAAZ,OAAA;AACA,IAAAa,iBAAA,GAAAb,OAAA;AAAuD,IAAAc,WAAA,GAAAd,OAAA;AAAA,SAAAI,wBAAAW,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OA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;UAAAb,QAAA,EACpDc,gBAAgB,gBAChB,IAAArC,WAAA,CAAAoD,GAAA,EAACjE,YAAA,CAAAqE,IAAI;YAACM,WAAW,EAAE,KAAM;YAACC,QAAQ,EAAEvB,mBAAoB;YAAAjB,QAAA,EACtDA;UAAQ,CACJ,CAAC,GAEPA;QACA,CACgB;MAAC,CACY;IAAC,CACnB;EAAC,CACA,CAAC;AAEpB,CAAC,CAAC;AAEF,MAAMkC,MAAM,GAAGO,uBAAU,CAACC,MAAM,CAAC;EAChCpB,OAAO,EAAE;IACRqB,IAAI,EAAE;EACP;AACD,CAAC,CAAC","ignoreList":[]}
|
package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js
CHANGED
|
@@ -19,7 +19,6 @@ try {
|
|
|
19
19
|
// optional peer dependency
|
|
20
20
|
}
|
|
21
21
|
let hasWarnedMissingMaskedView = false;
|
|
22
|
-
const IS_ANDROID = _reactNative.Platform.OS === "android";
|
|
23
22
|
const MaybeMaskedNavigationContainer = exports.MaybeMaskedNavigationContainer = /*#__PURE__*/(0, _react.memo)(({
|
|
24
23
|
enabled,
|
|
25
24
|
children,
|
|
@@ -28,37 +27,25 @@ const MaybeMaskedNavigationContainer = exports.MaybeMaskedNavigationContainer =
|
|
|
28
27
|
const {
|
|
29
28
|
stylesMap
|
|
30
29
|
} = (0, _styles.useScreenStyles)();
|
|
31
|
-
const
|
|
30
|
+
const animatedNavigationMaskStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
32
31
|
"worklet";
|
|
33
32
|
|
|
34
|
-
return stylesMap.value[_constants.
|
|
33
|
+
return stylesMap.value[_constants.NAVIGATION_MASK_ELEMENT_STYLE_ID]?.style || _constants.NO_STYLES;
|
|
35
34
|
});
|
|
36
|
-
const
|
|
35
|
+
const animatedNavigationMaskContainerStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
37
36
|
"worklet";
|
|
38
37
|
|
|
39
|
-
return stylesMap.value[_constants.
|
|
38
|
+
return stylesMap.value[_constants.NAVIGATION_MASK_CONTAINER_STYLE_ID]?.style || _constants.NO_STYLES;
|
|
40
39
|
});
|
|
41
|
-
(0, _react.
|
|
40
|
+
const maybeLogWarning = (0, _react.useCallback)(() => {
|
|
42
41
|
if (!enabled) return;
|
|
43
42
|
if (LazyMaskedView !== _reactNative.View) return;
|
|
44
43
|
if (hasWarnedMissingMaskedView) return;
|
|
45
44
|
hasWarnedMissingMaskedView = true;
|
|
46
45
|
_logger.logger.warn("navigationMaskEnabled requires @react-native-masked-view/masked-view. Install it to enable navigation bounds masking.");
|
|
47
46
|
}, [enabled]);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
pointerEvents: pointerEvents,
|
|
51
|
-
collapsable: false,
|
|
52
|
-
renderToHardwareTextureAndroid: IS_ANDROID && !enabled,
|
|
53
|
-
needsOffscreenAlphaCompositing: IS_ANDROID && !enabled,
|
|
54
|
-
children: children
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
// Navigation zoom uses the root container transform even when the mask
|
|
58
|
-
// wrapper is disabled. Only the mask element itself is optional.
|
|
59
|
-
if (!enabled) return navigationContainer;
|
|
60
|
-
if (LazyMaskedView === _reactNative.View) {
|
|
61
|
-
return navigationContainer;
|
|
47
|
+
if (!enabled || LazyMaskedView === _reactNative.View) {
|
|
48
|
+
return children;
|
|
62
49
|
}
|
|
63
50
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(LazyMaskedView, {
|
|
64
51
|
style: styles.navigationMaskedRoot
|
|
@@ -69,18 +56,24 @@ const MaybeMaskedNavigationContainer = exports.MaybeMaskedNavigationContainer =
|
|
|
69
56
|
pointerEvents: "none"
|
|
70
57
|
}),
|
|
71
58
|
pointerEvents: pointerEvents,
|
|
72
|
-
|
|
59
|
+
onLayout: maybeLogWarning,
|
|
60
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
61
|
+
style: [styles.navigationContainer, animatedNavigationMaskContainerStyle],
|
|
62
|
+
pointerEvents: pointerEvents,
|
|
63
|
+
collapsable: false,
|
|
64
|
+
children: children
|
|
65
|
+
})
|
|
73
66
|
});
|
|
74
67
|
});
|
|
75
68
|
const styles = _reactNative.StyleSheet.create({
|
|
76
69
|
navigationMaskedRoot: {
|
|
77
70
|
flex: 1
|
|
78
71
|
},
|
|
79
|
-
navigationMaskElement: {
|
|
80
|
-
backgroundColor: "white"
|
|
81
|
-
},
|
|
82
72
|
navigationContainer: {
|
|
83
73
|
flex: 1
|
|
74
|
+
},
|
|
75
|
+
navigationMaskElement: {
|
|
76
|
+
backgroundColor: "white"
|
|
84
77
|
}
|
|
85
78
|
});
|
|
86
79
|
//# sourceMappingURL=maybe-masked-navigation-container.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_constants","_styles","_logger","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","LazyMaskedView","View","_","hasWarnedMissingMaskedView","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_constants","_styles","_logger","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","LazyMaskedView","View","_","hasWarnedMissingMaskedView","MaybeMaskedNavigationContainer","exports","memo","enabled","children","pointerEvents","stylesMap","useScreenStyles","animatedNavigationMaskStyle","useAnimatedStyle","value","NAVIGATION_MASK_ELEMENT_STYLE_ID","style","NO_STYLES","animatedNavigationMaskContainerStyle","NAVIGATION_MASK_CONTAINER_STYLE_ID","maybeLogWarning","useCallback","logger","warn","jsx","styles","navigationMaskedRoot","maskElement","navigationMaskElement","onLayout","navigationContainer","collapsable","StyleSheet","create","flex","backgroundColor"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container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AgB,OAAQ,CAACU,IAAI;MACbe,KAAK,EAAE,CAACS,MAAM,CAACG,qBAAqB,EAAEhB,2BAA2B,CAAE;MACnEH,aAAa,EAAC;IAAM,CACpB,CACD;IACDA,aAAa,EAAEA,aAAc;IAC7BoB,QAAQ,EAAET,eAAgB;IAAAZ,QAAA,eAE1B,IAAA5B,WAAA,CAAA4C,GAAA,EAACjD,sBAAA,CAAAgB,OAAQ,CAACU,IAAI;MACbe,KAAK,EAAE,CACNS,MAAM,CAACK,mBAAmB,EAC1BZ,oCAAoC,CACnC;MACFT,aAAa,EAAEA,aAAc;MAC7BsB,WAAW,EAAE,KAAM;MAAAvB,QAAA,EAElBA;IAAQ,CACK;EAAC,CACD,CAAC;AAEnB,CACD,CAAC;AAED,MAAMiB,MAAM,GAAGO,uBAAU,CAACC,MAAM,CAAC;EAChCP,oBAAoB,EAAE;IACrBQ,IAAI,EAAE;EACP,CAAC;EACDJ,mBAAmB,EAAE;IACpBI,IAAI,EAAE;EACP,CAAC;EACDN,qBAAqB,EAAE;IACtBO,eAAe,EAAE;EAClB;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -8,9 +8,11 @@ var _reactNativeReanimated = require("react-native-reanimated");
|
|
|
8
8
|
var _animation = require("../../../../../stores/animation.store");
|
|
9
9
|
var _bounds = require("../../../../../stores/bounds");
|
|
10
10
|
var _gesture = require("../../../../../stores/gesture.store");
|
|
11
|
+
var _system = require("../../../../../stores/system.store");
|
|
11
12
|
const resetStoresForScreen = (routeKey, isBranchScreen, branchNavigatorKey) => {
|
|
12
|
-
_animation.AnimationStore.
|
|
13
|
-
_gesture.GestureStore.
|
|
13
|
+
_animation.AnimationStore.clearBag(routeKey);
|
|
14
|
+
_gesture.GestureStore.clearBag(routeKey);
|
|
15
|
+
_system.SystemStore.clearBag(routeKey);
|
|
14
16
|
(0, _reactNativeReanimated.runOnUI)(() => {
|
|
15
17
|
"worklet";
|
|
16
18
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_animation","_bounds","_gesture","resetStoresForScreen","routeKey","isBranchScreen","branchNavigatorKey","AnimationStore","
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_animation","_bounds","_gesture","_system","resetStoresForScreen","routeKey","isBranchScreen","branchNavigatorKey","AnimationStore","clearBag","GestureStore","SystemStore","runOnUI","BoundStore","clear","clearByBranch","clearByAncestor","exports"],"sourceRoot":"../../../../../../../../src","sources":["shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEO,MAAMK,oBAAoB,GAAGA,CACnCC,QAAgB,EAChBC,cAAuB,EACvBC,kBAA2B,KACvB;EACJC,yBAAc,CAACC,QAAQ,CAACJ,QAAQ,CAAC;EACjCK,qBAAY,CAACD,QAAQ,CAACJ,QAAQ,CAAC;EAC/BM,mBAAW,CAACF,QAAQ,CAACJ,QAAQ,CAAC;EAE9B,IAAAO,8BAAO,EAAC,MAAM;IACb,SAAS;;IACT,IAAI,CAACN,cAAc,EAAE;IAErBO,kBAAU,CAACC,KAAK,CAACT,QAAQ,CAAC;IAE1B,IAAIE,kBAAkB,EAAE;MACvBM,kBAAU,CAACE,aAAa,CAACR,kBAAkB,CAAC;MAC5C;IACD;IAEAM,kBAAU,CAACG,eAAe,CAACX,QAAQ,CAAC;EACrC,CAAC,CAAC,CAAC,CAAC;AACL,CAAC;AAACY,OAAA,CAAAb,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -25,6 +25,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
25
25
|
const useManagedClose = ({
|
|
26
26
|
current,
|
|
27
27
|
animations,
|
|
28
|
+
targetProgress,
|
|
28
29
|
activate,
|
|
29
30
|
deactivate,
|
|
30
31
|
resetStores
|
|
@@ -55,6 +56,7 @@ const useManagedClose = ({
|
|
|
55
56
|
target: "close",
|
|
56
57
|
spec: transitionSpec,
|
|
57
58
|
animations,
|
|
59
|
+
targetProgress,
|
|
58
60
|
onAnimationFinish: handleCloseEnd
|
|
59
61
|
});
|
|
60
62
|
});
|
|
@@ -66,6 +68,7 @@ const useManagedClose = ({
|
|
|
66
68
|
const useNativeStackClose = ({
|
|
67
69
|
current,
|
|
68
70
|
animations,
|
|
71
|
+
targetProgress,
|
|
69
72
|
activate,
|
|
70
73
|
deactivate,
|
|
71
74
|
resetStores
|
|
@@ -97,6 +100,7 @@ const useNativeStackClose = ({
|
|
|
97
100
|
target: "close",
|
|
98
101
|
spec: current.options.transitionSpec,
|
|
99
102
|
animations,
|
|
103
|
+
targetProgress,
|
|
100
104
|
onAnimationFinish: finished => {
|
|
101
105
|
deactivate();
|
|
102
106
|
if (finished) {
|
|
@@ -118,7 +122,7 @@ const useNativeStackClose = ({
|
|
|
118
122
|
/**
|
|
119
123
|
* Unified close handler that branches on stack type.
|
|
120
124
|
*/
|
|
121
|
-
function useCloseTransition(current, animations, activate, deactivate) {
|
|
125
|
+
function useCloseTransition(current, animations, targetProgress, activate, deactivate) {
|
|
122
126
|
const routeKey = current.route.key;
|
|
123
127
|
const {
|
|
124
128
|
navigatorKey
|
|
@@ -137,6 +141,7 @@ function useCloseTransition(current, animations, activate, deactivate) {
|
|
|
137
141
|
const closeParams = {
|
|
138
142
|
current,
|
|
139
143
|
animations,
|
|
144
|
+
targetProgress,
|
|
140
145
|
activate,
|
|
141
146
|
deactivate,
|
|
142
147
|
resetStores
|
package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_useStack","_useSharedValueState","_useStableCallback","_interopRequireDefault","_gestures","_descriptors","_core","_managed","_stack","_animateToProgress","_resetStoresForScreen","_useNavigatorHistoryRegistry","e","__esModule","default","useManagedClose","current","animations","activate","deactivate","resetStores","handleCloseRoute","closingRouteKeysShared","useManagedStackContext","routeKey","route","key","handleCloseEnd","useStableCallback","finished","requestAnimationFrame","transitionSpec","options","useAnimatedReaction","keys","value","includes","isClosing","wasClosing","runOnJS","animateToProgress","target","spec","onAnimationFinish","useNativeStackClose","gestureCtx","useGestureContext","isAncestorDismissingViaGesture","useSharedValueState","useDerivedValue","ancestorContext","gestureAnimationValues","dismissing","handleBeforeRemove","isEnabled","enableTransitions","navigation","state","getState","routeIndex","routes","findIndex","isFirstScreen","closing","set","preventDefault","dispatch","data","action","useLayoutEffect","addListener","useCloseTransition","navigatorKey","useStack","flags","useStackCoreContext","isBranchScreen","branchNavigatorKey","useDescriptorDerivations","isNativeStack","STACK_TYPE","StackType","NATIVE","resetStoresForScreen","closeParams","useNavigatorHistoryRegistry"],"sourceRoot":"../../../../../../../src","sources":["shared/components/screen-lifecycle/hooks/use-close-transition/index.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_useStack","_useSharedValueState","_useStableCallback","_interopRequireDefault","_gestures","_descriptors","_core","_managed","_stack","_animateToProgress","_resetStoresForScreen","_useNavigatorHistoryRegistry","e","__esModule","default","useManagedClose","current","animations","targetProgress","activate","deactivate","resetStores","handleCloseRoute","closingRouteKeysShared","useManagedStackContext","routeKey","route","key","handleCloseEnd","useStableCallback","finished","requestAnimationFrame","transitionSpec","options","useAnimatedReaction","keys","value","includes","isClosing","wasClosing","runOnJS","animateToProgress","target","spec","onAnimationFinish","useNativeStackClose","gestureCtx","useGestureContext","isAncestorDismissingViaGesture","useSharedValueState","useDerivedValue","ancestorContext","gestureAnimationValues","dismissing","handleBeforeRemove","isEnabled","enableTransitions","navigation","state","getState","routeIndex","routes","findIndex","isFirstScreen","closing","set","preventDefault","dispatch","data","action","useLayoutEffect","addListener","useCloseTransition","navigatorKey","useStack","flags","useStackCoreContext","isBranchScreen","branchNavigatorKey","useDescriptorDerivations","isNativeStack","STACK_TYPE","StackType","NATIVE","resetStoresForScreen","closeParams","useNavigatorHistoryRegistry"],"sourceRoot":"../../../../../../../src","sources":["shared/components/screen-lifecycle/hooks/use-close-transition/index.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAMA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAIA,IAAAQ,KAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAEA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,kBAAA,GAAAX,OAAA;AACA,IAAAY,qBAAA,GAAAZ,OAAA;AACA,IAAAa,4BAAA,GAAAb,OAAA;AAAuF,SAAAK,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAWvF;AACA;AACA;AACA;AACA,MAAMG,eAAe,GAAGA,CAAC;EACxBC,OAAO;EACPC,UAAU;EACVC,cAAc;EACdC,QAAQ;EACRC,UAAU;EACVC;AACgB,CAAC,KAAK;EACtB,MAAM;IAAEC,gBAAgB;IAAEC;EAAuB,CAAC,GAAG,IAAAC,+BAAsB,EAAC,CAAC;EAC7E,MAAMC,QAAQ,GAAGT,OAAO,CAACU,KAAK,CAACC,GAAG;EAElC,MAAMC,cAAc,GAAG,IAAAC,0BAAiB,EAAEC,QAAiB,IAAK;IAC/D,IAAI,CAACA,QAAQ,EAAE;IACfR,gBAAgB,CAAC;MAAEI,KAAK,EAAEV,OAAO,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,EACpBC,UAAsB,EACrB;EACD,MAAMK,QAAQ,GAAGT,OAAO,CAACU,KAAK,CAACC,GAAG;EAClC,MAAM;IAAE8C;EAAa,CAAC,GAAG,IAAAC,kBAAQ,EAAC,CAAC;EACnC,MAAM;IAAEC;EAAM,CAAC,GAAG,IAAAC,yBAAmB,EAAC,CAAC;EACvC,MAAM;IAAEC,cAAc;IAAEC;EAAmB,CAAC,GAAG,IAAAC,qCAAwB,EAAC,CAAC;EACzE,MAAMC,aAAa,GAAGL,KAAK,CAACM,UAAU,KAAKC,gBAAS,CAACC,MAAM;EAE3D,MAAM9D,WAAW,GAAG,IAAAQ,0BAAiB,EAAC,MAAM;IAC3C,IAAAuD,0CAAoB,EAAC3D,QAAQ,EAAEoD,cAAc,EAAEC,kBAAkB,CAAC;EACnE,CAAC,CAAC;EAEF,MAAMO,WAA4B,GAAG;IACpCrE,OAAO;IACPC,UAAU;IACVC,cAAc;IACdC,QAAQ;IACRC,UAAU;IACVC;EACD,CAAC;EAED,IAAAiE,wDAA2B,EAACb,YAAY,EAAEhD,QAAQ,CAAC;EACnD,IAAIuD,aAAa,EAAE;IAClB;IACAnC,mBAAmB,CAACwC,WAAW,CAAC;EACjC,CAAC,MAAM;IACN;IACAtE,eAAe,CAACsE,WAAW,CAAC;EAC7B;AACD","ignoreList":[]}
|
|
@@ -27,7 +27,7 @@ function getInitialProgress({
|
|
|
27
27
|
* Handles opening animation on mount.
|
|
28
28
|
* Returns activate/deactivate functions for high refresh rate.
|
|
29
29
|
*/
|
|
30
|
-
function useOpenTransition(current, animations, isFirstKey) {
|
|
30
|
+
function useOpenTransition(current, animations, targetProgressValue, isFirstKey) {
|
|
31
31
|
const {
|
|
32
32
|
activateHighRefreshRate,
|
|
33
33
|
deactivateHighRefreshRate
|
|
@@ -37,19 +37,20 @@ function useOpenTransition(current, animations, isFirstKey) {
|
|
|
37
37
|
(0, _react.useLayoutEffect)(() => {
|
|
38
38
|
const {
|
|
39
39
|
snapPoints,
|
|
40
|
-
initialSnapIndex = 0
|
|
40
|
+
initialSnapIndex = 0,
|
|
41
|
+
experimental_animateOnInitialMount
|
|
41
42
|
} = current.options;
|
|
42
|
-
const
|
|
43
|
+
const initialProgress = getInitialProgress({
|
|
43
44
|
snapPoints,
|
|
44
45
|
initialSnapIndex
|
|
45
46
|
});
|
|
46
|
-
if (isFirstKey) {
|
|
47
|
-
if (
|
|
48
|
-
|
|
47
|
+
if (isFirstKey && !experimental_animateOnInitialMount) {
|
|
48
|
+
if (initialProgress === "auto") {
|
|
49
|
+
targetProgressValue.set(0);
|
|
49
50
|
animations.progress.set(0);
|
|
50
51
|
} else {
|
|
51
|
-
const target =
|
|
52
|
-
|
|
52
|
+
const target = initialProgress ?? 1;
|
|
53
|
+
targetProgressValue.set(target);
|
|
53
54
|
animations.progress.set(target);
|
|
54
55
|
}
|
|
55
56
|
animations.animating.set(0);
|
|
@@ -59,15 +60,16 @@ function useOpenTransition(current, animations, isFirstKey) {
|
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
// When the initial snap point is 'auto', defer the opening animation until
|
|
62
|
-
// ScreenContainer has measured the content and set
|
|
63
|
-
if (
|
|
63
|
+
// ScreenContainer has measured the content and set resolvedAutoSnapPoint.
|
|
64
|
+
if (initialProgress === "auto") {
|
|
64
65
|
return;
|
|
65
66
|
}
|
|
66
67
|
activateHighRefreshRate();
|
|
67
68
|
(0, _animateToProgress.animateToProgress)({
|
|
68
|
-
target:
|
|
69
|
+
target: initialProgress ?? "open",
|
|
69
70
|
spec: current.options.transitionSpec,
|
|
70
71
|
animations,
|
|
72
|
+
targetProgress: targetProgressValue,
|
|
71
73
|
onAnimationFinish: deactivateHighRefreshRate
|
|
72
74
|
});
|
|
73
75
|
}, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_animateToProgress","_useHighRefreshRate","getInitialProgress","snapPoints","initialSnapIndex","undefined","clampedIndex","Math","min","max","length","useOpenTransition","current","animations","isFirstKey","activateHighRefreshRate","deactivateHighRefreshRate","useHighRefreshRate","useLayoutEffect","options","
|
|
1
|
+
{"version":3,"names":["_react","require","_animateToProgress","_useHighRefreshRate","getInitialProgress","snapPoints","initialSnapIndex","undefined","clampedIndex","Math","min","max","length","useOpenTransition","current","animations","targetProgressValue","isFirstKey","activateHighRefreshRate","deactivateHighRefreshRate","useHighRefreshRate","useLayoutEffect","experimental_animateOnInitialMount","options","initialProgress","set","progress","target","animating","closing","entering","animateToProgress","spec","transitionSpec","targetProgress","onAnimationFinish"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-lifecycle/hooks/use-open-transition.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA,SAASG,kBAAkBA,CAAC;EAC3BC,UAAU;EACVC;AAID,CAAC,EAA+B;EAC/B,IAAI,CAACD,UAAU,EAAE;IAChB,OAAOE,SAAS;EACjB;EAEA,MAAMC,YAAY,GAAGC,IAAI,CAACC,GAAG,CAC5BD,IAAI,CAACE,GAAG,CAAC,CAAC,EAAEL,gBAAgB,CAAC,EAC7BD,UAAU,CAACO,MAAM,GAAG,CACrB,CAAC;EACD,OAAOP,UAAU,CAACG,YAAY,CAAC;AAChC;;AAEA;AACA;AACA;AACA;AACO,SAASK,iBAAiBA,CAChCC,OAAuB,EACvBC,UAA6B,EAC7BC,mBAAwC,EACxCC,UAAmB,EAClB;EACD,MAAM;IAAEC,uBAAuB;IAAEC;EAA0B,CAAC,GAC3D,IAAAC,sCAAkB,EAACN,OAAO,CAAC;;EAE5B;EACA,IAAAO,sBAAe,EAAC,MAAM;IACrB,MAAM;MACLhB,UAAU;MACVC,gBAAgB,GAAG,CAAC;MACpBgB;IACD,CAAC,GAAGR,OAAO,CAACS,OAAO;IAEnB,MAAMC,eAAe,GAAGpB,kBAAkB,CAAC;MAC1CC,UAAU;MACVC;IACD,CAAC,CAAC;IAEF,IAAIW,UAAU,IAAI,CAACK,kCAAkC,EAAE;MACtD,IAAIE,eAAe,KAAK,MAAM,EAAE;QAC/BR,mBAAmB,CAACS,GAAG,CAAC,CAAC,CAAC;QAC1BV,UAAU,CAACW,QAAQ,CAACD,GAAG,CAAC,CAAC,CAAC;MAC3B,CAAC,MAAM;QACN,MAAME,MAAM,GAAGH,eAAe,IAAI,CAAC;QACnCR,mBAAmB,CAACS,GAAG,CAACE,MAAM,CAAC;QAC/BZ,UAAU,CAACW,QAAQ,CAACD,GAAG,CAACE,MAAM,CAAC;MAChC;MACAZ,UAAU,CAACa,SAAS,CAACH,GAAG,CAAC,CAAC,CAAC;MAC3BV,UAAU,CAACc,OAAO,CAACJ,GAAG,CAAC,CAAC,CAAC;MACzBV,UAAU,CAACe,QAAQ,CAACL,GAAG,CAAC,CAAC,CAAC;MAC1B;IACD;;IAEA;IACA;IACA,IAAID,eAAe,KAAK,MAAM,EAAE;MAC/B;IACD;IAEAN,uBAAuB,CAAC,CAAC;IACzB,IAAAa,oCAAiB,EAAC;MACjBJ,MAAM,EAAEH,eAAe,IAAI,MAAM;MACjCQ,IAAI,EAAElB,OAAO,CAACS,OAAO,CAACU,cAAc;MACpClB,UAAU;MACVmB,cAAc,EAAElB,mBAAmB;MACnCmB,iBAAiB,EAAEhB;IACpB,CAAC,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IAAED,uBAAuB;IAAEC;EAA0B,CAAC;AAC9D","ignoreList":[]}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ScreenLifecycle = void 0;
|
|
7
7
|
var _descriptors = require("../../providers/screen/descriptors");
|
|
8
8
|
var _animation = require("../../stores/animation.store");
|
|
9
|
+
var _system = require("../../stores/system.store");
|
|
9
10
|
var _useCloseTransition = require("./hooks/use-close-transition");
|
|
10
11
|
var _useOpenTransition = require("./hooks/use-open-transition");
|
|
11
12
|
var _useScreenEvents = require("./hooks/use-screen-events");
|
|
@@ -23,12 +24,13 @@ const ScreenLifecycle = ({
|
|
|
23
24
|
const {
|
|
24
25
|
isFirstKey
|
|
25
26
|
} = (0, _descriptors.useDescriptorDerivations)();
|
|
26
|
-
const animations = _animation.AnimationStore.
|
|
27
|
+
const animations = _animation.AnimationStore.getBag(current.route.key);
|
|
28
|
+
const targetProgress = _system.SystemStore.getValue(current.route.key, "targetProgress");
|
|
27
29
|
const {
|
|
28
30
|
activateHighRefreshRate,
|
|
29
31
|
deactivateHighRefreshRate
|
|
30
|
-
} = (0, _useOpenTransition.useOpenTransition)(current, animations, isFirstKey);
|
|
31
|
-
(0, _useCloseTransition.useCloseTransition)(current, animations, activateHighRefreshRate, deactivateHighRefreshRate);
|
|
32
|
+
} = (0, _useOpenTransition.useOpenTransition)(current, animations, targetProgress, isFirstKey);
|
|
33
|
+
(0, _useCloseTransition.useCloseTransition)(current, animations, targetProgress, activateHighRefreshRate, deactivateHighRefreshRate);
|
|
32
34
|
(0, _useScreenEvents.useScreenEvents)(current, previous, animations);
|
|
33
35
|
return children;
|
|
34
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_descriptors","require","_animation","_useCloseTransition","_useOpenTransition","_useScreenEvents","ScreenLifecycle","children","current","previous","useDescriptors","isFirstKey","useDescriptorDerivations","animations","AnimationStore","
|
|
1
|
+
{"version":3,"names":["_descriptors","require","_animation","_system","_useCloseTransition","_useOpenTransition","_useScreenEvents","ScreenLifecycle","children","current","previous","useDescriptors","isFirstKey","useDescriptorDerivations","animations","AnimationStore","getBag","route","key","targetProgress","SystemStore","getValue","activateHighRefreshRate","deactivateHighRefreshRate","useOpenTransition","useCloseTransition","useScreenEvents","exports"],"sourceRoot":"../../../../../src","sources":["shared/components/screen-lifecycle/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AAMA;AACA;AACA;AACA;AACO,MAAMM,eAAe,GAAGA,CAAC;EAAEC;AAAgB,CAAC,KAAK;EACvD,MAAM;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAG,IAAAC,2BAAc,EAAC,CAAC;EAC9C,MAAM;IAAEC;EAAW,CAAC,GAAG,IAAAC,qCAAwB,EAAC,CAAC;EACjD,MAAMC,UAAU,GAAGC,yBAAc,CAACC,MAAM,CAACP,OAAO,CAACQ,KAAK,CAACC,GAAG,CAAC;EAC3D,MAAMC,cAAc,GAAGC,mBAAW,CAACC,QAAQ,CAC1CZ,OAAO,CAACQ,KAAK,CAACC,GAAG,EACjB,gBACD,CAAC;EAED,MAAM;IAAEI,uBAAuB;IAAEC;EAA0B,CAAC,GAC3D,IAAAC,oCAAiB,EAACf,OAAO,EAAEK,UAAU,EAAEK,cAAc,EAAEP,UAAU,CAAC;EAEnE,IAAAa,sCAAkB,EACjBhB,OAAO,EACPK,UAAU,EACVK,cAAc,EACdG,uBAAuB,EACvBC,yBACD,CAAC;EAED,IAAAG,gCAAe,EAACjB,OAAO,EAAEC,QAAQ,EAAEI,UAAU,CAAC;EAE9C,OAAON,QAAQ;AAChB,CAAC;AAACmB,OAAA,CAAApB,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -257,14 +257,13 @@ const SharedIGImage = ({
|
|
|
257
257
|
const dragXScale = (0, _reactNativeReanimated.interpolate)(normX, [0, 1], [1, 0.8]);
|
|
258
258
|
const dragYScale = (0, _reactNativeReanimated.interpolate)(normY, [0, 1], [1, 0.8]);
|
|
259
259
|
const navigationStyles = bounds({
|
|
260
|
-
id: sharedBoundTag
|
|
261
|
-
|
|
262
|
-
}).navigation.zoom();
|
|
260
|
+
id: sharedBoundTag
|
|
261
|
+
}).navigation.zoom() ?? {};
|
|
263
262
|
|
|
264
263
|
// Extract raw style values from bounds result (legacy format)
|
|
265
264
|
const sourceStyle = navigationStyles[sharedBoundTag];
|
|
266
|
-
const containerStyle = navigationStyles[_constants.
|
|
267
|
-
const maskStyle = navigationStyles[_constants.
|
|
265
|
+
const containerStyle = navigationStyles[_constants.NAVIGATION_MASK_CONTAINER_STYLE_ID];
|
|
266
|
+
const maskStyle = navigationStyles[_constants.NAVIGATION_MASK_ELEMENT_STYLE_ID];
|
|
268
267
|
|
|
269
268
|
// Normalize bounds result to new slot format for spreading
|
|
270
269
|
const normalizedNav = (0, _normalizeInterpolatedStyle.normalizeInterpolatedStyle)(navigationStyles).result;
|
|
@@ -290,7 +289,7 @@ const SharedIGImage = ({
|
|
|
290
289
|
}]
|
|
291
290
|
}
|
|
292
291
|
},
|
|
293
|
-
[_constants.
|
|
292
|
+
[_constants.NAVIGATION_MASK_CONTAINER_STYLE_ID]: containerStyle ? {
|
|
294
293
|
style: {
|
|
295
294
|
...containerStyle,
|
|
296
295
|
transform: [...(containerStyle.transform ?? []), {
|
|
@@ -300,7 +299,7 @@ const SharedIGImage = ({
|
|
|
300
299
|
}]
|
|
301
300
|
}
|
|
302
301
|
} : undefined,
|
|
303
|
-
[_constants.
|
|
302
|
+
[_constants.NAVIGATION_MASK_ELEMENT_STYLE_ID]: maskStyle ? {
|
|
304
303
|
style: {
|
|
305
304
|
...maskStyle,
|
|
306
305
|
borderRadius: (0, _reactNativeReanimated.interpolate)(progress, [0, 1], [0, 24])
|
|
@@ -571,8 +570,8 @@ const SharedXImage = ({
|
|
|
571
570
|
if (!focused) return {};
|
|
572
571
|
const navigationStyles = bounds({
|
|
573
572
|
id: sharedBoundTag
|
|
574
|
-
}).navigation.zoom();
|
|
575
|
-
const maskStyle = navigationStyles[_constants.
|
|
573
|
+
}).navigation.zoom() ?? {};
|
|
574
|
+
const maskStyle = navigationStyles[_constants.NAVIGATION_MASK_ELEMENT_STYLE_ID];
|
|
576
575
|
|
|
577
576
|
// Normalize bounds result to new slot format for spreading
|
|
578
577
|
const normalizedNav = (0, _normalizeInterpolatedStyle.normalizeInterpolatedStyle)(navigationStyles).result;
|
|
@@ -582,7 +581,7 @@ const SharedXImage = ({
|
|
|
582
581
|
const borderRadius = (0, _reactNativeReanimated.interpolate)(current.progress, [0, 1], [12, 0]);
|
|
583
582
|
return {
|
|
584
583
|
...normalizedNav,
|
|
585
|
-
[_constants.
|
|
584
|
+
[_constants.NAVIGATION_MASK_ELEMENT_STYLE_ID]: maskStyle ? {
|
|
586
585
|
style: {
|
|
587
586
|
...maskStyle,
|
|
588
587
|
borderRadius
|