react-native-screen-transitions 3.4.0-alpha.3 → 3.4.0-alpha.5
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 +6 -6
- 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-physics.js +3 -2
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-physics.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-reset.js +7 -5
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-reset.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/gesture-targets.js +9 -6
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-targets.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 +108 -362
- 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 +6 -6
- 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-physics.js +3 -2
- package/lib/module/shared/providers/gestures/helpers/gesture-physics.js.map +1 -1
- package/lib/module/shared/providers/gestures/helpers/gesture-reset.js +7 -5
- package/lib/module/shared/providers/gestures/helpers/gesture-reset.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/gesture-targets.js +9 -6
- package/lib/module/shared/providers/gestures/helpers/gesture-targets.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 +101 -355
- 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-physics.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/helpers/gesture-reset.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/helpers/gesture-targets.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 +6 -12
- 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-physics.ts +4 -2
- package/src/shared/providers/gestures/helpers/gesture-reset.ts +9 -5
- package/src/shared/providers/gestures/helpers/gesture-snap-points.ts +12 -10
- package/src/shared/providers/gestures/helpers/gesture-targets.ts +14 -6
- 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 +179 -502
- package/src/shared/utils/bounds/zoom/config.ts +14 -164
- package/src/shared/utils/bounds/zoom/math.ts +193 -0
- package/src/shared/utils/bounds/zoom/types.ts +15 -17
- package/src/shared/utils/create-store.ts +62 -0
- package/lib/commonjs/shared/utils/bounds/types/frame-props.js +0 -6
- package/lib/commonjs/shared/utils/bounds/types/frame-props.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/zoom/accessor.js +0 -54
- package/lib/commonjs/shared/utils/bounds/zoom/accessor.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/zoom/index.js +0 -20
- package/lib/commonjs/shared/utils/bounds/zoom/index.js.map +0 -1
- package/lib/module/shared/utils/bounds/types/frame-props.js +0 -4
- package/lib/module/shared/utils/bounds/types/frame-props.js.map +0 -1
- package/lib/module/shared/utils/bounds/zoom/accessor.js +0 -49
- package/lib/module/shared/utils/bounds/zoom/accessor.js.map +0 -1
- package/lib/module/shared/utils/bounds/zoom/index.js +0 -5
- package/lib/module/shared/utils/bounds/zoom/index.js.map +0 -1
- package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts +0 -5
- package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts +0 -17
- package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/zoom/index.d.ts +0 -3
- package/lib/typescript/shared/utils/bounds/zoom/index.d.ts.map +0 -1
- package/src/shared/utils/bounds/types/frame-props.ts +0 -5
- package/src/shared/utils/bounds/zoom/accessor.ts +0 -69
- package/src/shared/utils/bounds/zoom/index.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3C,YAAY,EACX,iBAAiB,EACjB,eAAe,EACf,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,2BAA2B,EAC3B,mBAAmB,EACnB,cAAc,GACd,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACX,cAAc,EACd,YAAY,EACZ,wBAAwB,EACxB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3C,YAAY,EACX,iBAAiB,EACjB,eAAe,EACf,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,2BAA2B,EAC3B,mBAAmB,EACnB,cAAc,GACd,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACX,cAAc,EACd,YAAY,EACZ,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,GACzB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACX,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,cAAc,GACd,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,YAAY,EACX,MAAM,EACN,SAAS,EACT,sBAAsB,EACtB,oBAAoB,GACpB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACX,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,cAAc,EACd,aAAa,GACb,MAAM,eAAe,CAAC"}
|
|
@@ -173,6 +173,17 @@ export type ScreenTransitionConfig = {
|
|
|
173
173
|
* @default false
|
|
174
174
|
*/
|
|
175
175
|
experimental_enableHighRefreshRate?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Animates the first screen in a navigator from its closed state on initial mount
|
|
178
|
+
* instead of snapping directly to its settled progress.
|
|
179
|
+
*
|
|
180
|
+
* Useful for launch/onboarding flows where the initial screen should participate
|
|
181
|
+
* in the same transition system as pushed screens.
|
|
182
|
+
*
|
|
183
|
+
* @experimental This API may change in future versions.
|
|
184
|
+
* @default false
|
|
185
|
+
*/
|
|
186
|
+
experimental_animateOnInitialMount?: boolean;
|
|
176
187
|
/**
|
|
177
188
|
* Describes heights where a screen can rest, as fractions of screen height,
|
|
178
189
|
* or `'auto'` to snap to the intrinsic height of the screen content.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/screen.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBA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AAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAE7C;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;CAC5C,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type SharedValue } from "react-native-reanimated";
|
|
1
2
|
import type { AnimationStoreMap } from "../../stores/animation.store";
|
|
2
3
|
import type { TransitionSpec } from "../../types/animation.types";
|
|
3
4
|
interface AnimateToProgressProps {
|
|
@@ -11,9 +12,10 @@ interface AnimateToProgressProps {
|
|
|
11
12
|
spec?: TransitionSpec;
|
|
12
13
|
onAnimationFinish?: (finished: boolean) => void;
|
|
13
14
|
animations: AnimationStoreMap;
|
|
15
|
+
targetProgress: SharedValue<number>;
|
|
14
16
|
/** Optional initial velocity for spring-based progress (units: progress/sec). */
|
|
15
17
|
initialVelocity?: number;
|
|
16
18
|
}
|
|
17
|
-
export declare const animateToProgress: ({ target, spec, onAnimationFinish, animations, initialVelocity, }: AnimateToProgressProps) => void;
|
|
19
|
+
export declare const animateToProgress: ({ target, spec, onAnimationFinish, animations, targetProgress, initialVelocity, }: AnimateToProgressProps) => void;
|
|
18
20
|
export {};
|
|
19
21
|
//# sourceMappingURL=animate-to-progress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animate-to-progress.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/animation/animate-to-progress.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"animate-to-progress.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/animation/animate-to-progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAGlE,UAAU,sBAAsB;IAC/B;;;;;OAKG;IACH,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAClC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,iFAAiF;IACjF,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,iBAAiB,GAAI,mFAO/B,sBAAsB,SA+DxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute-bounds-styles.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/helpers/compute-bounds-styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compute-bounds-styles.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/helpers/compute-bounds-styles.ts"],"names":[],"mappings":"AAQA,OAAO,EAEN,KAAK,sBAAsB,EAC3B,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAEX,mBAAmB,EACnB,aAAa,EACb,MAAM,kBAAkB,CAAC;AAoG1B,eAAO,MAAM,kBAAkB,GAC9B,uDAAuD,mBAAmB,EAC1E,iBAAgB,aAAkC,EAClD,eAAe,sBAAsB;;;;;;;;;;EAiGrC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { BoundsAccessor } from "../../types/bounds.types";
|
|
2
|
-
|
|
3
|
-
export declare const createBoundsAccessor: (getProps: () => BoundsFrameProps) => BoundsAccessor;
|
|
1
|
+
import type { BoundsAccessor, BoundsInterpolationProps } from "../../types/bounds.types";
|
|
2
|
+
export declare const createBoundsAccessor: (getProps: () => BoundsInterpolationProps) => BoundsAccessor;
|
|
4
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/bounds/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/bounds/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,cAAc,EACd,wBAAwB,EAExB,MAAM,0BAA0B,CAAC;AAoBlC,eAAO,MAAM,oBAAoB,GAChC,UAAU,MAAM,wBAAwB,KACtC,cA6EF,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare const buildZoomStyles: ({ id, group, zoomOptions, props, resolveTag, computeRaw, }: BuildZoomStylesParams) => ReturnType<ScreenStyleInterpolator>;
|
|
1
|
+
import type { BuildZoomStylesParams, ZoomInterpolatedStyle } from "./types";
|
|
2
|
+
export declare const buildZoomStyles: ({ resolvedTag, zoomOptions, props, }: BuildZoomStylesParams) => ZoomInterpolatedStyle;
|
|
4
3
|
//# sourceMappingURL=build.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/build.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA8D5E,eAAO,MAAM,eAAe,GAAI,sCAI7B,qBAAqB,KAAG,qBAyS1B,CAAC"}
|
|
@@ -1,43 +1,17 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
borderTopRightRadius?: ZoomRadiusValue;
|
|
17
|
-
borderBottomLeftRadius?: ZoomRadiusValue;
|
|
18
|
-
borderBottomRightRadius?: ZoomRadiusValue;
|
|
19
|
-
borderCurve?: "circular" | "continuous";
|
|
20
|
-
outset: ResolvedZoomOutset;
|
|
21
|
-
};
|
|
22
|
-
motion: {
|
|
23
|
-
dragResistance: number;
|
|
24
|
-
dragDirectionalScaleMin: number;
|
|
25
|
-
dragDirectionalScaleMax: number;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
1
|
+
import type { BoundsOptions } from "../types/options";
|
|
2
|
+
export declare const ZOOM_SHARED_OPTIONS: Readonly<{
|
|
3
|
+
anchor: "top";
|
|
4
|
+
scaleMode: "uniform";
|
|
5
|
+
}>;
|
|
6
|
+
export declare const ZOOM_DRAG_RESISTANCE = 0.4;
|
|
7
|
+
export declare const ZOOM_DRAG_DIRECTIONAL_SCALE_MIN = 0.25;
|
|
8
|
+
export declare const ZOOM_DRAG_DIRECTIONAL_SCALE_MAX = 1.06;
|
|
9
|
+
export declare const ZOOM_MASK_OUTSET: Readonly<{
|
|
10
|
+
top: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
bottom: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const getZoomAnchor: (target: BoundsOptions["target"] | undefined) => BoundsOptions["anchor"];
|
|
28
16
|
export declare const toNumber: (value: unknown, fallback?: number) => number;
|
|
29
|
-
export declare const resolveZoomConfig: ({ id, group, zoomOptions, currentRouteKey, resolveTag, defaultAnchor, }: {
|
|
30
|
-
id: BoundId;
|
|
31
|
-
group?: string;
|
|
32
|
-
zoomOptions?: BoundsNavigationZoomOptions;
|
|
33
|
-
currentRouteKey?: string;
|
|
34
|
-
resolveTag: ResolveTag;
|
|
35
|
-
defaultAnchor: BoundsOptions["anchor"] | undefined;
|
|
36
|
-
}) => {
|
|
37
|
-
resolvedTag: string;
|
|
38
|
-
sharedOptions: Partial<BoundsOptions>;
|
|
39
|
-
explicitTarget: BoundsOptions["target"] | undefined;
|
|
40
|
-
zoomOptions: ResolvedZoomOptions;
|
|
41
|
-
} | null;
|
|
42
|
-
export {};
|
|
43
17
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAO,MAAM,mBAAmB;;;EAG9B,CAAC;AAEH,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,+BAA+B,OAAO,CAAC;AACpD,eAAO,MAAM,+BAA+B,OAAO,CAAC;AAEpD,eAAO,MAAM,gBAAgB;;;;;EAK3B,CAAC;AAEH,eAAO,MAAM,aAAa,GACzB,QAAQ,aAAa,CAAC,QAAQ,CAAC,GAAG,SAAS,KACzC,aAAa,CAAC,QAAQ,CAGxB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,OAAO,OAAO,EAAE,iBAAY,KAAG,MAGvD,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type CombinedScaleMode = "multiply" | "average" | "max" | "min";
|
|
2
|
+
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
3
|
+
export declare const clamp01: (value: number) => number;
|
|
4
|
+
export declare const lerp: (from: number, to: number, t: number) => number;
|
|
5
|
+
export declare const safeDivide: (numerator: number, denominator: number, fallback?: number) => number;
|
|
6
|
+
export declare const inverseLerp: (value: number, inMin: number, inMax: number) => number;
|
|
7
|
+
export declare const mapRangeClamped: (value: number, inMin: number, inMax: number, outMin: number, outMax: number) => number;
|
|
8
|
+
export declare const applyPowerCurve: (value: number, exponent: number) => number;
|
|
9
|
+
export declare const normalizedToTranslation: ({ normalized, dimension, resistance, }: {
|
|
10
|
+
normalized: number;
|
|
11
|
+
dimension: number;
|
|
12
|
+
resistance: number;
|
|
13
|
+
}) => number;
|
|
14
|
+
export declare const normalizedToScale: ({ normalized, outputRange, exponent, positiveOnly, }: {
|
|
15
|
+
normalized: number;
|
|
16
|
+
outputRange: readonly [number, number];
|
|
17
|
+
exponent?: number;
|
|
18
|
+
positiveOnly?: boolean;
|
|
19
|
+
}) => number;
|
|
20
|
+
export declare const combineScales: (scaleX: number, scaleY: number, mode?: CombinedScaleMode) => number;
|
|
21
|
+
export declare const computeCenterScaleShift: ({ center, containerCenter, scale, }: {
|
|
22
|
+
center: number;
|
|
23
|
+
containerCenter: number;
|
|
24
|
+
scale: number;
|
|
25
|
+
}) => number;
|
|
26
|
+
export declare const compensateTranslationForParentScale: ({ translation, parentScale, epsilon, }: {
|
|
27
|
+
translation: number;
|
|
28
|
+
parentScale: number;
|
|
29
|
+
epsilon: number;
|
|
30
|
+
}) => number;
|
|
31
|
+
export declare const composeCompensatedTranslation: ({ gesture, parentScale, centerShift, epsilon, }: {
|
|
32
|
+
gesture: number;
|
|
33
|
+
parentScale: number;
|
|
34
|
+
centerShift?: number;
|
|
35
|
+
epsilon: number;
|
|
36
|
+
}) => number;
|
|
37
|
+
export declare const resolveDirectionalDragScale: ({ normalized, dismissDirection, shrinkMin, growMax, exponent, }: {
|
|
38
|
+
normalized: number;
|
|
39
|
+
dismissDirection: "positive" | "negative";
|
|
40
|
+
shrinkMin: number;
|
|
41
|
+
growMax: number;
|
|
42
|
+
exponent: number;
|
|
43
|
+
}) => number;
|
|
44
|
+
//# sourceMappingURL=math.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/math.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,SAAS,GAAG,KAAK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AAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACd,KAAG,MAGH,CAAC;AAEF,eAAO,MAAM,mCAAmC,GAAI,wCAIjD;IACF,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CAChB,KAAG,MAIH,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAI,iDAK3C;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CAChB,KAAG,MASH,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,iEAMzC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,UAAU,GAAG,UAAU,CAAC;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACjB,WAgBA,CAAC"}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}) => string | undefined;
|
|
8
|
-
export type ComputeRaw = (overrides: Partial<BoundsOptions>, frameProps?: BoundsFrameProps) => Record<string, unknown>;
|
|
1
|
+
import { NAVIGATION_MASK_CONTAINER_STYLE_ID, NAVIGATION_MASK_ELEMENT_STYLE_ID } from "../../../constants";
|
|
2
|
+
import type { BoundsInterpolationProps, BoundsNavigationZoomOptions, BoundsNavigationZoomStyle } from "../../../types/bounds.types";
|
|
3
|
+
export type ZoomInterpolatedStyle = BoundsNavigationZoomStyle & {
|
|
4
|
+
[NAVIGATION_MASK_CONTAINER_STYLE_ID]?: BoundsNavigationZoomStyle[typeof NAVIGATION_MASK_CONTAINER_STYLE_ID];
|
|
5
|
+
[NAVIGATION_MASK_ELEMENT_STYLE_ID]?: BoundsNavigationZoomStyle[typeof NAVIGATION_MASK_ELEMENT_STYLE_ID];
|
|
6
|
+
};
|
|
9
7
|
export type BuildZoomStylesParams = {
|
|
10
|
-
|
|
11
|
-
group?: string;
|
|
8
|
+
resolvedTag?: string;
|
|
12
9
|
zoomOptions?: BoundsNavigationZoomOptions;
|
|
13
|
-
props:
|
|
14
|
-
resolveTag: ResolveTag;
|
|
15
|
-
computeRaw: ComputeRaw;
|
|
10
|
+
props: BoundsInterpolationProps;
|
|
16
11
|
};
|
|
17
12
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/zoom/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kCAAkC,EAClC,gCAAgC,EAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACX,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,MAAM,6BAA6B,CAAC;AAErC,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,GAAG;IAC/D,CAAC,kCAAkC,CAAC,CAAC,EAAE,yBAAyB,CAAC,OAAO,kCAAkC,CAAC,CAAC;IAC5G,CAAC,gCAAgC,CAAC,CAAC,EAAE,yBAAyB,CAAC,OAAO,gCAAgC,CAAC,CAAC;CACxG,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,2BAA2B,CAAC;IAC1C,KAAK,EAAE,wBAAwB,CAAC;CAChC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ScreenKey } from "../types/screen.types";
|
|
2
|
+
interface CreateStoreOptions<TBag> {
|
|
3
|
+
createBag: () => TBag;
|
|
4
|
+
disposeBag: (bag: TBag) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function createStore<TBag>({ createBag, disposeBag, }: CreateStoreOptions<TBag>): {
|
|
7
|
+
peekBag: (routeKey: ScreenKey) => TBag | undefined;
|
|
8
|
+
getBag: (routeKey: ScreenKey) => TBag;
|
|
9
|
+
getValue: <K extends keyof TBag>(routeKey: ScreenKey, key: K) => TBag[K];
|
|
10
|
+
getCachedBag: () => TBag;
|
|
11
|
+
clearBag: (routeKey: ScreenKey) => void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=create-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-store.d.ts","sourceRoot":"","sources":["../../../../src/shared/utils/create-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,UAAU,kBAAkB,CAAC,IAAI;IAChC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC;CAChC;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,EACjC,SAAS,EACT,UAAU,GACV,EAAE,kBAAkB,CAAC,IAAI,CAAC;wBAIC,SAAS,KAAG,IAAI,GAAG,SAAS;uBAI7B,SAAS,KAAG,IAAI;eASxB,CAAC,SAAS,MAAM,IAAI,YAC3B,SAAS,OACd,CAAC,KACJ,IAAI,CAAC,CAAC,CAAC;wBASe,IAAI;yBAOD,SAAS;EAerC"}
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ const POINT_NONE = "none" as const;
|
|
|
15
15
|
const POINT_BOX_NONE = "box-none" as const;
|
|
16
16
|
|
|
17
17
|
export const ComponentScreen = ({ routeKey, children }: ScreenProps) => {
|
|
18
|
-
const sceneClosing = AnimationStore.
|
|
18
|
+
const sceneClosing = AnimationStore.getValue(routeKey, "closing");
|
|
19
19
|
const screenRef = useAnimatedRef<View>();
|
|
20
20
|
|
|
21
21
|
const animatedProps = useAnimatedProps(() => {
|
|
@@ -2,6 +2,7 @@ import { runOnUI } from "react-native-reanimated";
|
|
|
2
2
|
import { DefaultSnapSpec } from "../configs/specs";
|
|
3
3
|
import { AnimationStore } from "../stores/animation.store";
|
|
4
4
|
import type { HistoryEntry } from "../stores/history.store";
|
|
5
|
+
import { SystemStore } from "../stores/system.store";
|
|
5
6
|
import { animateToProgress } from "../utils/animation/animate-to-progress";
|
|
6
7
|
import { logger } from "../utils/logger";
|
|
7
8
|
import { resolveSnapTargetEntry } from "./resolve-snap-target";
|
|
@@ -12,10 +13,10 @@ const getSortedSnapPoints = (
|
|
|
12
13
|
const snapPoints = descriptor.options?.snapPoints;
|
|
13
14
|
if (!snapPoints || snapPoints.length === 0) return null;
|
|
14
15
|
|
|
15
|
-
// Resolve 'auto' to the measured fraction stored in
|
|
16
|
-
const autoVal =
|
|
16
|
+
// Resolve 'auto' to the measured fraction stored in SystemStore
|
|
17
|
+
const autoVal = SystemStore.getValue(
|
|
17
18
|
descriptor.route.key,
|
|
18
|
-
"
|
|
19
|
+
"resolvedAutoSnapPoint",
|
|
19
20
|
).value;
|
|
20
21
|
|
|
21
22
|
const resolved = snapPoints
|
|
@@ -43,13 +44,18 @@ export function snapDescriptorToIndex(
|
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
const targetProgress = sorted[index];
|
|
46
|
-
const animations = AnimationStore.
|
|
47
|
+
const animations = AnimationStore.getBag(descriptor.route.key);
|
|
48
|
+
const targetProgressValue = SystemStore.getValue(
|
|
49
|
+
descriptor.route.key,
|
|
50
|
+
"targetProgress",
|
|
51
|
+
);
|
|
47
52
|
|
|
48
53
|
runOnUI(() => {
|
|
49
54
|
"worklet";
|
|
50
55
|
animateToProgress({
|
|
51
56
|
target: targetProgress,
|
|
52
57
|
animations,
|
|
58
|
+
targetProgress: targetProgressValue,
|
|
53
59
|
spec: {
|
|
54
60
|
open: descriptor.options.transitionSpec?.expand ?? DefaultSnapSpec,
|
|
55
61
|
close: descriptor.options.transitionSpec?.collapse ?? DefaultSnapSpec,
|
|
@@ -83,7 +83,7 @@ export const resolveMeasurementWritePlan = (params: {
|
|
|
83
83
|
const refreshSource = intents.refreshSource && hasSourceLink;
|
|
84
84
|
const refreshDestination =
|
|
85
85
|
intents.refreshDestination && (hasDestinationLink || hasPendingLink);
|
|
86
|
-
const registerSnapshot = intents.snapshotOnly;
|
|
86
|
+
const registerSnapshot = intents.snapshotOnly || intents.refreshSource;
|
|
87
87
|
const writesAny =
|
|
88
88
|
registerSnapshot ||
|
|
89
89
|
captureSource ||
|
package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
useAnimatedReaction,
|
|
3
|
+
useDerivedValue,
|
|
4
|
+
useSharedValue,
|
|
5
|
+
} from "react-native-reanimated";
|
|
6
|
+
import { EPSILON } from "../../../constants";
|
|
7
|
+
import { AnimationStore } from "../../../stores/animation.store";
|
|
2
8
|
import { BoundStore } from "../../../stores/bounds";
|
|
9
|
+
import { GestureStore } from "../../../stores/gesture.store";
|
|
3
10
|
import type { BoundaryId, MaybeMeasureAndStoreParams } from "../types";
|
|
4
11
|
import {
|
|
5
12
|
canFlushGroupActiveMeasurement,
|
|
@@ -18,33 +25,93 @@ export const useGroupActiveMeasurement = (params: {
|
|
|
18
25
|
enabled: boolean;
|
|
19
26
|
group: string | undefined;
|
|
20
27
|
id: BoundaryId;
|
|
28
|
+
currentScreenKey: string;
|
|
21
29
|
shouldUpdateDestination: boolean;
|
|
22
|
-
isAnimating: SharedValue<number>;
|
|
23
30
|
maybeMeasureAndStore: (options: MaybeMeasureAndStoreParams) => void;
|
|
24
31
|
}) => {
|
|
25
32
|
const {
|
|
26
33
|
enabled,
|
|
27
34
|
group,
|
|
28
35
|
id,
|
|
36
|
+
currentScreenKey,
|
|
29
37
|
shouldUpdateDestination,
|
|
30
|
-
isAnimating,
|
|
31
38
|
maybeMeasureAndStore,
|
|
32
39
|
} = params;
|
|
33
40
|
const idStr = String(id);
|
|
34
41
|
|
|
35
42
|
const allGroups = BoundStore.getGroups();
|
|
43
|
+
const progress = AnimationStore.getValue(currentScreenKey, "progress");
|
|
44
|
+
const animating = AnimationStore.getValue(currentScreenKey, "animating");
|
|
45
|
+
const entering = AnimationStore.getValue(currentScreenKey, "entering");
|
|
46
|
+
const closing = AnimationStore.getValue(currentScreenKey, "closing");
|
|
47
|
+
const dragging = GestureStore.getValue(currentScreenKey, "dragging");
|
|
48
|
+
const dismissing = GestureStore.getValue(currentScreenKey, "dismissing");
|
|
49
|
+
const hasSettledOpenOnce = useSharedValue(false);
|
|
50
|
+
|
|
51
|
+
useAnimatedReaction(
|
|
52
|
+
() => {
|
|
53
|
+
"worklet";
|
|
54
|
+
if (!enabled || !shouldUpdateDestination) return false;
|
|
55
|
+
return (
|
|
56
|
+
progress.value >= 1 - EPSILON &&
|
|
57
|
+
animating.value === 0 &&
|
|
58
|
+
entering.value === 0 &&
|
|
59
|
+
closing.value === 0 &&
|
|
60
|
+
dragging.value === 0 &&
|
|
61
|
+
dismissing.value === 0
|
|
62
|
+
);
|
|
63
|
+
},
|
|
64
|
+
(isSettledOpen) => {
|
|
65
|
+
"worklet";
|
|
66
|
+
if (isSettledOpen) {
|
|
67
|
+
hasSettledOpenOnce.value = true;
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
[
|
|
71
|
+
enabled,
|
|
72
|
+
shouldUpdateDestination,
|
|
73
|
+
progress,
|
|
74
|
+
animating,
|
|
75
|
+
entering,
|
|
76
|
+
closing,
|
|
77
|
+
dragging,
|
|
78
|
+
dismissing,
|
|
79
|
+
hasSettledOpenOnce,
|
|
80
|
+
],
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
const isRefreshBlocked = useDerivedValue<number>(() => {
|
|
84
|
+
"worklet";
|
|
85
|
+
if (!enabled || !shouldUpdateDestination) return 0;
|
|
86
|
+
if (!hasSettledOpenOnce.value) return 1;
|
|
87
|
+
if (progress.value < 1 - EPSILON) return 1;
|
|
88
|
+
if (animating.value !== 0) return 1;
|
|
89
|
+
if (entering.value !== 0) return 1;
|
|
90
|
+
if (closing.value !== 0) return 1;
|
|
91
|
+
if (dragging.value !== 0) return 1;
|
|
92
|
+
if (dismissing.value !== 0) return 1;
|
|
93
|
+
return 0;
|
|
94
|
+
});
|
|
95
|
+
|
|
36
96
|
const { clearPendingMeasurement, queueOrFlushMeasurement } =
|
|
37
97
|
useDeferredMeasurementTrigger({
|
|
38
98
|
enabled,
|
|
39
|
-
|
|
99
|
+
/**
|
|
100
|
+
* The reason to do extra guard checks for isAnimating is because a user may mid animation drag, causing
|
|
101
|
+
* the src component to be wrongly measured. This in turns leads to faulty src measurements being used, giving us a weird teleport
|
|
102
|
+
* animation rather than a smooth 'SET' transition when dst is actually dismissing.
|
|
103
|
+
*/
|
|
104
|
+
isAnimating: isRefreshBlocked,
|
|
40
105
|
canFlush: () => {
|
|
41
106
|
"worklet";
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
107
|
+
return (
|
|
108
|
+
canFlushGroupActiveMeasurement({
|
|
109
|
+
enabled,
|
|
110
|
+
isEligible: !!group && shouldUpdateDestination,
|
|
111
|
+
memberId: idStr,
|
|
112
|
+
activeId: group ? (allGroups.value[group]?.activeId ?? null) : null,
|
|
113
|
+
}) && hasSettledOpenOnce.value
|
|
114
|
+
);
|
|
48
115
|
},
|
|
49
116
|
onFlush: () => {
|
|
50
117
|
"worklet";
|
|
@@ -75,6 +142,9 @@ export const useGroupActiveMeasurement = (params: {
|
|
|
75
142
|
}
|
|
76
143
|
|
|
77
144
|
if (action === "queue-or-flush") {
|
|
145
|
+
if (!hasSettledOpenOnce.value) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
78
148
|
queueOrFlushMeasurement();
|
|
79
149
|
}
|
|
80
150
|
},
|
|
@@ -82,7 +152,9 @@ export const useGroupActiveMeasurement = (params: {
|
|
|
82
152
|
enabled,
|
|
83
153
|
group,
|
|
84
154
|
idStr,
|
|
155
|
+
currentScreenKey,
|
|
85
156
|
shouldUpdateDestination,
|
|
157
|
+
hasSettledOpenOnce,
|
|
86
158
|
clearPendingMeasurement,
|
|
87
159
|
queueOrFlushMeasurement,
|
|
88
160
|
],
|
|
@@ -23,13 +23,10 @@ export const useInitialLayoutHandler = (params: {
|
|
|
23
23
|
maybeMeasureAndStore,
|
|
24
24
|
} = params;
|
|
25
25
|
|
|
26
|
-
const isAnimating = AnimationStore.
|
|
27
|
-
currentScreenKey,
|
|
28
|
-
"animating",
|
|
29
|
-
);
|
|
26
|
+
const isAnimating = AnimationStore.getValue(currentScreenKey, "animating");
|
|
30
27
|
|
|
31
28
|
const ancestorAnimations = ancestorKeys.map((key) =>
|
|
32
|
-
AnimationStore.
|
|
29
|
+
AnimationStore.getValue(key, "animating"),
|
|
33
30
|
);
|
|
34
31
|
|
|
35
32
|
const hasMeasuredOnLayout = useSharedValue(false);
|
|
@@ -94,14 +94,8 @@ export function createBoundaryComponent<P extends object>(
|
|
|
94
94
|
};
|
|
95
95
|
}, [anchor, scaleMode, target, method]);
|
|
96
96
|
|
|
97
|
-
const isAnimating = AnimationStore.
|
|
98
|
-
|
|
99
|
-
"animating",
|
|
100
|
-
);
|
|
101
|
-
const progress = AnimationStore.getRouteAnimation(
|
|
102
|
-
currentScreenKey,
|
|
103
|
-
"progress",
|
|
104
|
-
);
|
|
97
|
+
const isAnimating = AnimationStore.getValue(currentScreenKey, "animating");
|
|
98
|
+
const progress = AnimationStore.getValue(currentScreenKey, "progress");
|
|
105
99
|
|
|
106
100
|
const preparedStyles = useMemo(() => prepareStyleForBounds(style), [style]);
|
|
107
101
|
|
|
@@ -174,14 +168,14 @@ export function createBoundaryComponent<P extends object>(
|
|
|
174
168
|
enabled: runtimeEnabled,
|
|
175
169
|
group,
|
|
176
170
|
id,
|
|
171
|
+
currentScreenKey,
|
|
177
172
|
shouldUpdateDestination,
|
|
178
|
-
isAnimating,
|
|
179
173
|
maybeMeasureAndStore,
|
|
180
174
|
});
|
|
181
175
|
|
|
182
|
-
// Source-side
|
|
183
|
-
//
|
|
184
|
-
//
|
|
176
|
+
// Source-side grouped retargeting: when an unfocused/source boundary
|
|
177
|
+
// becomes the active member, refresh its snapshot and source link so
|
|
178
|
+
// close transitions do not use stale pre-scroll geometry.
|
|
185
179
|
useGroupActiveSourceMeasurement({
|
|
186
180
|
enabled: runtimeEnabled,
|
|
187
181
|
group,
|
|
@@ -56,15 +56,9 @@ export const NativeScreen = ({
|
|
|
56
56
|
const topRouteKey = routes[topIndex]?.key ?? routeKey;
|
|
57
57
|
const screenRef = useAnimatedRef<View>();
|
|
58
58
|
|
|
59
|
-
const sceneClosing = AnimationStore.
|
|
60
|
-
const topSceneProgress = AnimationStore.
|
|
61
|
-
|
|
62
|
-
"progress",
|
|
63
|
-
);
|
|
64
|
-
const topSceneClosing = AnimationStore.getRouteAnimation(
|
|
65
|
-
topRouteKey,
|
|
66
|
-
"closing",
|
|
67
|
-
);
|
|
59
|
+
const sceneClosing = AnimationStore.getValue(routeKey, "closing");
|
|
60
|
+
const topSceneProgress = AnimationStore.getValue(topRouteKey, "progress");
|
|
61
|
+
const topSceneClosing = AnimationStore.getValue(topRouteKey, "closing");
|
|
68
62
|
const screenActivity = useSharedValue<ScreenActivity>(
|
|
69
63
|
ScreenActivity.TRANSITIONING_OR_BELOW_TOP,
|
|
70
64
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { memo } from "react";
|
|
2
2
|
import { StyleSheet } from "react-native";
|
|
3
3
|
import Animated, { useAnimatedStyle } from "react-native-reanimated";
|
|
4
|
-
import { HIDDEN_STYLE,
|
|
4
|
+
import { HIDDEN_STYLE, VISIBLE_STYLE } from "../../constants";
|
|
5
5
|
import { useScreenStyles } from "../../providers/screen/styles.provider";
|
|
6
6
|
|
|
7
7
|
type Props = {
|
|
@@ -20,7 +20,7 @@ export const DeferredVisibilityHost = memo(({ children }: Props) => {
|
|
|
20
20
|
|
|
21
21
|
const animatedStyle = useAnimatedStyle(() => {
|
|
22
22
|
"worklet";
|
|
23
|
-
return resolutionMode.value === "deferred" ? HIDDEN_STYLE :
|
|
23
|
+
return resolutionMode.value === "deferred" ? HIDDEN_STYLE : VISIBLE_STYLE;
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
return (
|