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
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { DerivedValue } from "react-native-reanimated";
|
|
2
|
+
import type { ScreenInterpolationProps } from "../../../../types/animation.types";
|
|
3
|
+
import type { ScreenAnimationTarget } from "../types";
|
|
4
|
+
|
|
5
|
+
type Params = {
|
|
6
|
+
target: ScreenAnimationTarget | undefined;
|
|
7
|
+
self: DerivedValue<ScreenInterpolationProps>;
|
|
8
|
+
ancestors: DerivedValue<ScreenInterpolationProps>[];
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const isAncestorTarget = (
|
|
12
|
+
target: ScreenAnimationTarget,
|
|
13
|
+
): target is { ancestor: number } => {
|
|
14
|
+
return typeof target === "object" && target !== null && "ancestor" in target;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export function resolveScreenAnimationTarget({
|
|
18
|
+
target,
|
|
19
|
+
self,
|
|
20
|
+
ancestors,
|
|
21
|
+
}: Params): DerivedValue<ScreenInterpolationProps> {
|
|
22
|
+
if (!target || target === "self") {
|
|
23
|
+
return self;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (target === "parent") {
|
|
27
|
+
return ancestors[0] ?? self;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (target === "root") {
|
|
31
|
+
return ancestors[ancestors.length - 1] ?? self;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (!isAncestorTarget(target)) {
|
|
35
|
+
return self;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const depth = target.ancestor;
|
|
39
|
+
if (!Number.isInteger(depth) || depth < 1) {
|
|
40
|
+
return self;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return ancestors[depth - 1] ?? self;
|
|
44
|
+
}
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
import type { DerivedValue } from "react-native-reanimated";
|
|
2
|
+
import type { ScreenInterpolationProps } from "../../../types/animation.types";
|
|
1
3
|
import { useScreenAnimationContext } from "./animation.provider";
|
|
4
|
+
import { resolveScreenAnimationTarget } from "./helpers/resolve-screen-animation-target";
|
|
5
|
+
import type { ScreenAnimationTarget } from "./types";
|
|
2
6
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
export type { ScreenAnimationTarget } from "./types";
|
|
8
|
+
|
|
9
|
+
export function useScreenAnimation(
|
|
10
|
+
target?: ScreenAnimationTarget,
|
|
11
|
+
): DerivedValue<ScreenInterpolationProps> {
|
|
12
|
+
const { screenAnimation, ancestorScreenAnimations } =
|
|
13
|
+
useScreenAnimationContext();
|
|
14
|
+
return resolveScreenAnimationTarget({
|
|
15
|
+
target,
|
|
16
|
+
self: screenAnimation,
|
|
17
|
+
ancestors: ancestorScreenAnimations,
|
|
18
|
+
});
|
|
6
19
|
}
|
|
@@ -5,12 +5,12 @@ import { StyleSheet } from "react-native";
|
|
|
5
5
|
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
6
6
|
import { StackType } from "../../types/stack.types";
|
|
7
7
|
import createProvider from "../../utils/create-provider";
|
|
8
|
-
import { ViewportProvider } from "../viewport.provider";
|
|
9
8
|
|
|
10
9
|
export interface StackCoreConfig {
|
|
11
10
|
TRANSITIONS_ALWAYS_ON?: boolean;
|
|
12
11
|
STACK_TYPE?: StackType;
|
|
13
12
|
DISABLE_NATIVE_SCREENS?: boolean;
|
|
13
|
+
DISABLE_NATIVE_SCREEN_CONTAINER?: boolean;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
interface StackCoreProviderProps {
|
|
@@ -23,6 +23,7 @@ export interface StackCoreContextValue {
|
|
|
23
23
|
TRANSITIONS_ALWAYS_ON: boolean;
|
|
24
24
|
STACK_TYPE?: StackType;
|
|
25
25
|
DISABLE_NATIVE_SCREENS: boolean;
|
|
26
|
+
DISABLE_NATIVE_SCREEN_CONTAINER: boolean;
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
|
|
@@ -34,18 +35,27 @@ const { StackCoreProvider: InternalStackCoreProvider, useStackCoreContext } =
|
|
|
34
35
|
const {
|
|
35
36
|
TRANSITIONS_ALWAYS_ON = false,
|
|
36
37
|
DISABLE_NATIVE_SCREENS = false,
|
|
38
|
+
DISABLE_NATIVE_SCREEN_CONTAINER = false,
|
|
37
39
|
STACK_TYPE = StackType.BLANK,
|
|
38
40
|
} = config;
|
|
39
41
|
|
|
40
42
|
const flags = useMemo(
|
|
41
|
-
() => ({
|
|
42
|
-
|
|
43
|
+
() => ({
|
|
44
|
+
TRANSITIONS_ALWAYS_ON,
|
|
45
|
+
STACK_TYPE,
|
|
46
|
+
DISABLE_NATIVE_SCREENS,
|
|
47
|
+
DISABLE_NATIVE_SCREEN_CONTAINER,
|
|
48
|
+
}),
|
|
49
|
+
[
|
|
50
|
+
TRANSITIONS_ALWAYS_ON,
|
|
51
|
+
STACK_TYPE,
|
|
52
|
+
DISABLE_NATIVE_SCREENS,
|
|
53
|
+
DISABLE_NATIVE_SCREEN_CONTAINER,
|
|
54
|
+
],
|
|
43
55
|
);
|
|
44
56
|
|
|
45
|
-
const value = useMemo(() => ({ flags }), [flags]);
|
|
46
|
-
|
|
47
57
|
return {
|
|
48
|
-
value,
|
|
58
|
+
value: { flags },
|
|
49
59
|
children: (
|
|
50
60
|
<GestureHandlerRootView
|
|
51
61
|
style={styles.container}
|
|
@@ -53,9 +63,7 @@ const { StackCoreProvider: InternalStackCoreProvider, useStackCoreContext } =
|
|
|
53
63
|
STACK_TYPE === StackType.COMPONENT ? "box-none" : undefined
|
|
54
64
|
}
|
|
55
65
|
>
|
|
56
|
-
<SafeAreaProviderCompat>
|
|
57
|
-
<ViewportProvider>{children}</ViewportProvider>
|
|
58
|
-
</SafeAreaProviderCompat>
|
|
66
|
+
<SafeAreaProviderCompat>{children}</SafeAreaProviderCompat>
|
|
59
67
|
</GestureHandlerRootView>
|
|
60
68
|
),
|
|
61
69
|
};
|
|
@@ -71,16 +79,21 @@ export function withStackCore<TProps extends object>(
|
|
|
71
79
|
): React.FC<TProps & StackCoreConfig> {
|
|
72
80
|
return function StackCoreWrapper({
|
|
73
81
|
DISABLE_NATIVE_SCREENS,
|
|
82
|
+
DISABLE_NATIVE_SCREEN_CONTAINER,
|
|
74
83
|
TRANSITIONS_ALWAYS_ON,
|
|
75
84
|
STACK_TYPE,
|
|
76
85
|
...props
|
|
77
86
|
}: TProps & StackCoreConfig) {
|
|
78
|
-
//
|
|
87
|
+
// Start from defaults, then apply explicit overrides from the caller.
|
|
79
88
|
const config: StackCoreConfig = {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
TRANSITIONS_ALWAYS_ON:
|
|
90
|
+
TRANSITIONS_ALWAYS_ON ?? defaultConfig.TRANSITIONS_ALWAYS_ON,
|
|
91
|
+
STACK_TYPE: STACK_TYPE ?? defaultConfig.STACK_TYPE,
|
|
92
|
+
DISABLE_NATIVE_SCREENS:
|
|
93
|
+
DISABLE_NATIVE_SCREENS ?? defaultConfig.DISABLE_NATIVE_SCREENS,
|
|
94
|
+
DISABLE_NATIVE_SCREEN_CONTAINER:
|
|
95
|
+
DISABLE_NATIVE_SCREEN_CONTAINER ??
|
|
96
|
+
defaultConfig.DISABLE_NATIVE_SCREEN_CONTAINER,
|
|
84
97
|
};
|
|
85
98
|
return (
|
|
86
99
|
<InternalStackCoreProvider config={config}>
|
|
@@ -14,7 +14,7 @@ import type {
|
|
|
14
14
|
DirectStackProps,
|
|
15
15
|
DirectStackScene,
|
|
16
16
|
} from "../../types/providers/direct-stack.types";
|
|
17
|
-
import {
|
|
17
|
+
import { isOverlayVisible } from "../../utils/overlay/visibility";
|
|
18
18
|
import { useStackCoreContext } from "./core.provider";
|
|
19
19
|
import { useStackDerived } from "./helpers/use-stack-derived";
|
|
20
20
|
|
|
@@ -64,10 +64,7 @@ function useDirectStackValue(
|
|
|
64
64
|
|
|
65
65
|
if (!shouldShowFloatOverlay && descriptor) {
|
|
66
66
|
const options = descriptor.options;
|
|
67
|
-
if (
|
|
68
|
-
options?.enableTransitions === true &&
|
|
69
|
-
isFloatOverlayVisible(options)
|
|
70
|
-
) {
|
|
67
|
+
if (options?.enableTransitions === true && isOverlayVisible(options)) {
|
|
71
68
|
shouldShowFloatOverlay = true;
|
|
72
69
|
}
|
|
73
70
|
}
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
BaseStackDescriptor,
|
|
8
8
|
BaseStackScene,
|
|
9
9
|
} from "../../../types/stack.types";
|
|
10
|
-
import {
|
|
10
|
+
import { isOverlayVisible } from "../../../utils/overlay/visibility";
|
|
11
11
|
|
|
12
12
|
export interface ProcessedRoutes<
|
|
13
13
|
TDescriptor extends BaseStackDescriptor = BaseStackDescriptor,
|
|
@@ -52,7 +52,7 @@ export function useProcessedRoutes<
|
|
|
52
52
|
animationMaps[i] = AnimationStore.getRouteAnimations(route.key);
|
|
53
53
|
|
|
54
54
|
if (!shouldShowFloatOverlay) {
|
|
55
|
-
shouldShowFloatOverlay =
|
|
55
|
+
shouldShowFloatOverlay = isOverlayVisible(options);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
if (!stopLimit) {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
makeMutable,
|
|
4
4
|
type SharedValue,
|
|
5
5
|
} from "react-native-reanimated";
|
|
6
|
-
import type { ScreenKey } from "../types/screen.types";
|
|
6
|
+
import type { Layout, ScreenKey } from "../types/screen.types";
|
|
7
7
|
|
|
8
8
|
export type AnimationStoreMap = {
|
|
9
9
|
progress: SharedValue<number>;
|
|
@@ -11,6 +11,10 @@ export type AnimationStoreMap = {
|
|
|
11
11
|
closing: SharedValue<number>;
|
|
12
12
|
entering: SharedValue<number>;
|
|
13
13
|
targetProgress: SharedValue<number>;
|
|
14
|
+
/** Resolved fraction (contentHeight / screenHeight) for the 'auto' snap point. -1 = not yet measured. */
|
|
15
|
+
autoSnapPoint: SharedValue<number>;
|
|
16
|
+
/** Intrinsic content layout measured from the screen container wrapper. */
|
|
17
|
+
contentLayout: SharedValue<Layout | null>;
|
|
14
18
|
};
|
|
15
19
|
|
|
16
20
|
const store: Record<ScreenKey, AnimationStoreMap> = {};
|
|
@@ -20,8 +24,10 @@ function createAnimationBag(): AnimationStoreMap {
|
|
|
20
24
|
progress: makeMutable(0),
|
|
21
25
|
closing: makeMutable(0),
|
|
22
26
|
animating: makeMutable(0),
|
|
23
|
-
entering: makeMutable(
|
|
27
|
+
entering: makeMutable(0),
|
|
24
28
|
targetProgress: makeMutable(1),
|
|
29
|
+
autoSnapPoint: makeMutable(-1),
|
|
30
|
+
contentLayout: makeMutable<Layout | null>(null),
|
|
25
31
|
};
|
|
26
32
|
}
|
|
27
33
|
|
|
@@ -40,13 +46,20 @@ function peekRouteAnimations(
|
|
|
40
46
|
return store[routeKey];
|
|
41
47
|
}
|
|
42
48
|
|
|
43
|
-
function getRouteAnimation(
|
|
49
|
+
function getRouteAnimation<K extends keyof AnimationStoreMap>(
|
|
44
50
|
routeKey: ScreenKey,
|
|
45
|
-
type:
|
|
46
|
-
):
|
|
51
|
+
type: K,
|
|
52
|
+
): AnimationStoreMap[K] {
|
|
47
53
|
return ensure(routeKey)[type];
|
|
48
54
|
}
|
|
49
55
|
|
|
56
|
+
function getAnimation<K extends keyof AnimationStoreMap>(
|
|
57
|
+
routeKey: ScreenKey,
|
|
58
|
+
type: K,
|
|
59
|
+
): AnimationStoreMap[K] {
|
|
60
|
+
return getRouteAnimation(routeKey, type);
|
|
61
|
+
}
|
|
62
|
+
|
|
50
63
|
function getRouteAnimations(routeKey: ScreenKey): AnimationStoreMap {
|
|
51
64
|
return ensure(routeKey);
|
|
52
65
|
}
|
|
@@ -59,11 +72,14 @@ function clear(routeKey: ScreenKey) {
|
|
|
59
72
|
cancelAnimation(bag.closing);
|
|
60
73
|
cancelAnimation(bag.entering);
|
|
61
74
|
cancelAnimation(bag.targetProgress);
|
|
75
|
+
cancelAnimation(bag.autoSnapPoint);
|
|
76
|
+
cancelAnimation(bag.contentLayout);
|
|
62
77
|
}
|
|
63
78
|
delete store[routeKey];
|
|
64
79
|
}
|
|
65
80
|
|
|
66
81
|
export const AnimationStore = {
|
|
82
|
+
getAnimation,
|
|
67
83
|
peekRouteAnimations,
|
|
68
84
|
getRouteAnimation,
|
|
69
85
|
getRouteAnimations,
|
|
@@ -118,7 +118,9 @@ function setGroupActiveId(group: string, id: string) {
|
|
|
118
118
|
groups.modify(<T extends GroupsState>(state: T): T => {
|
|
119
119
|
"worklet";
|
|
120
120
|
const mutableState = state as GroupsState;
|
|
121
|
-
mutableState[group] = {
|
|
121
|
+
mutableState[group] = {
|
|
122
|
+
activeId: id,
|
|
123
|
+
};
|
|
122
124
|
return state;
|
|
123
125
|
});
|
|
124
126
|
debugStoreSizeLog(`setGroupActiveId(${group},${id})`);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
1
2
|
import { matchesScreenKey } from "../helpers/matching";
|
|
2
3
|
import type {
|
|
3
4
|
ResolvedTransitionPair,
|
|
@@ -69,7 +70,11 @@ function findPendingLinkBySource(
|
|
|
69
70
|
function getSnapshotBoundsByPriority(
|
|
70
71
|
tag: TagID,
|
|
71
72
|
keys: (ScreenKey | undefined)[],
|
|
72
|
-
): {
|
|
73
|
+
): {
|
|
74
|
+
bounds: MeasuredDimensions;
|
|
75
|
+
styles: StyleProps;
|
|
76
|
+
screenKey: ScreenKey;
|
|
77
|
+
} | null {
|
|
73
78
|
"worklet";
|
|
74
79
|
for (let i = 0; i < keys.length; i++) {
|
|
75
80
|
const key = keys[i];
|
|
@@ -78,6 +83,7 @@ function getSnapshotBoundsByPriority(
|
|
|
78
83
|
if (!snapshot) continue;
|
|
79
84
|
return {
|
|
80
85
|
bounds: snapshot.bounds,
|
|
86
|
+
styles: snapshot.styles,
|
|
81
87
|
screenKey: key,
|
|
82
88
|
};
|
|
83
89
|
}
|
|
@@ -149,6 +155,8 @@ function resolveTransitionPair(
|
|
|
149
155
|
|
|
150
156
|
let sourceBounds = matchedLink?.source?.bounds ?? null;
|
|
151
157
|
let destinationBounds = matchedLink?.destination?.bounds ?? null;
|
|
158
|
+
let sourceStyles = matchedLink?.source?.styles ?? null;
|
|
159
|
+
let destinationStyles = matchedLink?.destination?.styles ?? null;
|
|
152
160
|
let sourceScreenKey = matchedLink?.source?.screenKey ?? null;
|
|
153
161
|
let destinationScreenKey = matchedLink?.destination?.screenKey ?? null;
|
|
154
162
|
let usedSnapshotSource = false;
|
|
@@ -174,6 +182,7 @@ function resolveTransitionPair(
|
|
|
174
182
|
const sourceSnapshot = getSnapshotBoundsByPriority(tag, sourceFallbackKeys);
|
|
175
183
|
if (sourceSnapshot) {
|
|
176
184
|
sourceBounds = sourceSnapshot.bounds;
|
|
185
|
+
sourceStyles = sourceSnapshot.styles;
|
|
177
186
|
sourceScreenKey = sourceSnapshot.screenKey;
|
|
178
187
|
usedSnapshotSource = true;
|
|
179
188
|
}
|
|
@@ -186,6 +195,7 @@ function resolveTransitionPair(
|
|
|
186
195
|
);
|
|
187
196
|
if (destinationSnapshot) {
|
|
188
197
|
destinationBounds = destinationSnapshot.bounds;
|
|
198
|
+
destinationStyles = destinationSnapshot.styles;
|
|
189
199
|
destinationScreenKey = destinationSnapshot.screenKey;
|
|
190
200
|
usedSnapshotDestination = true;
|
|
191
201
|
}
|
|
@@ -202,6 +212,8 @@ function resolveTransitionPair(
|
|
|
202
212
|
return {
|
|
203
213
|
sourceBounds,
|
|
204
214
|
destinationBounds,
|
|
215
|
+
sourceStyles,
|
|
216
|
+
destinationStyles,
|
|
205
217
|
sourceScreenKey,
|
|
206
218
|
destinationScreenKey,
|
|
207
219
|
usedPending,
|
|
@@ -43,6 +43,8 @@ export type ResolveTransitionContext = {
|
|
|
43
43
|
export type ResolvedTransitionPair = {
|
|
44
44
|
sourceBounds: MeasuredDimensions | null;
|
|
45
45
|
destinationBounds: MeasuredDimensions | null;
|
|
46
|
+
sourceStyles: StyleProps | null;
|
|
47
|
+
destinationStyles: StyleProps | null;
|
|
46
48
|
sourceScreenKey: ScreenKey | null;
|
|
47
49
|
destinationScreenKey: ScreenKey | null;
|
|
48
50
|
usedPending: boolean;
|
|
@@ -10,17 +10,6 @@ import type { GestureValues } from "./gesture.types";
|
|
|
10
10
|
import type { Layout } from "./screen.types";
|
|
11
11
|
import type { BaseStackRoute } from "./stack.types";
|
|
12
12
|
|
|
13
|
-
export interface OverlayInterpolationProps {
|
|
14
|
-
progress: number;
|
|
15
|
-
layouts: {
|
|
16
|
-
/**
|
|
17
|
-
* The `width` and `height` of the screen container.
|
|
18
|
-
*/
|
|
19
|
-
screen: Layout;
|
|
20
|
-
};
|
|
21
|
-
insets: EdgeInsets;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
13
|
export type ScreenTransitionState = {
|
|
25
14
|
/**
|
|
26
15
|
* Animation progress for this screen.
|
|
@@ -42,11 +31,11 @@ export type ScreenTransitionState = {
|
|
|
42
31
|
closing: number;
|
|
43
32
|
|
|
44
33
|
/**
|
|
45
|
-
* Whether this screen is in
|
|
46
|
-
* - `0`: Screen is
|
|
47
|
-
* - `1`: Screen is opening/entering
|
|
34
|
+
* Whether this screen is actively in its opening phase.
|
|
35
|
+
* - `0`: Screen is settled, inactive, or closing
|
|
36
|
+
* - `1`: Screen is currently opening/entering
|
|
48
37
|
*
|
|
49
|
-
*
|
|
38
|
+
* This flips back to `0` once the open animation finishes.
|
|
50
39
|
*/
|
|
51
40
|
entering: number;
|
|
52
41
|
|
|
@@ -114,6 +103,13 @@ export interface ScreenInterpolationProps {
|
|
|
114
103
|
* The `width` and `height` of the screen container.
|
|
115
104
|
*/
|
|
116
105
|
screen: Layout;
|
|
106
|
+
/**
|
|
107
|
+
* The intrinsic measured content wrapper layout when available.
|
|
108
|
+
*
|
|
109
|
+
* This is currently populated for the measured screen-container path used by
|
|
110
|
+
* auto snap-point sizing. It is undefined until a real measurement exists.
|
|
111
|
+
*/
|
|
112
|
+
content?: Layout;
|
|
117
113
|
};
|
|
118
114
|
|
|
119
115
|
/**
|
|
@@ -169,18 +165,6 @@ export interface ScreenInterpolationProps {
|
|
|
169
165
|
* When focused, this is the previous screen. When not focused, this is the current screen.
|
|
170
166
|
*/
|
|
171
167
|
inactive: ScreenTransitionState | undefined;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Whether the active screen is currently transitioning (either being dragged or animating).
|
|
175
|
-
* @deprecated Use `active.animating` instead.
|
|
176
|
-
*/
|
|
177
|
-
isActiveTransitioning: boolean;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Whether the active screen is in the process of being dismissed/closed.
|
|
181
|
-
* @deprecated Use `active.closing` instead.
|
|
182
|
-
*/
|
|
183
|
-
isDismissing: boolean;
|
|
184
168
|
}
|
|
185
169
|
|
|
186
170
|
export type ScreenStyleInterpolator = (
|
|
@@ -195,17 +179,11 @@ export type ScreenStyleInterpolator = (
|
|
|
195
179
|
*/
|
|
196
180
|
export type AnimatedViewStyle = ViewStyle & TextStyle;
|
|
197
181
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
*
|
|
201
|
-
* - `style` is applied via `useAnimatedStyle` (transform, opacity, backgroundColor, etc.)
|
|
202
|
-
* - `props` is applied via `useAnimatedProps` (component-specific props like BlurView intensity)
|
|
203
|
-
*/
|
|
204
|
-
export type TransitionSlotExplicit = {
|
|
205
|
-
/** Animated styles applied via useAnimatedStyle. */
|
|
182
|
+
type TransitionSlotDefinition = {
|
|
183
|
+
/** Animated styles applied via `useAnimatedStyle`. */
|
|
206
184
|
style?: AnimatedViewStyle;
|
|
207
|
-
/** Animated props applied via useAnimatedProps
|
|
208
|
-
props?: Record<string,
|
|
185
|
+
/** Animated props applied via `useAnimatedProps`. */
|
|
186
|
+
props?: Record<string, unknown>;
|
|
209
187
|
};
|
|
210
188
|
|
|
211
189
|
/**
|
|
@@ -215,7 +193,7 @@ export type TransitionSlotExplicit = {
|
|
|
215
193
|
* - **Shorthand**: Write styles directly — `{ opacity: 0.5, transform: [...] }`
|
|
216
194
|
* - **Explicit**: Use `style` and/or `props` buckets — `{ style: { opacity: 0.5 }, props: { intensity: 80 } }`
|
|
217
195
|
*/
|
|
218
|
-
export type TransitionSlotStyle = AnimatedViewStyle |
|
|
196
|
+
export type TransitionSlotStyle = AnimatedViewStyle | TransitionSlotDefinition;
|
|
219
197
|
|
|
220
198
|
/**
|
|
221
199
|
* Internal normalized slot format used after the backward-compat shim.
|
|
@@ -223,7 +201,7 @@ export type TransitionSlotStyle = AnimatedViewStyle | TransitionSlotExplicit;
|
|
|
223
201
|
*/
|
|
224
202
|
export type NormalizedTransitionSlotStyle = {
|
|
225
203
|
style?: StyleProps;
|
|
226
|
-
props?: Record<string,
|
|
204
|
+
props?: Record<string, unknown>;
|
|
227
205
|
};
|
|
228
206
|
|
|
229
207
|
/**
|
|
@@ -242,10 +220,10 @@ export type NormalizedTransitionInterpolatedStyle = {
|
|
|
242
220
|
};
|
|
243
221
|
|
|
244
222
|
/**
|
|
245
|
-
*
|
|
246
|
-
* Uses
|
|
223
|
+
* The return type of `screenStyleInterpolator`.
|
|
224
|
+
* Uses the nested slot format, while still accepting deprecated flat keys.
|
|
247
225
|
*/
|
|
248
|
-
export type
|
|
226
|
+
export type TransitionInterpolatedStyle = {
|
|
249
227
|
/** Animated style and props for the main screen content view. */
|
|
250
228
|
content?: TransitionSlotStyle;
|
|
251
229
|
/** Animated style and props for the backdrop layer between screens. */
|
|
@@ -254,27 +232,23 @@ export type NewTransitionInterpolatedStyle = {
|
|
|
254
232
|
surface?: TransitionSlotStyle;
|
|
255
233
|
/** Custom styles/props by id for Transition.View components. */
|
|
256
234
|
[id: string]: TransitionSlotStyle | undefined;
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
* This flat format is auto-converted via a backward-compat shim.
|
|
262
|
-
*/
|
|
263
|
-
export type LegacyTransitionInterpolatedStyle = {
|
|
235
|
+
/**
|
|
236
|
+
* @deprecated Use `content` instead.
|
|
237
|
+
* This flat format is auto-converted via a backward-compat shim.
|
|
238
|
+
*/
|
|
264
239
|
contentStyle?: AnimatedViewStyle;
|
|
240
|
+
/**
|
|
241
|
+
* @deprecated Use `backdrop` instead.
|
|
242
|
+
* This flat format is auto-converted via a backward-compat shim.
|
|
243
|
+
*/
|
|
265
244
|
backdropStyle?: AnimatedViewStyle;
|
|
245
|
+
/**
|
|
246
|
+
* @deprecated Use `backdrop` instead.
|
|
247
|
+
* This flat format is auto-converted via a backward-compat shim.
|
|
248
|
+
*/
|
|
266
249
|
overlayStyle?: AnimatedViewStyle;
|
|
267
|
-
[id: string]: AnimatedViewStyle | undefined;
|
|
268
250
|
};
|
|
269
251
|
|
|
270
|
-
/**
|
|
271
|
-
* The return type of `screenStyleInterpolator`.
|
|
272
|
-
* Accepts both the new nested format and the legacy flat format (auto-converted).
|
|
273
|
-
*/
|
|
274
|
-
export type TransitionInterpolatedStyle =
|
|
275
|
-
| NewTransitionInterpolatedStyle
|
|
276
|
-
| LegacyTransitionInterpolatedStyle;
|
|
277
|
-
|
|
278
252
|
/**
|
|
279
253
|
* A Reanimated animation configuration object.
|
|
280
254
|
*/
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
2
2
|
import type { Snapshot } from "../stores/bounds";
|
|
3
3
|
import type {
|
|
4
|
+
BoundId,
|
|
5
|
+
BoundsAnchor,
|
|
4
6
|
BoundsOptions,
|
|
5
7
|
BoundsOptionsResult,
|
|
8
|
+
BoundsScaleMode,
|
|
6
9
|
} from "../utils/bounds/types/options";
|
|
7
10
|
import type { TransitionInterpolatedStyle } from "./animation.types";
|
|
8
11
|
|
|
@@ -25,16 +28,33 @@ export type BoundsLink = {
|
|
|
25
28
|
destination: BoundEntry | null;
|
|
26
29
|
};
|
|
27
30
|
|
|
28
|
-
export type
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
export type BoundsNavigationZoomOptions = {
|
|
32
|
+
anchor?: BoundsAnchor;
|
|
33
|
+
scaleMode?: BoundsScaleMode;
|
|
34
|
+
target?: "bound" | "fullscreen" | MeasuredDimensions;
|
|
35
|
+
mask?: {
|
|
36
|
+
borderRadius?: number | "auto" | { from?: number; to?: number };
|
|
37
|
+
borderTopLeftRadius?: number | "auto" | { from?: number; to?: number };
|
|
38
|
+
borderTopRightRadius?: number | "auto" | { from?: number; to?: number };
|
|
39
|
+
borderBottomLeftRadius?: number | "auto" | { from?: number; to?: number };
|
|
40
|
+
borderBottomRightRadius?: number | "auto" | { from?: number; to?: number };
|
|
41
|
+
borderCurve?: "circular" | "continuous";
|
|
42
|
+
outset?:
|
|
43
|
+
| number
|
|
44
|
+
| { top?: number; right?: number; bottom?: number; left?: number };
|
|
45
|
+
};
|
|
46
|
+
motion?: {
|
|
47
|
+
dragResistance?: number;
|
|
48
|
+
dragDirectionalScaleMin?: number;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Use `mask.borderRadius` instead.
|
|
52
|
+
*/
|
|
33
53
|
maskBorderRadius?: number;
|
|
34
54
|
};
|
|
35
55
|
|
|
36
56
|
export type BoundsNavigationAccessor = {
|
|
37
|
-
zoom: () => TransitionInterpolatedStyle;
|
|
57
|
+
zoom: (options?: BoundsNavigationZoomOptions) => TransitionInterpolatedStyle;
|
|
38
58
|
};
|
|
39
59
|
|
|
40
60
|
type BoundsBoundNavigationAccessor = {
|
|
@@ -46,15 +66,15 @@ type BoundsCallResult<T extends BoundsOptions> = BoundsOptionsResult<T> &
|
|
|
46
66
|
|
|
47
67
|
export type BoundsAccessor = {
|
|
48
68
|
<T extends BoundsOptions>(options: T): BoundsCallResult<T>;
|
|
49
|
-
getSnapshot: (id:
|
|
50
|
-
getLink: (id:
|
|
69
|
+
getSnapshot: (id: BoundId, key?: string) => Snapshot | null;
|
|
70
|
+
getLink: (id: BoundId) => BoundsLink | null;
|
|
51
71
|
interpolateStyle: (
|
|
52
|
-
id:
|
|
72
|
+
id: BoundId,
|
|
53
73
|
property: keyof StyleProps,
|
|
54
74
|
fallback?: number,
|
|
55
75
|
) => number;
|
|
56
76
|
interpolateBounds: (
|
|
57
|
-
id:
|
|
77
|
+
id: BoundId,
|
|
58
78
|
property: keyof MeasuredDimensions,
|
|
59
79
|
fallbackOrTargetKey?: number | string,
|
|
60
80
|
fallback?: number,
|
|
@@ -2,28 +2,18 @@ export { FALSE, TRUE } from "../constants";
|
|
|
2
2
|
export type {
|
|
3
3
|
AnimatedViewStyle,
|
|
4
4
|
AnimationConfig,
|
|
5
|
-
LegacyTransitionInterpolatedStyle,
|
|
6
|
-
NewTransitionInterpolatedStyle,
|
|
7
|
-
NormalizedTransitionInterpolatedStyle,
|
|
8
|
-
NormalizedTransitionSlotStyle,
|
|
9
|
-
OverlayInterpolationProps,
|
|
10
5
|
ScreenInterpolationProps,
|
|
11
6
|
ScreenStyleInterpolator,
|
|
12
7
|
ScreenTransitionState,
|
|
13
8
|
TransitionInterpolatedStyle,
|
|
14
|
-
TransitionSlotExplicit,
|
|
15
9
|
TransitionSlotStyle,
|
|
16
10
|
TransitionSpec,
|
|
17
11
|
} from "./animation.types";
|
|
18
12
|
export type {
|
|
19
|
-
BoundEntry,
|
|
20
13
|
BoundsAccessor,
|
|
21
|
-
BoundsLink,
|
|
22
14
|
BoundsMethod,
|
|
23
15
|
BoundsNavigationAccessor,
|
|
24
|
-
|
|
25
|
-
BoundsNavigationPreset,
|
|
26
|
-
BoundsStyleOptions,
|
|
16
|
+
BoundsNavigationZoomOptions,
|
|
27
17
|
} from "./bounds.types";
|
|
28
18
|
export type {
|
|
29
19
|
ActivationArea,
|
|
@@ -32,10 +22,7 @@ export type {
|
|
|
32
22
|
GestureValues,
|
|
33
23
|
SideActivation,
|
|
34
24
|
} from "./gesture.types";
|
|
35
|
-
export type {
|
|
36
|
-
OverlayMode,
|
|
37
|
-
OverlayProps,
|
|
38
|
-
} from "./overlay.types";
|
|
25
|
+
export type { OverlayProps } from "./overlay.types";
|
|
39
26
|
export type {
|
|
40
27
|
Layout,
|
|
41
28
|
ScreenKey,
|