react-native-screen-transitions 3.4.0-alpha.0 → 3.4.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1046
- package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js +69 -2
- package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js +9 -0
- package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js.map +1 -1
- package/lib/commonjs/shared/animation/snap-to.js +5 -1
- package/lib/commonjs/shared/animation/snap-to.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +195 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +54 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +40 -8
- 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-group-active-source-measurement.js +72 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
- 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/hooks/use-pending-destination-measurement.js +7 -4
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js +22 -8
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +5 -10
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -1
- package/lib/commonjs/shared/components/create-transition-aware-component.js +3 -2
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/native-screen-container.js +12 -6
- package/lib/commonjs/shared/components/native-screen-container.js.map +1 -1
- package/lib/commonjs/shared/components/native-screen.js +35 -8
- package/lib/commonjs/shared/components/native-screen.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js +2 -2
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/index.js +1 -3
- package/lib/commonjs/shared/components/overlay/index.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js +2 -16
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/commonjs/shared/components/scene-view.js +2 -4
- package/lib/commonjs/shared/components/scene-view.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +60 -0
- package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +9 -6
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +16 -56
- 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 +86 -0
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -0
- 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 +17 -4
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
- package/lib/commonjs/shared/constants.js +6 -2
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/hooks/gestures/resolve-screen-gesture-target.js +49 -0
- package/lib/commonjs/shared/hooks/gestures/resolve-screen-gesture-target.js.map +1 -0
- package/lib/commonjs/shared/hooks/gestures/types.js +2 -0
- package/lib/commonjs/shared/hooks/gestures/types.js.map +1 -0
- package/lib/commonjs/shared/hooks/gestures/use-screen-gesture.js +7 -3
- package/lib/commonjs/shared/hooks/gestures/use-screen-gesture.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/commonjs/shared/index.js +15 -3
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js +61 -25
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js +11 -6
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js +44 -0
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -0
- package/lib/commonjs/shared/providers/layout-anchor.provider.js +4 -6
- package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +31 -17
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js +1 -9
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +25 -13
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +33 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/animation/types.js +2 -0
- package/lib/commonjs/shared/providers/screen/animation/types.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +9 -3
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/core.provider.js +14 -21
- package/lib/commonjs/shared/providers/stack/core.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 +10 -2
- package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/presence.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +7 -0
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js +6 -0
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js +33 -9
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/geometry.js +3 -2
- package/lib/commonjs/shared/utils/bounds/helpers/geometry.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js +3 -2
- package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js +2 -2
- package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js +4 -8
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js +4 -3
- package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/index.js +13 -3
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/types/frame-props.js +6 -0
- package/lib/commonjs/shared/utils/bounds/types/frame-props.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/zoom/accessor.js +54 -0
- package/lib/commonjs/shared/utils/bounds/zoom/accessor.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/zoom/build.js +548 -0
- package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/zoom/config.js +118 -0
- package/lib/commonjs/shared/utils/bounds/zoom/config.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/zoom/index.js +20 -0
- package/lib/commonjs/shared/utils/bounds/zoom/index.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/zoom/types.js.map +1 -0
- package/lib/commonjs/shared/utils/gesture/validate-snap-points.js +11 -5
- package/lib/commonjs/shared/utils/gesture/validate-snap-points.js.map +1 -1
- package/lib/commonjs/shared/utils/overlay/visibility.js +2 -9
- package/lib/commonjs/shared/utils/overlay/visibility.js.map +1 -1
- package/lib/commonjs/shared/utils/resolve-screen-transition-options.js +25 -0
- package/lib/commonjs/shared/utils/resolve-screen-transition-options.js.map +1 -0
- package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js +69 -3
- package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/module/component-stack/navigators/create-component-stack-navigator.js +9 -0
- package/lib/module/component-stack/navigators/create-component-stack-navigator.js.map +1 -1
- package/lib/module/shared/animation/snap-to.js +5 -1
- package/lib/module/shared/animation/snap-to.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +182 -0
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
- package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +49 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +41 -8
- 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-group-active-source-measurement.js +67 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
- 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/hooks/use-pending-destination-measurement.js +7 -4
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
- package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/index.js +22 -8
- package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +5 -10
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +1 -1
- package/lib/module/shared/components/create-transition-aware-component.js +3 -2
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/native-screen-container.js +12 -6
- package/lib/module/shared/components/native-screen-container.js.map +1 -1
- package/lib/module/shared/components/native-screen.js +35 -8
- package/lib/module/shared/components/native-screen.js.map +1 -1
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js +3 -3
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/module/shared/components/overlay/index.js +1 -3
- package/lib/module/shared/components/overlay/index.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/overlay-host.js +3 -17
- package/lib/module/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/module/shared/components/scene-view.js +3 -5
- package/lib/module/shared/components/scene-view.js.map +1 -1
- package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +56 -0
- package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
- package/lib/module/shared/components/screen-container/layers/backdrop.js +9 -6
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +18 -58
- 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 +81 -0
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -0
- 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 +17 -4
- package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +1 -1
- package/lib/module/shared/constants.js +6 -2
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/hooks/gestures/resolve-screen-gesture-target.js +45 -0
- package/lib/module/shared/hooks/gestures/resolve-screen-gesture-target.js.map +1 -0
- package/lib/module/shared/hooks/gestures/types.js +2 -0
- package/lib/module/shared/hooks/gestures/types.js.map +1 -0
- package/lib/module/shared/hooks/gestures/use-screen-gesture.js +7 -4
- package/lib/module/shared/hooks/gestures/use-screen-gesture.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/module/shared/index.js +1 -2
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js +61 -25
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/module/shared/providers/gestures/helpers/gesture-activation.js +11 -6
- package/lib/module/shared/providers/gestures/helpers/gesture-activation.js.map +1 -1
- package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js +38 -0
- package/lib/module/shared/providers/gestures/helpers/gesture-snap-points.js.map +1 -0
- package/lib/module/shared/providers/layout-anchor.provider.js +4 -6
- package/lib/module/shared/providers/layout-anchor.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/animation.provider.js +30 -15
- package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js +1 -9
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +25 -13
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js +29 -0
- package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -0
- package/lib/module/shared/providers/screen/animation/index.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/types.js +2 -0
- package/lib/module/shared/providers/screen/animation/types.js.map +1 -0
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js +9 -3
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/module/shared/providers/stack/core.provider.js +14 -21
- package/lib/module/shared/providers/stack/core.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/direct.provider.js +2 -2
- package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/helpers/use-processed-routes.js +2 -2
- package/lib/module/shared/providers/stack/helpers/use-processed-routes.js.map +1 -1
- package/lib/module/shared/stores/animation.store.js +10 -2
- package/lib/module/shared/stores/animation.store.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/presence.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +7 -0
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/utils/animation/animate-to-progress.js +6 -0
- package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js +33 -9
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/geometry.js +3 -2
- package/lib/module/shared/utils/bounds/helpers/geometry.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/interpolators.js +3 -2
- package/lib/module/shared/utils/bounds/helpers/interpolators.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/link-accessor.js +2 -2
- package/lib/module/shared/utils/bounds/helpers/link-accessor.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js +4 -8
- package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/style-composers.js +4 -3
- package/lib/module/shared/utils/bounds/helpers/style-composers.js.map +1 -1
- package/lib/module/shared/utils/bounds/index.js +13 -3
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/types/frame-props.js +4 -0
- package/lib/module/shared/utils/bounds/types/frame-props.js.map +1 -0
- package/lib/module/shared/utils/bounds/zoom/accessor.js +49 -0
- package/lib/module/shared/utils/bounds/zoom/accessor.js.map +1 -0
- package/lib/module/shared/utils/bounds/zoom/build.js +543 -0
- package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -0
- package/lib/module/shared/utils/bounds/zoom/config.js +112 -0
- package/lib/module/shared/utils/bounds/zoom/config.js.map +1 -0
- package/lib/module/shared/utils/bounds/zoom/index.js +5 -0
- package/lib/module/shared/utils/bounds/zoom/index.js.map +1 -0
- package/lib/module/shared/utils/bounds/zoom/types.js.map +1 -0
- package/lib/module/shared/utils/gesture/validate-snap-points.js +11 -5
- package/lib/module/shared/utils/gesture/validate-snap-points.js.map +1 -1
- package/lib/module/shared/utils/overlay/visibility.js +1 -7
- package/lib/module/shared/utils/overlay/visibility.js.map +1 -1
- package/lib/module/shared/utils/resolve-screen-transition-options.js +19 -0
- package/lib/module/shared/utils/resolve-screen-transition-options.js.map +1 -0
- package/lib/typescript/blank-stack/index.d.ts +1 -1
- package/lib/typescript/blank-stack/index.d.ts.map +1 -1
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +29 -4
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/blank-stack/types.d.ts +33 -4
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +8 -0
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/shared/animation/snap-to.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +81 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts +2 -3
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts +11 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts +2 -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-group-active-source-measurement.d.ts +11 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts.map +1 -0
- 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/hooks/use-pending-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts +3 -3
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts +2 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts +5 -3
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts +2 -4
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts +1 -0
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/native-screen-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/index.d.ts +0 -2
- package/lib/typescript/shared/components/overlay/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts +3 -0
- package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -0
- 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 +9 -0
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -0
- 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.map +1 -1
- package/lib/typescript/shared/constants.d.ts +3 -0
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/gestures/resolve-screen-gesture-target.d.ts +10 -0
- package/lib/typescript/shared/hooks/gestures/resolve-screen-gesture-target.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/gestures/types.d.ts +4 -0
- package/lib/typescript/shared/hooks/gestures/types.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/gestures/use-screen-gesture.d.ts +4 -2
- package/lib/typescript/shared/hooks/gestures/use-screen-gesture.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -2
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +16 -18
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts +1 -1
- package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/helpers/gesture-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts +18 -0
- package/lib/typescript/shared/providers/gestures/helpers/gesture-snap-points.d.ts.map +1 -0
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +6 -3
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts +0 -2
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts +11 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/animation/index.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/types.d.ts +4 -0
- package/lib/typescript/shared/providers/screen/animation/types.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts +5 -1
- package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/core.provider.d.ts +2 -0
- package/lib/typescript/shared/providers/stack/core.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts +8 -2
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/presence.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +2 -0
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +33 -51
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +46 -9
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +3 -3
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/overlay.types.d.ts +1 -22
- package/lib/typescript/shared/types/overlay.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +62 -37
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts +2 -2
- package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.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/helpers/geometry.d.ts +3 -2
- package/lib/typescript/shared/utils/bounds/helpers/geometry.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts +3 -2
- package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts +3 -2
- package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts +2 -1
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts +4 -3
- package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/index.d.ts +2 -2
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts +5 -0
- package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/types/options.d.ts +5 -4
- package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts +17 -0
- package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +4 -0
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/zoom/config.d.ts +43 -0
- package/lib/typescript/shared/utils/bounds/zoom/config.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/zoom/index.d.ts +3 -0
- package/lib/typescript/shared/utils/bounds/zoom/index.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +17 -0
- package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -0
- package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts +5 -3
- package/lib/typescript/shared/utils/gesture/validate-snap-points.d.ts.map +1 -1
- package/lib/typescript/shared/utils/overlay/visibility.d.ts +1 -4
- package/lib/typescript/shared/utils/overlay/visibility.d.ts.map +1 -1
- package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts +5 -0
- package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts.map +1 -0
- package/package.json +3 -2
- package/src/blank-stack/index.ts +1 -0
- package/src/blank-stack/navigators/create-blank-stack-navigator.tsx +138 -19
- package/src/blank-stack/types.ts +33 -5
- package/src/component-stack/navigators/create-component-stack-navigator.tsx +8 -0
- package/src/shared/animation/snap-to.ts +12 -1
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +258 -0
- package/src/shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts +7 -17
- package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +38 -28
- package/src/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.ts +58 -0
- package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +41 -10
- package/src/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.ts +82 -0
- package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +24 -12
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +11 -9
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.ts +29 -26
- package/src/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.ts +26 -17
- package/src/shared/components/create-boundary-component/index.tsx +25 -6
- package/src/shared/components/create-boundary-component/types.ts +8 -4
- package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +2 -14
- package/src/shared/components/create-transition-aware-component.tsx +5 -2
- package/src/shared/components/native-screen-container.tsx +11 -3
- package/src/shared/components/native-screen.tsx +65 -20
- package/src/shared/components/overlay/helpers/get-active-overlay.ts +3 -3
- package/src/shared/components/overlay/index.ts +0 -2
- package/src/shared/components/overlay/variations/overlay-host.tsx +2 -16
- package/src/shared/components/scene-view.tsx +0 -3
- package/src/shared/components/screen-container/hooks/use-content-layout.ts +82 -0
- package/src/shared/components/screen-container/layers/backdrop.tsx +25 -6
- package/src/shared/components/screen-container/layers/content.tsx +23 -82
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +101 -0
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition/index.ts +1 -2
- package/src/shared/components/screen-lifecycle/hooks/use-open-transition.ts +20 -6
- package/src/shared/constants.ts +6 -2
- package/src/shared/hooks/gestures/resolve-screen-gesture-target.ts +66 -0
- package/src/shared/hooks/gestures/types.ts +5 -0
- package/src/shared/hooks/gestures/use-screen-gesture.ts +10 -3
- package/src/shared/hooks/navigation/use-stack.tsx +1 -2
- package/src/shared/index.ts +14 -16
- package/src/shared/providers/gestures/handlers/use-handlers.ts +75 -29
- package/src/shared/providers/gestures/helpers/gesture-activation.ts +11 -6
- package/src/shared/providers/gestures/helpers/gesture-snap-points.ts +72 -0
- package/src/shared/providers/layout-anchor.provider.tsx +2 -5
- package/src/shared/providers/register-bounds.provider.tsx +1 -1
- package/src/shared/providers/screen/animation/animation.provider.tsx +46 -10
- package/src/shared/providers/screen/animation/helpers/derivations.ts +0 -8
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +51 -14
- package/src/shared/providers/screen/animation/helpers/resolve-screen-animation-target.ts +44 -0
- package/src/shared/providers/screen/animation/index.tsx +4 -1
- package/src/shared/providers/screen/animation/types.ts +5 -0
- package/src/shared/providers/screen/animation/use-screen-animation.tsx +16 -3
- package/src/shared/providers/stack/core.provider.tsx +27 -14
- package/src/shared/providers/stack/direct.provider.tsx +2 -5
- package/src/shared/providers/stack/helpers/use-processed-routes.ts +2 -2
- package/src/shared/stores/animation.store.ts +21 -5
- package/src/shared/stores/bounds/internals/presence.ts +3 -1
- package/src/shared/stores/bounds/internals/resolver.ts +13 -1
- package/src/shared/stores/bounds/types.ts +2 -0
- package/src/shared/types/animation.types.ts +32 -58
- package/src/shared/types/bounds.types.ts +30 -10
- package/src/shared/types/index.ts +2 -15
- package/src/shared/types/overlay.types.ts +1 -28
- package/src/shared/types/screen.types.ts +67 -38
- package/src/shared/utils/animation/animate-to-progress.ts +7 -0
- package/src/shared/utils/bounds/helpers/build-bounds-options.ts +2 -2
- package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +47 -8
- package/src/shared/utils/bounds/helpers/geometry.ts +3 -2
- package/src/shared/utils/bounds/helpers/interpolators.ts +8 -6
- package/src/shared/utils/bounds/helpers/link-accessor.ts +10 -6
- package/src/shared/utils/bounds/helpers/resolve-bound-tag.ts +7 -10
- package/src/shared/utils/bounds/helpers/style-composers.ts +4 -3
- package/src/shared/utils/bounds/index.ts +22 -13
- package/src/shared/utils/bounds/types/frame-props.ts +5 -0
- package/src/shared/utils/bounds/types/options.ts +6 -4
- package/src/shared/utils/bounds/zoom/accessor.ts +69 -0
- package/src/shared/utils/bounds/zoom/build.ts +715 -0
- package/src/shared/utils/bounds/zoom/config.ts +179 -0
- package/src/shared/utils/bounds/zoom/index.ts +2 -0
- package/src/shared/utils/bounds/zoom/types.ts +22 -0
- package/src/shared/utils/gesture/validate-snap-points.ts +20 -8
- package/src/shared/utils/overlay/visibility.ts +1 -16
- package/src/shared/utils/resolve-screen-transition-options.ts +37 -0
- package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js +0 -64
- package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js.map +0 -1
- package/lib/commonjs/shared/providers/viewport.provider.js +0 -33
- package/lib/commonjs/shared/providers/viewport.provider.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/math.js +0 -132
- package/lib/commonjs/shared/utils/bounds/helpers/math.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js +0 -45
- package/lib/commonjs/shared/utils/bounds/helpers/navigation-accessor.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js +0 -60
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/helpers.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js +0 -20
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/index.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/types.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js +0 -295
- package/lib/commonjs/shared/utils/bounds/sugar/navigation/zoom.js.map +0 -1
- package/lib/module/shared/components/overlay/variations/screen-overlay.js +0 -61
- package/lib/module/shared/components/overlay/variations/screen-overlay.js.map +0 -1
- package/lib/module/shared/providers/viewport.provider.js +0 -27
- package/lib/module/shared/providers/viewport.provider.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/math.js +0 -115
- package/lib/module/shared/utils/bounds/helpers/math.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js +0 -40
- package/lib/module/shared/utils/bounds/helpers/navigation-accessor.js.map +0 -1
- package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js +0 -54
- package/lib/module/shared/utils/bounds/sugar/navigation/helpers.js.map +0 -1
- package/lib/module/shared/utils/bounds/sugar/navigation/index.js +0 -15
- package/lib/module/shared/utils/bounds/sugar/navigation/index.js.map +0 -1
- package/lib/module/shared/utils/bounds/sugar/navigation/types.js.map +0 -1
- package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js +0 -290
- package/lib/module/shared/utils/bounds/sugar/navigation/zoom.js.map +0 -1
- package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts +0 -10
- package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts.map +0 -1
- package/lib/typescript/shared/providers/viewport.provider.d.ts +0 -13
- package/lib/typescript/shared/providers/viewport.provider.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/math.d.ts +0 -38
- package/lib/typescript/shared/utils/bounds/helpers/math.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts +0 -16
- package/lib/typescript/shared/utils/bounds/helpers/navigation-accessor.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts +0 -17
- package/lib/typescript/shared/utils/bounds/sugar/navigation/helpers.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts +0 -3
- package/lib/typescript/shared/utils/bounds/sugar/navigation/index.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts +0 -18
- package/lib/typescript/shared/utils/bounds/sugar/navigation/types.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts +0 -4
- package/lib/typescript/shared/utils/bounds/sugar/navigation/zoom.d.ts.map +0 -1
- package/src/shared/components/overlay/variations/screen-overlay.tsx +0 -68
- package/src/shared/providers/viewport.provider.tsx +0 -39
- package/src/shared/utils/bounds/helpers/math.ts +0 -161
- package/src/shared/utils/bounds/helpers/navigation-accessor.ts +0 -61
- package/src/shared/utils/bounds/sugar/navigation/helpers.ts +0 -74
- package/src/shared/utils/bounds/sugar/navigation/index.ts +0 -14
- package/src/shared/utils/bounds/sugar/navigation/types.ts +0 -26
- package/src/shared/utils/bounds/sugar/navigation/zoom.ts +0 -348
- /package/lib/commonjs/shared/utils/bounds/{sugar/navigation → zoom}/types.js +0 -0
- /package/lib/module/shared/utils/bounds/{sugar/navigation → zoom}/types.js +0 -0
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useMemo } from "react";
|
|
4
|
+
import { useWindowDimensions } from "react-native";
|
|
4
5
|
import { useDerivedValue, useSharedValue } from "react-native-reanimated";
|
|
6
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
5
7
|
import { createScreenTransitionState, DEFAULT_SCREEN_TRANSITION_STATE } from "../../../../constants";
|
|
6
8
|
import { useStack } from "../../../../hooks/navigation/use-stack";
|
|
7
9
|
import { AnimationStore } from "../../../../stores/animation.store";
|
|
8
10
|
import { GestureStore } from "../../../../stores/gesture.store";
|
|
9
11
|
import { createBoundsAccessor } from "../../../../utils/bounds";
|
|
10
|
-
import {
|
|
12
|
+
import { resolveNavigationMaskEnabled } from "../../../../utils/resolve-screen-transition-options";
|
|
11
13
|
import { useDescriptors } from "../../descriptors";
|
|
12
14
|
import { derivations } from "./derivations";
|
|
13
15
|
import { toPlainRoute, toPlainValue } from "./worklet";
|
|
@@ -87,10 +89,8 @@ export function useScreenAnimationPipeline() {
|
|
|
87
89
|
stackProgress: rootStackProgress,
|
|
88
90
|
routeKeys
|
|
89
91
|
} = useStack();
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
insets
|
|
93
|
-
} = useViewportContext();
|
|
92
|
+
const dimensions = useWindowDimensions();
|
|
93
|
+
const insets = useSafeAreaInsets();
|
|
94
94
|
const transitionsAlwaysOn = flags.TRANSITIONS_ALWAYS_ON;
|
|
95
95
|
const {
|
|
96
96
|
current: currentDescriptor,
|
|
@@ -102,12 +102,17 @@ export function useScreenAnimationPipeline() {
|
|
|
102
102
|
const prevAnimation = useBuildScreenTransitionState(previousDescriptor, "previous");
|
|
103
103
|
const currentRouteKey = currentDescriptor?.route?.key;
|
|
104
104
|
const currentIndex = routeKeys.indexOf(currentRouteKey);
|
|
105
|
-
const
|
|
105
|
+
const sortedNumericSnapPoints = useMemo(() => {
|
|
106
106
|
const points = currentDescriptor?.options?.snapPoints;
|
|
107
|
-
|
|
107
|
+
if (!points) return [];
|
|
108
|
+
return points.filter(p => typeof p === "number").sort((a, b) => a - b);
|
|
108
109
|
}, [currentDescriptor?.options?.snapPoints]);
|
|
110
|
+
const hasAutoSnapPoint = useMemo(() => currentDescriptor?.options?.snapPoints?.includes("auto") ?? false, [currentDescriptor?.options?.snapPoints]);
|
|
111
|
+
const autoSnapPointValue = AnimationStore.getAnimation(currentRouteKey ?? "_", "autoSnapPoint");
|
|
112
|
+
const contentLayoutValue = AnimationStore.getAnimation(currentRouteKey ?? "_", "contentLayout");
|
|
109
113
|
const nextRouteKey = nextDescriptor?.route?.key;
|
|
110
114
|
const nextHasTransitions = !!nextRouteKey && hasTransitionsEnabled(nextDescriptor?.options, transitionsAlwaysOn);
|
|
115
|
+
const currentNavigationMaskEnabled = resolveNavigationMaskEnabled(currentDescriptor?.options ?? {});
|
|
111
116
|
const framePropsMutable = useSharedValue({
|
|
112
117
|
layouts: {
|
|
113
118
|
screen: dimensions
|
|
@@ -119,11 +124,10 @@ export function useScreenAnimationPipeline() {
|
|
|
119
124
|
progress: 0,
|
|
120
125
|
stackProgress: 0,
|
|
121
126
|
snapIndex: -1,
|
|
127
|
+
navigationMaskEnabled: false,
|
|
122
128
|
focused: true,
|
|
123
129
|
active: DEFAULT_SCREEN_TRANSITION_STATE,
|
|
124
|
-
inactive: undefined
|
|
125
|
-
isActiveTransitioning: false,
|
|
126
|
-
isDismissing: false
|
|
130
|
+
inactive: undefined
|
|
127
131
|
});
|
|
128
132
|
const boundsAccessor = useMemo(() => {
|
|
129
133
|
return createBoundsAccessor(() => {
|
|
@@ -151,10 +155,15 @@ export function useScreenAnimationPipeline() {
|
|
|
151
155
|
// This gives us the sum of progress values from current screen onwards
|
|
152
156
|
// Falls back to current progress if index is invalid
|
|
153
157
|
const stackProgress = currentIndex >= 0 ? rootStackProgress.value - currentIndex : progress;
|
|
154
|
-
|
|
158
|
+
|
|
159
|
+
// Resolve 'auto' snap point reactively so computeSnapIndex stays accurate
|
|
160
|
+
const resolvedAutoSnap = hasAutoSnapPoint && autoSnapPointValue.value > 0 ? autoSnapPointValue.value : null;
|
|
161
|
+
const resolvedSnapPoints = resolvedAutoSnap !== null ? [...sortedNumericSnapPoints, resolvedAutoSnap].sort((a, b) => a - b) : sortedNumericSnapPoints;
|
|
162
|
+
const snapIndex = computeSnapIndex(current.progress, resolvedSnapPoints);
|
|
155
163
|
const nextProps = {
|
|
156
164
|
layouts: {
|
|
157
|
-
screen: dimensions
|
|
165
|
+
screen: dimensions,
|
|
166
|
+
content: contentLayoutValue.value ?? undefined
|
|
158
167
|
},
|
|
159
168
|
insets,
|
|
160
169
|
previous,
|
|
@@ -165,7 +174,10 @@ export function useScreenAnimationPipeline() {
|
|
|
165
174
|
snapIndex,
|
|
166
175
|
...helpers
|
|
167
176
|
};
|
|
168
|
-
framePropsMutable.value =
|
|
177
|
+
framePropsMutable.value = {
|
|
178
|
+
...nextProps,
|
|
179
|
+
navigationMaskEnabled: currentNavigationMaskEnabled
|
|
180
|
+
};
|
|
169
181
|
return nextProps;
|
|
170
182
|
});
|
|
171
183
|
const nextInterpolator = nextDescriptor?.options.screenStyleInterpolator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useDerivedValue","useSharedValue","createScreenTransitionState","DEFAULT_SCREEN_TRANSITION_STATE","useStack","AnimationStore","GestureStore","createBoundsAccessor","
|
|
1
|
+
{"version":3,"names":["useMemo","useWindowDimensions","useDerivedValue","useSharedValue","useSafeAreaInsets","createScreenTransitionState","DEFAULT_SCREEN_TRANSITION_STATE","useStack","AnimationStore","GestureStore","createBoundsAccessor","resolveNavigationMaskEnabled","useDescriptors","derivations","toPlainRoute","toPlainValue","computeSnapIndex","progress","snapPoints","length","i","t","unwrapInto","s","out","unwrapped","value","closing","entering","animating","gesture","x","y","normX","normY","dismissing","dragging","direction","normalizedX","normalizedY","isDismissing","isDragging","settled","meta","useBuildScreenTransitionState","descriptor","slot","key","route","options","gestureEnabled","shouldUseNeutralNextGestures","undefined","plainRoute","plainMeta","getRouteAnimation","peekRouteGestures","getNeutralGestures","getRouteGestures","hasTransitionsEnabled","alwaysOn","enableTransitions","useScreenAnimationPipeline","flags","stackProgress","rootStackProgress","routeKeys","dimensions","insets","transitionsAlwaysOn","TRANSITIONS_ALWAYS_ON","current","currentDescriptor","next","nextDescriptor","previous","previousDescriptor","currentAnimation","nextAnimation","prevAnimation","currentRouteKey","currentIndex","indexOf","sortedNumericSnapPoints","points","filter","p","sort","a","b","hasAutoSnapPoint","includes","autoSnapPointValue","getAnimation","contentLayoutValue","nextRouteKey","nextHasTransitions","currentNavigationMaskEnabled","framePropsMutable","layouts","screen","snapIndex","navigationMaskEnabled","focused","active","inactive","boundsAccessor","screenInterpolatorProps","helpers","resolvedAutoSnap","resolvedSnapPoints","nextProps","content","nextInterpolator","screenStyleInterpolator","currentInterpolator"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/animation/helpers/pipeline.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,mBAAmB,QAAQ,cAAc;AAClD,SAGCC,eAAe,EACfC,cAAc,QACR,yBAAyB;AAChC,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SACCC,2BAA2B,EAC3BC,+BAA+B,QACzB,uBAAuB;AAC9B,SAASC,QAAQ,QAAQ,wCAAwC;AACjE,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SACCC,YAAY,QAEN,kCAAkC;AASzC,SAASC,oBAAoB,Q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MAAMkB,SAAS,GAAGrF,gBAAgB,CAACuD,OAAO,CAACtD,QAAQ,EAAE6F,kBAAkB,CAAC;IAExE,MAAMC,SAAmD,GAAG;MAC3DZ,OAAO,EAAE;QACRC,MAAM,EAAEjC,UAAU;QAClB6C,OAAO,EAAElB,kBAAkB,CAACpE,KAAK,IAAI0B;MACtC,CAAC;MACDgB,MAAM;MACNO,QAAQ;MACRJ,OAAO;MACPE,IAAI;MACJxD,QAAQ;MACR+C,aAAa;MACbqC,SAAS;MACT,GAAGO;IACJ,CAAC;IAEDV,iBAAiB,CAACxE,KAAK,GAAG;MACzB,GAAGqF,SAAS;MACZT,qBAAqB,EAAEL;IACxB,CAAC;IACD,OAAOc,SAAS;EACjB,CAAC,CAAC;EAEF,MAAME,gBAAgB,GAAGvC,cAAc,EAAEzB,OAAO,CAACiE,uBAAuB;EACxE,MAAMC,mBAAmB,GACxB3C,iBAAiB,EAAEvB,OAAO,CAACiE,uBAAuB;EAEnD,OAAO;IACNP,uBAAuB;IACvBM,gBAAgB;IAChBE,mBAAmB;IACnBT;EACD,CAAC;AACF","ignoreList":[]}
|
package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const isAncestorTarget = target => {
|
|
4
|
+
return typeof target === "object" && target !== null && "ancestor" in target;
|
|
5
|
+
};
|
|
6
|
+
export function resolveScreenAnimationTarget({
|
|
7
|
+
target,
|
|
8
|
+
self,
|
|
9
|
+
ancestors
|
|
10
|
+
}) {
|
|
11
|
+
if (!target || target === "self") {
|
|
12
|
+
return self;
|
|
13
|
+
}
|
|
14
|
+
if (target === "parent") {
|
|
15
|
+
return ancestors[0] ?? self;
|
|
16
|
+
}
|
|
17
|
+
if (target === "root") {
|
|
18
|
+
return ancestors[ancestors.length - 1] ?? self;
|
|
19
|
+
}
|
|
20
|
+
if (!isAncestorTarget(target)) {
|
|
21
|
+
return self;
|
|
22
|
+
}
|
|
23
|
+
const depth = target.ancestor;
|
|
24
|
+
if (!Number.isInteger(depth) || depth < 1) {
|
|
25
|
+
return self;
|
|
26
|
+
}
|
|
27
|
+
return ancestors[depth - 1] ?? self;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=resolve-screen-animation-target.js.map
|
package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isAncestorTarget","target","resolveScreenAnimationTarget","self","ancestors","length","depth","ancestor","Number","isInteger"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/animation/helpers/resolve-screen-animation-target.ts"],"mappings":";;AAUA,MAAMA,gBAAgB,GACrBC,MAA6B,IACO;EACpC,OAAO,OAAOA,MAAM,KAAK,QAAQ,IAAIA,MAAM,KAAK,IAAI,IAAI,UAAU,IAAIA,MAAM;AAC7E,CAAC;AAED,OAAO,SAASC,4BAA4BA,CAAC;EAC5CD,MAAM;EACNE,IAAI;EACJC;AACO,CAAC,EAA0C;EAClD,IAAI,CAACH,MAAM,IAAIA,MAAM,KAAK,MAAM,EAAE;IACjC,OAAOE,IAAI;EACZ;EAEA,IAAIF,MAAM,KAAK,QAAQ,EAAE;IACxB,OAAOG,SAAS,CAAC,CAAC,CAAC,IAAID,IAAI;EAC5B;EAEA,IAAIF,MAAM,KAAK,MAAM,EAAE;IACtB,OAAOG,SAAS,CAACA,SAAS,CAACC,MAAM,GAAG,CAAC,CAAC,IAAIF,IAAI;EAC/C;EAEA,IAAI,CAACH,gBAAgB,CAACC,MAAM,CAAC,EAAE;IAC9B,OAAOE,IAAI;EACZ;EAEA,MAAMG,KAAK,GAAGL,MAAM,CAACM,QAAQ;EAC7B,IAAI,CAACC,MAAM,CAACC,SAAS,CAACH,KAAK,CAAC,IAAIA,KAAK,GAAG,CAAC,EAAE;IAC1C,OAAOH,IAAI;EACZ;EAEA,OAAOC,SAAS,CAACE,KAAK,GAAG,CAAC,CAAC,IAAIH,IAAI;AACpC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ScreenAnimationProvider","useScreenAnimationContext","useScreenAnimation"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/animation/index.tsx"],"mappings":";;AAAA,SACCA,uBAAuB,EACvBC,yBAAyB,QACnB,sBAAsB;AAC7B,
|
|
1
|
+
{"version":3,"names":["ScreenAnimationProvider","useScreenAnimationContext","useScreenAnimation"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/animation/index.tsx"],"mappings":";;AAAA,SACCA,uBAAuB,EACvBC,yBAAyB,QACnB,sBAAsB;AAC7B,SAECC,kBAAkB,QACZ,wBAAwB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/animation/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useScreenAnimationContext } from "./animation.provider";
|
|
4
|
-
|
|
4
|
+
import { resolveScreenAnimationTarget } from "./helpers/resolve-screen-animation-target";
|
|
5
|
+
export function useScreenAnimation(target) {
|
|
5
6
|
const {
|
|
6
|
-
screenAnimation
|
|
7
|
+
screenAnimation,
|
|
8
|
+
ancestorScreenAnimations
|
|
7
9
|
} = useScreenAnimationContext();
|
|
8
|
-
return
|
|
10
|
+
return resolveScreenAnimationTarget({
|
|
11
|
+
target,
|
|
12
|
+
self: screenAnimation,
|
|
13
|
+
ancestors: ancestorScreenAnimations
|
|
14
|
+
});
|
|
9
15
|
}
|
|
10
16
|
//# sourceMappingURL=use-screen-animation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useScreenAnimationContext","useScreenAnimation","screenAnimation"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/animation/use-screen-animation.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["useScreenAnimationContext","resolveScreenAnimationTarget","useScreenAnimation","target","screenAnimation","ancestorScreenAnimations","self","ancestors"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/animation/use-screen-animation.tsx"],"mappings":";;AAEA,SAASA,yBAAyB,QAAQ,sBAAsB;AAChE,SAASC,4BAA4B,QAAQ,2CAA2C;AAKxF,OAAO,SAASC,kBAAkBA,CACjCC,MAA8B,EACW;EACzC,MAAM;IAAEC,eAAe;IAAEC;EAAyB,CAAC,GAClDL,yBAAyB,CAAC,CAAC;EAC5B,OAAOC,4BAA4B,CAAC;IACnCE,MAAM;IACNG,IAAI,EAAEF,eAAe;IACrBG,SAAS,EAAEF;EACZ,CAAC,CAAC;AACH","ignoreList":[]}
|
|
@@ -6,7 +6,6 @@ import { StyleSheet } from "react-native";
|
|
|
6
6
|
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
7
7
|
import { StackType } from "../../types/stack.types";
|
|
8
8
|
import createProvider from "../../utils/create-provider";
|
|
9
|
-
import { ViewportProvider } from "../viewport.provider";
|
|
10
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
10
|
const {
|
|
12
11
|
StackCoreProvider: InternalStackCoreProvider,
|
|
@@ -20,25 +19,24 @@ const {
|
|
|
20
19
|
const {
|
|
21
20
|
TRANSITIONS_ALWAYS_ON = false,
|
|
22
21
|
DISABLE_NATIVE_SCREENS = false,
|
|
22
|
+
DISABLE_NATIVE_SCREEN_CONTAINER = false,
|
|
23
23
|
STACK_TYPE = StackType.BLANK
|
|
24
24
|
} = config;
|
|
25
25
|
const flags = useMemo(() => ({
|
|
26
26
|
TRANSITIONS_ALWAYS_ON,
|
|
27
27
|
STACK_TYPE,
|
|
28
|
-
DISABLE_NATIVE_SCREENS
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
flags
|
|
32
|
-
}), [flags]);
|
|
28
|
+
DISABLE_NATIVE_SCREENS,
|
|
29
|
+
DISABLE_NATIVE_SCREEN_CONTAINER
|
|
30
|
+
}), [TRANSITIONS_ALWAYS_ON, STACK_TYPE, DISABLE_NATIVE_SCREENS, DISABLE_NATIVE_SCREEN_CONTAINER]);
|
|
33
31
|
return {
|
|
34
|
-
value
|
|
32
|
+
value: {
|
|
33
|
+
flags
|
|
34
|
+
},
|
|
35
35
|
children: /*#__PURE__*/_jsx(GestureHandlerRootView, {
|
|
36
36
|
style: styles.container,
|
|
37
37
|
pointerEvents: STACK_TYPE === StackType.COMPONENT ? "box-none" : undefined,
|
|
38
38
|
children: /*#__PURE__*/_jsx(SafeAreaProviderCompat, {
|
|
39
|
-
children:
|
|
40
|
-
children: children
|
|
41
|
-
})
|
|
39
|
+
children: children
|
|
42
40
|
})
|
|
43
41
|
})
|
|
44
42
|
};
|
|
@@ -51,22 +49,17 @@ const {
|
|
|
51
49
|
export function withStackCore(defaultConfig, Component) {
|
|
52
50
|
return function StackCoreWrapper({
|
|
53
51
|
DISABLE_NATIVE_SCREENS,
|
|
52
|
+
DISABLE_NATIVE_SCREEN_CONTAINER,
|
|
54
53
|
TRANSITIONS_ALWAYS_ON,
|
|
55
54
|
STACK_TYPE,
|
|
56
55
|
...props
|
|
57
56
|
}) {
|
|
58
|
-
//
|
|
57
|
+
// Start from defaults, then apply explicit overrides from the caller.
|
|
59
58
|
const config = {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
TRANSITIONS_ALWAYS_ON
|
|
65
|
-
}),
|
|
66
|
-
...(STACK_TYPE !== undefined && {
|
|
67
|
-
STACK_TYPE
|
|
68
|
-
}),
|
|
69
|
-
...defaultConfig
|
|
59
|
+
TRANSITIONS_ALWAYS_ON: TRANSITIONS_ALWAYS_ON ?? defaultConfig.TRANSITIONS_ALWAYS_ON,
|
|
60
|
+
STACK_TYPE: STACK_TYPE ?? defaultConfig.STACK_TYPE,
|
|
61
|
+
DISABLE_NATIVE_SCREENS: DISABLE_NATIVE_SCREENS ?? defaultConfig.DISABLE_NATIVE_SCREENS,
|
|
62
|
+
DISABLE_NATIVE_SCREEN_CONTAINER: DISABLE_NATIVE_SCREEN_CONTAINER ?? defaultConfig.DISABLE_NATIVE_SCREEN_CONTAINER
|
|
70
63
|
};
|
|
71
64
|
return /*#__PURE__*/_jsx(InternalStackCoreProvider, {
|
|
72
65
|
config: config,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SafeAreaProviderCompat","useMemo","StyleSheet","GestureHandlerRootView","StackType","createProvider","
|
|
1
|
+
{"version":3,"names":["SafeAreaProviderCompat","useMemo","StyleSheet","GestureHandlerRootView","StackType","createProvider","jsx","_jsx","StackCoreProvider","InternalStackCoreProvider","useStackCoreContext","guarded","config","children","TRANSITIONS_ALWAYS_ON","DISABLE_NATIVE_SCREENS","DISABLE_NATIVE_SCREEN_CONTAINER","STACK_TYPE","BLANK","flags","value","style","styles","container","pointerEvents","COMPONENT","undefined","withStackCore","defaultConfig","Component","StackCoreWrapper","props","create","flex"],"sourceRoot":"../../../../../src","sources":["shared/providers/stack/core.provider.tsx"],"mappings":";;AAAA,SAASA,sBAAsB,QAAQ,4BAA4B;AAEnE,SAASC,OAAO,QAAQ,OAAO;AAC/B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,SAAS,QAAQ,yBAAyB;AACnD,OAAOC,cAAc,MAAM,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAuBzD,MAAM;EAAEC,iBAAiB,EAAEC,yBAAyB;EAAEC;AAAoB,CAAC,GAC1EL,cAAc,CAAC,WAAW,EAAE;EAAEM,OAAO,EAAE;AAAK,CAAC,CAAC,CAG5C,CAAC;EAAEC,MAAM;EAAEC;AAAS,CAAC,KAAK;EAC3B,MAAM;IACLC,qBAAqB,GAAG,KAAK;IAC7BC,sBAAsB,GAAG,KAAK;IAC9BC,+BAA+B,GAAG,KAAK;IACvCC,UAAU,GAAGb,SAAS,CAACc;EACxB,CAAC,GA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IAAEU,IAAI,EAAE;EAAE;AACtB,CAAC,CAAC;AAEF,SAASvB,mBAAmB","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { StackContext } from "../../hooks/navigation/use-stack";
|
|
5
5
|
import { AnimationStore } from "../../stores/animation.store";
|
|
6
|
-
import {
|
|
6
|
+
import { isOverlayVisible } from "../../utils/overlay/visibility";
|
|
7
7
|
import { useStackCoreContext } from "./core.provider";
|
|
8
8
|
import { useStackDerived } from "./helpers/use-stack-derived";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -52,7 +52,7 @@ function useDirectStackValue(props) {
|
|
|
52
52
|
animationMaps.push(AnimationStore.getRouteAnimations(route.key));
|
|
53
53
|
if (!shouldShowFloatOverlay && descriptor) {
|
|
54
54
|
const options = descriptor.options;
|
|
55
|
-
if (options?.enableTransitions === true &&
|
|
55
|
+
if (options?.enableTransitions === true && isOverlayVisible(options)) {
|
|
56
56
|
shouldShowFloatOverlay = true;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","StackContext","AnimationStore","
|
|
1
|
+
{"version":3,"names":["useMemo","StackContext","AnimationStore","isOverlayVisible","useStackCoreContext","useStackDerived","jsx","_jsx","useDirectStackValue","props","state","navigation","descriptors","describe","flags","navigatorKey","key","preloadedDescriptors","preloadedRoutes","reduce","acc","route","scenes","shouldShowFloatOverlay","routeKeys","allRoutes","animationMaps","routes","concat","allDescriptors","descriptor","isPreloaded","undefined","push","getRouteAnimations","options","enableTransitions","stackProgress","optimisticFocusedIndex","focusedIndex","index","stackContextValue","lifecycleValue","withDirectStack","Component","DirectStackProvider","Provider","value","children"],"sourceRoot":"../../../../../src","sources":["shared/providers/stack/direct.provider.tsx"],"mappings":";;AACA,SAASA,OAAO,QAAQ,OAAO;AAE/B,SACCC,YAAY,QAEN,kCAAkC;AACzC,SACCC,c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AExB,CAAC;;EAED;EACA,MAAMI,cAAc,GAAG1C,OAAO,CAC7B,OAAO;IACNU,KAAK;IACLC,UAAU;IACVC,WAAW;IACXU,MAAM;IACNiB,YAAY;IACZhB;EACD,CAAC,CAAC,EACF,CACCb,KAAK,EACLC,UAAU,EACVC,WAAW,EACXU,MAAM,EACNiB,YAAY,EACZhB,sBAAsB,CAExB,CAAC;EAED,OAAO;IAAE,GAAGmB,cAAc;IAAED;EAAkB,CAAC;AAChD;AAEA,SAASE,eAAeA,CACvBC,SAAuD,EACpC;EACnB,OAAO,SAASC,mBAAmBA,CAACpC,KAAa,EAAE;IAClD,MAAM;MAAEgC,iBAAiB;MAAE,GAAGC;IAAe,CAAC,GAAGlC,mBAAmB,CAACC,KAAK,CAAC;IAE3E,oBACCF,IAAA,CAACN,YAAY,CAAC6C,QAAQ;MAACC,KAAK,EAAEN,iBAAkB;MAAAO,QAAA,eAC/CzC,IAAA,CAACqC,SAAS;QAAA,GAAKF;MAAc,CAAG;IAAC,CACX,CAAC;EAE1B,CAAC;AACF;AAEA,SAASC,eAAe","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { AnimationStore } from "../../../stores/animation.store";
|
|
5
|
-
import {
|
|
5
|
+
import { isOverlayVisible } from "../../../utils/overlay/visibility";
|
|
6
6
|
/**
|
|
7
7
|
* Processes raw routes + descriptors into derived arrays needed by the stack.
|
|
8
8
|
* Single reverse pass computes: scenes, routeKeys, backdropBehaviors,
|
|
@@ -29,7 +29,7 @@ export function useProcessedRoutes(routes, descriptors) {
|
|
|
29
29
|
backdropBehaviors[i] = options?.backdropBehavior ?? "block";
|
|
30
30
|
animationMaps[i] = AnimationStore.getRouteAnimations(route.key);
|
|
31
31
|
if (!shouldShowFloatOverlay) {
|
|
32
|
-
shouldShowFloatOverlay =
|
|
32
|
+
shouldShowFloatOverlay = isOverlayVisible(options);
|
|
33
33
|
}
|
|
34
34
|
if (!stopLimit) {
|
|
35
35
|
const shouldKeepPrevious = options?.detachPreviousScreen !== true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","AnimationStore","
|
|
1
|
+
{"version":3,"names":["useMemo","AnimationStore","isOverlayVisible","useProcessedRoutes","routes","descriptors","scenes","routeKeys","backdropBehaviors","animationMaps","shouldShowFloatOverlay","limit","stopLimit","i","length","route","descriptor","key","options","backdropBehavior","getRouteAnimations","shouldKeepPrevious","detachPreviousScreen","activeScreensLimit","Math","min"],"sourceRoot":"../../../../../../src","sources":["shared/providers/stack/helpers/use-processed-routes.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SACCC,cAAc,QAER,iCAAiC;AAKxC,SAASC,gBAAgB,QAAQ,mCAAmC;AAapE;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAGjCC,MAA8B,EAC9BC,WAAwC,EACT;EAC/B,OAAOL,OAAO,CAAC,MAAM;IACpB,MAAMM,MAAqC,GAAG,EAAE;IAChD,MAAMC,SAAmB,GAAG,EAAE;IAC9B,MAAMC,iBAA2B,GAAG,EAAE;IACtC,MAAMC,aAAkC,GAAG,EAAE;IAE7C,IAAIC,sBAAsB,GAAG,KAAK;IAClC,IAAIC,KAAK,GAAG,CAAC;IACb,IAAIC,SAAS,GAAG,KAAK;IAErB,KAAK,IAAIC,CAAC,GAAGT,MAAM,CAACU,MAAM,GAAG,CAAC,EAAED,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;MAC5C,MAAME,KAAK,GAAGX,MAAM,CAACS,CAAC,CAAC;MACvB,MAAMG,UAAU,GAAGX,WAAW,CAACU,KAAK,CAACE,GAAG,CAAgB;MACxD,MAAMC,OAAO,GAAGF,UAAU,EAAEE,OAAO;MAEnCZ,MAAM,CAACO,CAAC,CAAC,GAAG;QAAEE,KAAK;QAAEC;MAAW,CAAC;MACjCT,SAAS,CAACM,CAAC,CAAC,GAAGE,KAAK,CAACE,GAAG;MACxBT,iBAAiB,CAACK,CAAC,CAAC,GAAGK,OAAO,EAAEC,gBAAgB,IAAI,OAAO;MAC3DV,aAAa,CAACI,CAAC,CAAC,GAAGZ,cAAc,CAACmB,kBAAkB,CAACL,KAAK,CAACE,GAAG,CAAC;MAE/D,IAAI,CAACP,sBAAsB,EAAE;QAC5BA,sBAAsB,GAAGR,gBAAgB,CAACgB,OAAO,CAAC;MACnD;MAEA,IAAI,CAACN,SAAS,EAAE;QACf,MAAMS,kBAAkB,GACtBH,OAAO,EACLI,oBAAoB,KAAK,IAAI;QAEjC,IAAID,kBAAkB,EAAE;UACvBV,KAAK,IAAI,CAAC;QACX,CAAC,MAAM;UACNC,SAAS,GAAG,IAAI;QACjB;MACD;IACD;IAEA,MAAMW,kBAAkB,GAAGC,IAAI,CAACC,GAAG,CAClCd,KAAK,EACLP,MAAM,CAACU,MAAM,KAAK,CAAC,GAAG,CAAC,GAAGV,MAAM,CAACU,MAClC,CAAC;IAED,OAAO;MACNR,MAAM;MACNC,SAAS;MACTC,iBAAiB;MACjBC,aAAa;MACbC,sBAAsB;MACtBa;IACD,CAAC;EACF,CAAC,EAAE,CAACnB,MAAM,EAAEC,WAAW,CAAC,CAAC;AAC1B","ignoreList":[]}
|
|
@@ -7,8 +7,10 @@ function createAnimationBag() {
|
|
|
7
7
|
progress: makeMutable(0),
|
|
8
8
|
closing: makeMutable(0),
|
|
9
9
|
animating: makeMutable(0),
|
|
10
|
-
entering: makeMutable(
|
|
11
|
-
targetProgress: makeMutable(1)
|
|
10
|
+
entering: makeMutable(0),
|
|
11
|
+
targetProgress: makeMutable(1),
|
|
12
|
+
autoSnapPoint: makeMutable(-1),
|
|
13
|
+
contentLayout: makeMutable(null)
|
|
12
14
|
};
|
|
13
15
|
}
|
|
14
16
|
function ensure(routeKey) {
|
|
@@ -25,6 +27,9 @@ function peekRouteAnimations(routeKey) {
|
|
|
25
27
|
function getRouteAnimation(routeKey, type) {
|
|
26
28
|
return ensure(routeKey)[type];
|
|
27
29
|
}
|
|
30
|
+
function getAnimation(routeKey, type) {
|
|
31
|
+
return getRouteAnimation(routeKey, type);
|
|
32
|
+
}
|
|
28
33
|
function getRouteAnimations(routeKey) {
|
|
29
34
|
return ensure(routeKey);
|
|
30
35
|
}
|
|
@@ -36,10 +41,13 @@ function clear(routeKey) {
|
|
|
36
41
|
cancelAnimation(bag.closing);
|
|
37
42
|
cancelAnimation(bag.entering);
|
|
38
43
|
cancelAnimation(bag.targetProgress);
|
|
44
|
+
cancelAnimation(bag.autoSnapPoint);
|
|
45
|
+
cancelAnimation(bag.contentLayout);
|
|
39
46
|
}
|
|
40
47
|
delete store[routeKey];
|
|
41
48
|
}
|
|
42
49
|
export const AnimationStore = {
|
|
50
|
+
getAnimation,
|
|
43
51
|
peekRouteAnimations,
|
|
44
52
|
getRouteAnimation,
|
|
45
53
|
getRouteAnimations,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cancelAnimation","makeMutable","store","createAnimationBag","progress","closing","animating","entering","targetProgress","ensure","routeKey","bag","peekRouteAnimations","getRouteAnimation","type","getRouteAnimations","clear","AnimationStore"],"sourceRoot":"../../../../src","sources":["shared/stores/animation.store.ts"],"mappings":";;AAAA,SACCA,eAAe,EACfC,WAAW,QAEL,yBAAyB;
|
|
1
|
+
{"version":3,"names":["cancelAnimation","makeMutable","store","createAnimationBag","progress","closing","animating","entering","targetProgress","autoSnapPoint","contentLayout","ensure","routeKey","bag","peekRouteAnimations","getRouteAnimation","type","getAnimation","getRouteAnimations","clear","AnimationStore"],"sourceRoot":"../../../../src","sources":["shared/stores/animation.store.ts"],"mappings":";;AAAA,SACCA,eAAe,EACfC,WAAW,QAEL,yBAAyB;AAehC,MAAMC,KAA2C,GAAG,CAAC,CAAC;AAEtD,SAASC,kBAAkBA,CAAA,EAAsB;EAChD,OAAO;IACNC,QAAQ,EAAEH,WAAW,CAAC,CAAC,CAAC;IACxBI,OAAO,EAAEJ,WAAW,CA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AAc,CAAC;IACnCR,eAAe,CAACa,GAAG,CAACJ,aAAa,CAAC;IAClCT,eAAe,CAACa,GAAG,CAACH,aAAa,CAAC;EACnC;EACA,OAAOR,KAAK,CAACU,QAAQ,CAAC;AACvB;AAEA,OAAO,MAAMQ,cAAc,GAAG;EAC7BH,YAAY;EACZH,mBAAmB;EACnBC,iBAAiB;EACjBG,kBAAkB;EAClBC;AACD,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["debugStoreSizeLog","groups","presence","registerBoundaryPresence","tag","screenKey","ancestorKeys","boundaryConfig","navigatorKey","ancestorNavigatorKeys","modify","state","mutableState","tagEntries","currentEntry","count","unregisterBoundaryPresence","value","mutableTagEntries","mutableEntry","nextCount","_remainingKey","hasBoundaryPresence","direct","entryScreenKey","entry","includes","getBoundaryPresence","getBoundaryConfig","setGroupActiveId","group","id","activeId","getGroupActiveId","getGroups"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/presence.ts"],"mappings":";;AACA,SAASA,iBAAiB,EAAoBC,MAAM,EAAEC,QAAQ,QAAQ,SAAS;AAE/E,SAASC,wBAAwBA,CAChCC,GAAU,EACVC,SAAoB,EACpBC,YAA0B,EAC1BC,cAA+B,EAC/BC,YAAqB,EACrBC,qBAAgC,EAC/B;EACD,SAAS;;EACTP,QAAQ,CAACQ,MAAM,CAA2BC,KAAQ,IAAQ;IACzD,SAAS;;IACT,MAAMC,YAAY,GAAGD,KAAsB;IAC3C,IAAIE,UAAU,GAAGD,YAAY,CAACR,GAAG,CAAC;IAClC,IAAI,CAACS,UAAU,EAAE;MAChBA,UAAU,GAAG,CAAC,CAAC;MACfD,YAAY,CAACR,GAAG,CAAC,GAAGS,UAAU;IAC/B;IACA,MAAMC,YAAY,GAAGD,UAAU,CAACR,SAAS,CAAC;IAE1CQ,UAAU,CAACR,SAAS,CAAC,GAAG;MACvBU,KAAK,EAAE,CAACD,YAAY,EAAEC,KAAK,IAAI,CAAC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A,OAAO,IAAI;AACZ;AAEA,SAASsB,gBAAgBA,CAACC,KAAa,EAAEC,EAAU,EAAE;EACpD,SAAS;;EACT9B,MAAM,CAACS,MAAM,CAAyBC,KAAQ,IAAQ;IACrD,SAAS;;IACT,MAAMC,YAAY,GAAGD,KAAoB;IACzCC,YAAY,CAACkB,KAAK,CAAC,GAAG;
|
|
1
|
+
{"version":3,"names":["debugStoreSizeLog","groups","presence","registerBoundaryPresence","tag","screenKey","ancestorKeys","boundaryConfig","navigatorKey","ancestorNavigatorKeys","modify","state","mutableState","tagEntries","currentEntry","count","unregisterBoundaryPresence","value","mutableTagEntries","mutableEntry","nextCount","_remainingKey","hasBoundaryPresence","direct","entryScreenKey","entry","includes","getBoundaryPresence","getBoundaryConfig","setGroupActiveId","group","id","activeId","getGroupActiveId","getGroups"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/presence.ts"],"mappings":";;AACA,SAASA,iBAAiB,EAAoBC,MAAM,EAAEC,QAAQ,QAAQ,SAAS;AAE/E,SAASC,wBAAwBA,CAChCC,GAAU,EACVC,SAAoB,EACpBC,YAA0B,EAC1BC,cAA+B,EAC/BC,YAAqB,EACrBC,qBAAgC,EAC/B;EACD,SAAS;;EACTP,QAAQ,CAACQ,MAAM,CAA2BC,KAAQ,IAAQ;IACzD,SAAS;;IACT,MAAMC,YAAY,GAAGD,KAAsB;IAC3C,IAAIE,UAAU,GAAGD,YAAY,CAACR,GAAG,CAAC;IAClC,IAAI,CAACS,UAAU,EAAE;MAChBA,UAAU,GAAG,CAAC,CAAC;MACfD,YAAY,CAACR,GAAG,CAAC,GAAGS,UAAU;IAC/B;IACA,MAAMC,YAAY,GAAGD,UAAU,CAACR,SAAS,CAAC;IAE1CQ,UAAU,CAACR,SAAS,CAAC,GAAG;MACvBU,KAAK,EAAE,CAACD,YAAY,EAAEC,KAAK,IAAI,CAAC,IAAI,CAAC;MACrCT,YAAY,EAAEA,YAAY,IAAIQ,YAAY,EAAER,YAAY;MACxD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AE;EACpD,SAAS;;EACT9B,MAAM,CAACS,MAAM,CAAyBC,KAAQ,IAAQ;IACrD,SAAS;;IACT,MAAMC,YAAY,GAAGD,KAAoB;IACzCC,YAAY,CAACkB,KAAK,CAAC,GAAG;MACrBE,QAAQ,EAAED;IACX,CAAC;IACD,OAAOpB,KAAK;EACb,CAAC,CAAC;EACFX,iBAAiB,CAAC,oBAAoB8B,KAAK,IAAIC,EAAE,GAAG,CAAC;AACtD;AAEA,SAASE,gBAAgBA,CAACH,KAAa,EAAiB;EACvD,SAAS;;EACT,OAAO7B,MAAM,CAACgB,KAAK,CAACa,KAAK,CAAC,EAAEE,QAAQ,IAAI,IAAI;AAC7C;AAEA,SAASE,SAASA,CAAA,EAAG;EACpB,SAAS;;EACT,OAAOjC,MAAM;AACd;AAEA,SACCE,wBAAwB,EACxBa,0BAA0B,EAC1BM,mBAAmB,EACnBK,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAgB,EAChBI,gBAAgB,EAChBC,SAAS","ignoreList":[]}
|
|
@@ -43,6 +43,7 @@ function getSnapshotBoundsByPriority(tag, keys) {
|
|
|
43
43
|
if (!snapshot) continue;
|
|
44
44
|
return {
|
|
45
45
|
bounds: snapshot.bounds,
|
|
46
|
+
styles: snapshot.styles,
|
|
46
47
|
screenKey: key
|
|
47
48
|
};
|
|
48
49
|
}
|
|
@@ -81,6 +82,8 @@ function resolveTransitionPair(tag, context) {
|
|
|
81
82
|
}
|
|
82
83
|
let sourceBounds = matchedLink?.source?.bounds ?? null;
|
|
83
84
|
let destinationBounds = matchedLink?.destination?.bounds ?? null;
|
|
85
|
+
let sourceStyles = matchedLink?.source?.styles ?? null;
|
|
86
|
+
let destinationStyles = matchedLink?.destination?.styles ?? null;
|
|
84
87
|
let sourceScreenKey = matchedLink?.source?.screenKey ?? null;
|
|
85
88
|
let destinationScreenKey = matchedLink?.destination?.screenKey ?? null;
|
|
86
89
|
let usedSnapshotSource = false;
|
|
@@ -91,6 +94,7 @@ function resolveTransitionPair(tag, context) {
|
|
|
91
94
|
const sourceSnapshot = getSnapshotBoundsByPriority(tag, sourceFallbackKeys);
|
|
92
95
|
if (sourceSnapshot) {
|
|
93
96
|
sourceBounds = sourceSnapshot.bounds;
|
|
97
|
+
sourceStyles = sourceSnapshot.styles;
|
|
94
98
|
sourceScreenKey = sourceSnapshot.screenKey;
|
|
95
99
|
usedSnapshotSource = true;
|
|
96
100
|
}
|
|
@@ -99,6 +103,7 @@ function resolveTransitionPair(tag, context) {
|
|
|
99
103
|
const destinationSnapshot = getSnapshotBoundsByPriority(tag, destinationFallbackKeys);
|
|
100
104
|
if (destinationSnapshot) {
|
|
101
105
|
destinationBounds = destinationSnapshot.bounds;
|
|
106
|
+
destinationStyles = destinationSnapshot.styles;
|
|
102
107
|
destinationScreenKey = destinationSnapshot.screenKey;
|
|
103
108
|
usedSnapshotDestination = true;
|
|
104
109
|
}
|
|
@@ -109,6 +114,8 @@ function resolveTransitionPair(tag, context) {
|
|
|
109
114
|
return {
|
|
110
115
|
sourceBounds,
|
|
111
116
|
destinationBounds,
|
|
117
|
+
sourceStyles,
|
|
118
|
+
destinationStyles,
|
|
112
119
|
sourceScreenKey,
|
|
113
120
|
destinationScreenKey,
|
|
114
121
|
usedPending,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["matchesScreenKey","getSnapshot","debugResolverLog","registry","findLatestLink","tagState","predicate","stack","linkStack","i","length","link","findCompletedLinkByDestination","screenKey","destination","findCompletedLinkBySource","source","findPendingLinkBySource","getSnapshotBoundsByPriority","tag","keys","key","snapshot","bounds","resolveTransitionPair","context","value","matchedLink","usedPending","entering","currentScreenKey","previousScreenKey","nextScreenKey","sourceBounds","destinationBounds","sourceScreenKey","destinationScreenKey","usedSnapshotSource","usedSnapshotDestination","sourceFallbackKeys","destinationFallbackKeys","sourceSnapshot","destinationSnapshot"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/resolver.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["matchesScreenKey","getSnapshot","debugResolverLog","registry","findLatestLink","tagState","predicate","stack","linkStack","i","length","link","findCompletedLinkByDestination","screenKey","destination","findCompletedLinkBySource","source","findPendingLinkBySource","getSnapshotBoundsByPriority","tag","keys","key","snapshot","bounds","styles","resolveTransitionPair","context","value","matchedLink","usedPending","entering","currentScreenKey","previousScreenKey","nextScreenKey","sourceBounds","destinationBounds","sourceStyles","destinationStyles","sourceScreenKey","destinationScreenKey","usedSnapshotSource","usedSnapshotDestination","sourceFallbackKeys","destinationFallbackKeys","sourceSnapshot","destinationSnapshot"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/resolver.ts"],"mappings":";;AACA,SAASA,gBAAgB,QAAQ,qBAAqB;AAStD,SAASC,WAAW,QAAQ,YAAY;AACxC,SAASC,gBAAgB,EAAEC,QAAQ,QAAQ,SAAS;AAEpD,MAAMC,cAAc,GAAGA,CACtBC,QAAkB,EAClBC,SAAqC,KACjB;EACpB,SAAS;;EACT,MAAMC,KAAK,GAAGF,QAAQ,CAACG,SAAS;EAChC,KAAK,IAAIC,CAAC,GAAGF,KAAK,CAACG,MAAM,GAAG,CAAC,EAAED,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;IAC3C,MAAME,IAAI,GAAGJ,KAAK,CAACE,CAAC,CAAC;IACrB,IAAIH,SAAS,CAACK,IAAI,CAAC,EAAE;MACpB,OAAOA,IAAI;IACZ;EACD;EACA,OAAO,IAAI;AACZ,CAAC;AAED,SAASC,8BAA8BA,CACtCP,QAAkB,EAClBQ,SAAqB,EACJ;EACjB,SAAS;;EACT,IAAI,CAACA,SAAS,EAAE,OAAO,IAAI;EAE3B,OAAOT,cAAc,CACpBC,QAAQ,EACPM,IAAI,IACJ,CAAC,CAACA,IAAI,CAACG,WAAW,IAAId,gBAAgB,CAACW,IAAI,CAACG,WAAW,EAAED,SAAS,CACpE,CAAC;AACF;AAEA,SAASE,yBAAyBA,CACjCV,QAAkB,EAClBQ,SA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,IAAI,CAACC,iBAAiB,EAAE;IACxCjC,gBAAgB,CACf,kBAAkBiB,GAAG,aAAaO,OAAO,CAACI,QAAQ,GAAG,CAAC,GAAG,CAAC,WACzDI,YAAY,GAAG,CAAC,GAAG,CAAC,gBACLC,iBAAiB,GAAG,CAAC,GAAG,CAAC,YAAYN,WAAW,GAAG,CAAC,GAAG,CAAC,EACzE,CAAC;EACF;EAEA,OAAO;IACNK,YAAY;IACZC,iBAAiB;IACjBC,YAAY;IACZC,iBAAiB;IACjBC,eAAe;IACfC,oBAAoB;IACpBV,WAAW;IACXW,kBAAkB;IAClBC;EACD,CAAC;AACF;AAEA,SAAShB,qBAAqB","ignoreList":[]}
|
|
@@ -40,6 +40,9 @@ export const animateToProgress = ({
|
|
|
40
40
|
if (!config) {
|
|
41
41
|
animating.set(FALSE);
|
|
42
42
|
progress.set(value);
|
|
43
|
+
if (!isClosing) {
|
|
44
|
+
entering.set(FALSE);
|
|
45
|
+
}
|
|
43
46
|
if (onAnimationFinish) {
|
|
44
47
|
runOnJS(onAnimationFinish)(true);
|
|
45
48
|
}
|
|
@@ -50,6 +53,9 @@ export const animateToProgress = ({
|
|
|
50
53
|
"worklet";
|
|
51
54
|
|
|
52
55
|
if (!finished) return;
|
|
56
|
+
if (!isClosing) {
|
|
57
|
+
entering.set(FALSE);
|
|
58
|
+
}
|
|
53
59
|
if (onAnimationFinish) {
|
|
54
60
|
runOnJS(onAnimationFinish)(finished);
|
|
55
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["runOnJS","FALSE","TRUE","animate","animateToProgress","target","spec","onAnimationFinish","animations","initialVelocity","isClosing","value","config","close","open","isSpringConfig","effectiveConfig","velocity","progress","animating","closing","entering","targetProgress","set","finished","requestAnimationFrame"],"sourceRoot":"../../../../../src","sources":["shared/utils/animation/animate-to-progress.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,yBAAyB;AACjD,SAASC,KAAK,EAAEC,IAAI,QAAQ,iBA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","TRUE","animate","animateToProgress","target","spec","onAnimationFinish","animations","initialVelocity","isClosing","value","config","close","open","isSpringConfig","effectiveConfig","velocity","progress","animating","closing","entering","targetProgress","set","finished","requestAnimationFrame"],"sourceRoot":"../../../../../src","sources":["shared/utils/animation/animate-to-progress.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,yBAAyB;AACjD,SAASC,KAAK,EAAEC,IAAI,QAAQ,iBAAiB;AAG7C,SAASC,OAAO,QAAQ,WAAW;AAiBnC,OAAO,MAAMC,iBAAiB,GAAGA,CAAC;EACjCC,MAAM;EACNC,IAAI;EACJC,iBAAiB;EACjBC,UAAU;EACVC;AACuB,CAAC,KAAK;EAC7B,SAAS;;EAET;EACA,MAAMC,SAAS,GACdL,MAAM,KAAK,OAAO,IAAK,OAAOA,MAAM,KAAK,QAAQ,IAAIA,MAAM,KAAK,CAAE;EACnE,MAAMM,KAAK,GAAG,OAAON,MAAM,KAAK,QAAQ,GAAGA,MAAM,GAAGA,MAAM,KAAK,MAAM,GAAG,CAAC,GAAG,CAAC;;EAE7E;EACA,MAAMO,MAAM,GAAGF,SAAS,GAAGJ,IAAI,EAAEO,KAAK,GAAGP,IAAI,EAAEQ,IAAI;EAEnD,MAAMC,cAAc,GACnB,CAAC,CAACH,MAAM,IAAI,EAAE,UAAU,IAAIA,MAAM,CAAC,IAAI,EAAE,QAAQ,IAAIA,MAAM,CAAC;EAE7D,MAAMI,eAAe,GACpBD,cAAc,IAAI,OAAON,eAAe,KAAK,QAAQ,GAClD;IAAE,GAAGG,MAAM;IAAEK,QAAQ,EAAER;EAAgB,CAAC,GACxCG,MAAM;EAEV,MAAM;IAAEM,QAAQ;IAAEC,SAAS;IAAEC,OAAO;IAAEC,QAAQ;IAAEC;EAAe,CAAC,GAAGd,UAAU;EAE7Ec,cAAc,CAACC,GAAG,CAACZ,KAAK,CAAC;EAEzB,IAAID,SAAS,EAAE;IACdU,OAAO,CAACG,GAAG,CAACrB,IAAI,CAAC;IACjBmB,QAA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