react-native-screen-transitions 4.0.0-alpha.0 → 4.0.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/lib/commonjs/animation/snap-to.js +2 -0
- package/lib/commonjs/animation/snap-to.js.map +1 -1
- package/lib/commonjs/components/boundary/components/boundary-target.js +19 -20
- package/lib/commonjs/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/components/boundary/create-boundary-component.js +16 -2
- package/lib/commonjs/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/commonjs/components/boundary/hooks/lifecycles/use-refresh-boundary.js +5 -0
- package/lib/commonjs/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/commonjs/components/boundary/hooks/use-boundary-measurement.js +1 -3
- package/lib/commonjs/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/commonjs/components/boundary/index.js +4 -3
- package/lib/commonjs/components/boundary/index.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/components/host.js +5 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +47 -188
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/index.js +21 -13
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/host.js +1 -12
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +40 -33
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +3 -4
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +46 -131
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/index.js +45 -9
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +2 -29
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/utils/handoff-target.js +33 -0
- package/lib/commonjs/components/boundary/portal/utils/handoff-target.js.map +1 -0
- package/lib/commonjs/components/boundary/portal/utils/resolve-portal.js +19 -15
- package/lib/commonjs/components/boundary/portal/utils/resolve-portal.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/utils/teleport-control.js +1 -10
- package/lib/commonjs/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/commonjs/components/boundary/providers/boundary-root.provider.js +18 -36
- package/lib/commonjs/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/commonjs/components/boundary/utils/refresh-signals.js +7 -0
- package/lib/commonjs/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/commonjs/components/boundary/utils/resolve-boundary-target.js +29 -0
- package/lib/commonjs/components/boundary/utils/resolve-boundary-target.js.map +1 -0
- package/lib/commonjs/components/masked-view.js +9 -1
- package/lib/commonjs/components/masked-view.js.map +1 -1
- package/lib/commonjs/components/screen-container/layers/backdrop.js +3 -1
- package/lib/commonjs/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/components/screen-container/layers/maybe-masked-navigation-container.js +9 -1
- package/lib/commonjs/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/commonjs/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -0
- package/lib/commonjs/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
- package/lib/commonjs/navigators/react-navigation/index.js +7 -8
- package/lib/commonjs/navigators/react-navigation/index.js.map +1 -1
- package/lib/commonjs/providers/helpers/measured-bounds-writes.js +4 -1
- package/lib/commonjs/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/gestures.provider.js +2 -8
- package/lib/commonjs/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
- package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/pinch/activation/use-pinch-activation.js +37 -3
- package/lib/commonjs/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +1 -0
- package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-release.js +3 -2
- package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/types.js.map +1 -1
- package/lib/commonjs/providers/screen/styles/helpers/transition-visual-state.js +42 -0
- package/lib/commonjs/providers/screen/styles/helpers/transition-visual-state.js.map +1 -0
- package/lib/commonjs/providers/screen/styles/helpers/visibility-gate.js +11 -5
- package/lib/commonjs/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
- package/lib/commonjs/providers/screen/styles/hooks/use-interpolated-style-maps.js +23 -10
- package/lib/commonjs/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/providers/screen/styles/hooks/use-maybe-block-visibility.js +10 -8
- package/lib/commonjs/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/commonjs/stores/bounds/internals/links.js +4 -4
- package/lib/commonjs/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/stores/scroll.store.js +20 -2
- package/lib/commonjs/stores/scroll.store.js.map +1 -1
- package/lib/commonjs/stores/system.store.js +2 -0
- package/lib/commonjs/stores/system.store.js.map +1 -1
- package/lib/commonjs/utils/animation/animate-to-progress.js +23 -1
- package/lib/commonjs/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/commonjs/utils/animation/animate.js +14 -2
- package/lib/commonjs/utils/animation/animate.js.map +1 -1
- package/lib/commonjs/utils/animation/spring/spring.js +22 -2
- package/lib/commonjs/utils/animation/spring/spring.js.map +1 -1
- package/lib/commonjs/utils/animation/spring/springUtils.js +96 -0
- package/lib/commonjs/utils/animation/spring/springUtils.js.map +1 -1
- package/lib/commonjs/utils/animation/state.js +4 -0
- package/lib/commonjs/utils/bounds/navigation/reveal/math.js +17 -5
- package/lib/commonjs/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/commonjs/utils/bounds/navigation/zoom/build.js +44 -20
- package/lib/commonjs/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/commonjs/utils/bounds/navigation/zoom/drag.js +2 -31
- package/lib/commonjs/utils/bounds/navigation/zoom/drag.js.map +1 -1
- package/lib/commonjs/utils/bounds/navigation/zoom/helpers.js +3 -17
- package/lib/commonjs/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/module/animation/snap-to.js +2 -0
- package/lib/module/animation/snap-to.js.map +1 -1
- package/lib/module/components/boundary/components/boundary-target.js +19 -20
- package/lib/module/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/components/boundary/create-boundary-component.js +17 -3
- package/lib/module/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/components/boundary/hooks/lifecycles/use-refresh-boundary.js +5 -0
- package/lib/module/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/module/components/boundary/hooks/use-boundary-measurement.js +1 -3
- package/lib/module/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/module/components/boundary/index.js +3 -2
- package/lib/module/components/boundary/index.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/components/host.js +5 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/components/host.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +49 -190
- package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/index.js +21 -13
- package/lib/module/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/components/host.js +2 -13
- package/lib/module/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +43 -36
- package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +3 -4
- package/lib/module/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +50 -135
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/index.js +44 -9
- package/lib/module/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -27
- package/lib/module/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/module/components/boundary/portal/utils/handoff-target.js +28 -0
- package/lib/module/components/boundary/portal/utils/handoff-target.js.map +1 -0
- package/lib/module/components/boundary/portal/utils/resolve-portal.js +19 -15
- package/lib/module/components/boundary/portal/utils/resolve-portal.js.map +1 -1
- package/lib/module/components/boundary/portal/utils/teleport-control.js +0 -8
- package/lib/module/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/module/components/boundary/providers/boundary-root.provider.js +19 -37
- package/lib/module/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/module/components/boundary/utils/refresh-signals.js +7 -0
- package/lib/module/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/module/components/boundary/utils/resolve-boundary-target.js +24 -0
- package/lib/module/components/boundary/utils/resolve-boundary-target.js.map +1 -0
- package/lib/module/components/masked-view.js +10 -2
- package/lib/module/components/masked-view.js.map +1 -1
- package/lib/module/components/screen-container/layers/backdrop.js +3 -1
- package/lib/module/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/components/screen-container/layers/maybe-masked-navigation-container.js +10 -2
- package/lib/module/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/module/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -0
- package/lib/module/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
- package/lib/module/navigators/react-navigation/index.js +4 -6
- package/lib/module/navigators/react-navigation/index.js.map +1 -1
- package/lib/module/providers/helpers/measured-bounds-writes.js +4 -1
- package/lib/module/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/module/providers/screen/gestures/gestures.provider.js +2 -8
- package/lib/module/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/module/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
- package/lib/module/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
- package/lib/module/providers/screen/gestures/pinch/activation/use-pinch-activation.js +35 -2
- package/lib/module/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
- package/lib/module/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +1 -0
- package/lib/module/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/module/providers/screen/gestures/pinch/behavior/pinch-release.js +3 -2
- package/lib/module/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
- package/lib/module/providers/screen/gestures/types.js.map +1 -1
- package/lib/module/providers/screen/styles/helpers/transition-visual-state.js +35 -0
- package/lib/module/providers/screen/styles/helpers/transition-visual-state.js.map +1 -0
- package/lib/module/providers/screen/styles/helpers/visibility-gate.js +11 -5
- package/lib/module/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
- package/lib/module/providers/screen/styles/hooks/use-interpolated-style-maps.js +23 -10
- package/lib/module/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/providers/screen/styles/hooks/use-maybe-block-visibility.js +10 -8
- package/lib/module/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/module/stores/bounds/internals/links.js +4 -4
- package/lib/module/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/stores/scroll.store.js +17 -0
- package/lib/module/stores/scroll.store.js.map +1 -1
- package/lib/module/stores/system.store.js +2 -0
- package/lib/module/stores/system.store.js.map +1 -1
- package/lib/module/utils/animation/animate-to-progress.js +21 -0
- package/lib/module/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/module/utils/animation/animate.js +14 -2
- package/lib/module/utils/animation/animate.js.map +1 -1
- package/lib/module/utils/animation/spring/spring.js +23 -3
- package/lib/module/utils/animation/spring/spring.js.map +1 -1
- package/lib/module/utils/animation/spring/springUtils.js +95 -0
- package/lib/module/utils/animation/spring/springUtils.js.map +1 -1
- package/lib/module/utils/animation/state.js +2 -0
- package/lib/module/utils/bounds/navigation/reveal/math.js +16 -5
- package/lib/module/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/module/utils/bounds/navigation/zoom/build.js +46 -22
- package/lib/module/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/utils/bounds/navigation/zoom/drag.js +2 -30
- package/lib/module/utils/bounds/navigation/zoom/drag.js.map +1 -1
- package/lib/module/utils/bounds/navigation/zoom/helpers.js +4 -18
- package/lib/module/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/typescript/animation/snap-to.d.ts.map +1 -1
- package/lib/typescript/components/boundary/components/boundary-target.d.ts +2 -1
- package/lib/typescript/components/boundary/components/boundary-target.d.ts.map +1 -1
- package/lib/typescript/components/boundary/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -1
- package/lib/typescript/components/boundary/hooks/use-boundary-measurement.d.ts +3 -4
- package/lib/typescript/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
- package/lib/typescript/components/boundary/index.d.ts +6 -9
- package/lib/typescript/components/boundary/index.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts +1 -3
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/index.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts +1 -10
- package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts +1 -3
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts +2 -2
- package/lib/typescript/components/boundary/portal/components/boundary-portal/index.d.ts +2 -2
- package/lib/typescript/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +1 -10
- package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/utils/handoff-target.d.ts +12 -0
- package/lib/typescript/components/boundary/portal/utils/handoff-target.d.ts.map +1 -0
- package/lib/typescript/components/boundary/portal/utils/resolve-portal.d.ts +2 -3
- package/lib/typescript/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/utils/teleport-control.d.ts +0 -4
- package/lib/typescript/components/boundary/portal/utils/teleport-control.d.ts.map +1 -1
- package/lib/typescript/components/boundary/providers/boundary-root.provider.d.ts +8 -12
- package/lib/typescript/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
- package/lib/typescript/components/boundary/utils/refresh-signals.d.ts +1 -0
- package/lib/typescript/components/boundary/utils/refresh-signals.d.ts.map +1 -1
- package/lib/typescript/components/boundary/utils/resolve-boundary-target.d.ts +12 -0
- package/lib/typescript/components/boundary/utils/resolve-boundary-target.d.ts.map +1 -0
- package/lib/typescript/components/create-transition-aware-component.d.ts +5 -6
- package/lib/typescript/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/components/masked-view.d.ts.map +1 -1
- package/lib/typescript/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
- package/lib/typescript/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +650 -702
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/navigators/react-navigation/index.d.ts +6 -17
- package/lib/typescript/navigators/react-navigation/index.d.ts.map +1 -1
- package/lib/typescript/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/gestures.provider.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts +2 -1
- package/lib/typescript/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/pinch/behavior/pinch-release.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/types.d.ts +1 -9
- package/lib/typescript/providers/screen/gestures/types.d.ts.map +1 -1
- package/lib/typescript/providers/screen/styles/helpers/transition-visual-state.d.ts +18 -0
- package/lib/typescript/providers/screen/styles/helpers/transition-visual-state.d.ts.map +1 -0
- package/lib/typescript/providers/screen/styles/helpers/visibility-gate.d.ts +2 -2
- package/lib/typescript/providers/screen/styles/helpers/visibility-gate.d.ts.map +1 -1
- package/lib/typescript/providers/screen/styles/hooks/slot-resolvers.d.ts +4 -4
- package/lib/typescript/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -1
- package/lib/typescript/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +2 -2
- package/lib/typescript/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
- package/lib/typescript/stores/bounds/internals/links.d.ts +1 -1
- package/lib/typescript/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/stores/scroll.store.d.ts +7 -0
- package/lib/typescript/stores/scroll.store.d.ts.map +1 -1
- package/lib/typescript/stores/system.store.d.ts +5 -0
- package/lib/typescript/stores/system.store.d.ts.map +1 -1
- package/lib/typescript/utils/animation/animate-to-progress.d.ts +6 -1
- package/lib/typescript/utils/animation/animate-to-progress.d.ts.map +1 -1
- package/lib/typescript/utils/animation/animate.d.ts +2 -2
- package/lib/typescript/utils/animation/animate.d.ts.map +1 -1
- package/lib/typescript/utils/animation/spring/spring.d.ts +2 -2
- package/lib/typescript/utils/animation/spring/spring.d.ts.map +1 -1
- package/lib/typescript/utils/animation/spring/springUtils.d.ts +3 -0
- package/lib/typescript/utils/animation/spring/springUtils.d.ts.map +1 -1
- package/lib/typescript/utils/animation/state.d.ts +6 -0
- package/lib/typescript/utils/animation/state.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/navigation/reveal/math.d.ts +9 -0
- package/lib/typescript/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/navigation/zoom/drag.d.ts +2 -11
- package/lib/typescript/utils/bounds/navigation/zoom/drag.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/navigation/zoom/helpers.d.ts +7 -4
- package/lib/typescript/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/animation/snap-to.ts +5 -0
- package/src/components/boundary/components/boundary-target.tsx +37 -23
- package/src/components/boundary/create-boundary-component.tsx +29 -3
- package/src/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +11 -0
- package/src/components/boundary/hooks/use-boundary-measurement.ts +3 -9
- package/src/components/boundary/index.tsx +4 -8
- package/src/components/boundary/portal/components/boundary-content-portal/components/host.tsx +5 -1
- package/src/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +73 -276
- package/src/components/boundary/portal/components/boundary-content-portal/index.tsx +31 -12
- package/src/components/boundary/portal/components/boundary-portal/components/host.tsx +2 -12
- package/src/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +64 -62
- package/src/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts +2 -9
- package/src/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +73 -187
- package/src/components/boundary/portal/components/boundary-portal/index.tsx +72 -12
- package/src/components/boundary/portal/components/boundary-portal/stores/host-registry.store.ts +0 -1
- package/src/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +2 -39
- package/src/components/boundary/portal/utils/handoff-target.ts +48 -0
- package/src/components/boundary/portal/utils/resolve-portal.ts +26 -18
- package/src/components/boundary/portal/utils/teleport-control.ts +0 -12
- package/src/components/boundary/providers/boundary-root.provider.tsx +28 -80
- package/src/components/boundary/utils/refresh-signals.ts +8 -0
- package/src/components/boundary/utils/resolve-boundary-target.tsx +39 -0
- package/src/components/masked-view.tsx +20 -4
- package/src/components/screen-container/layers/backdrop.tsx +3 -1
- package/src/components/screen-container/layers/maybe-masked-navigation-container.tsx +14 -4
- package/src/components/screen-lifecycle/hooks/use-transition-start-controller.ts +2 -0
- package/src/navigators/react-navigation/index.tsx +4 -48
- package/src/providers/helpers/measured-bounds-writes.ts +1 -0
- package/src/providers/screen/gestures/gestures.provider.tsx +2 -10
- package/src/providers/screen/gestures/pan/behavior/pan-lifecycle.ts +1 -0
- package/src/providers/screen/gestures/pinch/activation/use-pinch-activation.ts +74 -3
- package/src/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +1 -0
- package/src/providers/screen/gestures/pinch/behavior/pinch-release.ts +2 -4
- package/src/providers/screen/gestures/types.ts +0 -14
- package/src/providers/screen/styles/helpers/transition-visual-state.ts +44 -0
- package/src/providers/screen/styles/helpers/visibility-gate.ts +17 -7
- package/src/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +30 -15
- package/src/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +14 -13
- package/src/stores/bounds/internals/links.ts +13 -2
- package/src/stores/scroll.store.ts +23 -0
- package/src/stores/system.store.ts +8 -0
- package/src/utils/animation/animate-to-progress.ts +59 -28
- package/src/utils/animation/animate.ts +18 -2
- package/src/utils/animation/spring/spring.ts +36 -1
- package/src/utils/animation/spring/springUtils.ts +130 -0
- package/src/utils/animation/state.ts +8 -0
- package/src/utils/bounds/navigation/reveal/math.ts +21 -5
- package/src/utils/bounds/navigation/zoom/build.ts +77 -23
- package/src/utils/bounds/navigation/zoom/drag.ts +3 -42
- package/src/utils/bounds/navigation/zoom/helpers.ts +9 -23
- package/lib/commonjs/components/boundary/hooks/use-register-target.js +0 -32
- package/lib/commonjs/components/boundary/hooks/use-register-target.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-slot.js +0 -52
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/utils/ownership.js +0 -220
- package/lib/commonjs/components/boundary/portal/utils/ownership.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/utils/shallow-equal.js +0 -29
- package/lib/commonjs/components/boundary/portal/utils/shallow-equal.js.map +0 -1
- package/lib/commonjs/components/boundary/portal/utils/visible-host.js +0 -25
- package/lib/commonjs/components/boundary/portal/utils/visible-host.js.map +0 -1
- package/lib/commonjs/providers/screen/gestures/rotation/activation/use-rotation-activation.js +0 -64
- package/lib/commonjs/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +0 -1
- package/lib/commonjs/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +0 -21
- package/lib/commonjs/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +0 -1
- package/lib/commonjs/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +0 -29
- package/lib/commonjs/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +0 -1
- package/lib/commonjs/providers/screen/gestures/rotation/use-build-rotation-gesture.js +0 -38
- package/lib/commonjs/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +0 -1
- package/lib/commonjs/providers/screen/styles/helpers/opening-phase.js +0 -32
- package/lib/commonjs/providers/screen/styles/helpers/opening-phase.js.map +0 -1
- package/lib/module/components/boundary/hooks/use-register-target.js +0 -27
- package/lib/module/components/boundary/hooks/use-register-target.js.map +0 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-slot.js +0 -47
- package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +0 -1
- package/lib/module/components/boundary/portal/utils/ownership.js +0 -213
- package/lib/module/components/boundary/portal/utils/ownership.js.map +0 -1
- package/lib/module/components/boundary/portal/utils/shallow-equal.js +0 -24
- package/lib/module/components/boundary/portal/utils/shallow-equal.js.map +0 -1
- package/lib/module/components/boundary/portal/utils/visible-host.js +0 -20
- package/lib/module/components/boundary/portal/utils/visible-host.js.map +0 -1
- package/lib/module/providers/screen/gestures/rotation/activation/use-rotation-activation.js +0 -59
- package/lib/module/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +0 -1
- package/lib/module/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +0 -15
- package/lib/module/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +0 -1
- package/lib/module/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +0 -24
- package/lib/module/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +0 -1
- package/lib/module/providers/screen/gestures/rotation/use-build-rotation-gesture.js +0 -33
- package/lib/module/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +0 -1
- package/lib/module/providers/screen/styles/helpers/opening-phase.js +0 -26
- package/lib/module/providers/screen/styles/helpers/opening-phase.js.map +0 -1
- package/lib/typescript/components/boundary/hooks/use-register-target.d.ts +0 -10
- package/lib/typescript/components/boundary/hooks/use-register-target.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts +0 -13
- package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/utils/ownership.d.ts +0 -34
- package/lib/typescript/components/boundary/portal/utils/ownership.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/utils/shallow-equal.d.ts +0 -8
- package/lib/typescript/components/boundary/portal/utils/shallow-equal.d.ts.map +0 -1
- package/lib/typescript/components/boundary/portal/utils/visible-host.d.ts +0 -8
- package/lib/typescript/components/boundary/portal/utils/visible-host.d.ts.map +0 -1
- package/lib/typescript/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts +0 -15
- package/lib/typescript/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts.map +0 -1
- package/lib/typescript/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts +0 -4
- package/lib/typescript/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts.map +0 -1
- package/lib/typescript/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts +0 -5
- package/lib/typescript/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts.map +0 -1
- package/lib/typescript/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts +0 -9
- package/lib/typescript/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts.map +0 -1
- package/lib/typescript/providers/screen/styles/helpers/opening-phase.d.ts +0 -16
- package/lib/typescript/providers/screen/styles/helpers/opening-phase.d.ts.map +0 -1
- package/src/components/boundary/hooks/use-register-target.ts +0 -43
- package/src/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx +0 -80
- package/src/components/boundary/portal/utils/ownership.ts +0 -319
- package/src/components/boundary/portal/utils/shallow-equal.ts +0 -25
- package/src/components/boundary/portal/utils/visible-host.ts +0 -24
- package/src/providers/screen/gestures/rotation/activation/use-rotation-activation.ts +0 -88
- package/src/providers/screen/gestures/rotation/behavior/rotation-lifecycle.ts +0 -19
- package/src/providers/screen/gestures/rotation/behavior/use-rotation-behavior.ts +0 -47
- package/src/providers/screen/gestures/rotation/use-build-rotation-gesture.ts +0 -50
- package/src/providers/screen/styles/helpers/opening-phase.ts +0 -25
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.animateToProgress = void 0;
|
|
6
|
+
exports.resolveAnimationProgressRange = exports.animateToProgress = void 0;
|
|
7
7
|
var _reactNativeWorklets = require("react-native-worklets");
|
|
8
8
|
var _constants = require("../../constants");
|
|
9
9
|
var _animate = require("./animate");
|
|
@@ -15,16 +15,27 @@ const setTransitionLifecycleFlags = (animations, isClosing, markEntering) => {
|
|
|
15
15
|
animations.entering.set(_constants.FALSE);
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
+
animations.closing.set(_constants.FALSE);
|
|
18
19
|
if (markEntering) {
|
|
19
20
|
animations.entering.set(_constants.TRUE);
|
|
20
21
|
}
|
|
21
22
|
};
|
|
23
|
+
const resolveAnimationProgressRange = (currentProgress, targetProgress) => {
|
|
24
|
+
"worklet";
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
from: Math.min(1, Math.max(0, currentProgress)),
|
|
28
|
+
to: targetProgress
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
exports.resolveAnimationProgressRange = resolveAnimationProgressRange;
|
|
22
32
|
const animateToProgress = ({
|
|
23
33
|
target,
|
|
24
34
|
spec,
|
|
25
35
|
onAnimationFinish,
|
|
26
36
|
animations,
|
|
27
37
|
targetProgress,
|
|
38
|
+
animationProgress,
|
|
28
39
|
emitWillAnimate = true,
|
|
29
40
|
markEntering = true,
|
|
30
41
|
initialVelocity
|
|
@@ -52,13 +63,19 @@ const animateToProgress = ({
|
|
|
52
63
|
const startAnimation = () => {
|
|
53
64
|
"worklet";
|
|
54
65
|
|
|
66
|
+
const {
|
|
67
|
+
from: animationProgressFrom,
|
|
68
|
+
to: animationProgressTo
|
|
69
|
+
} = resolveAnimationProgressRange(transitionProgress.get(), value);
|
|
55
70
|
targetProgress.set(value);
|
|
71
|
+
animationProgress.set(animationProgressFrom);
|
|
56
72
|
const shouldClearEnteringOnFinish = !isClosing && (markEntering || entering.get());
|
|
57
73
|
setTransitionLifecycleFlags(animations, isClosing, markEntering);
|
|
58
74
|
if (!config) {
|
|
59
75
|
progressAnimating.set(_constants.FALSE);
|
|
60
76
|
progressSettled.set(_constants.TRUE);
|
|
61
77
|
transitionProgress.set(value);
|
|
78
|
+
animationProgress.set(animationProgressTo);
|
|
62
79
|
if (shouldClearEnteringOnFinish) {
|
|
63
80
|
entering.set(_constants.FALSE);
|
|
64
81
|
}
|
|
@@ -76,6 +93,7 @@ const animateToProgress = ({
|
|
|
76
93
|
progressSettled.set(_constants.TRUE);
|
|
77
94
|
}
|
|
78
95
|
if (!state.finished) return;
|
|
96
|
+
animationProgress.set(animationProgressTo);
|
|
79
97
|
if (shouldClearEnteringOnFinish) {
|
|
80
98
|
entering.set(_constants.FALSE);
|
|
81
99
|
}
|
|
@@ -104,6 +122,10 @@ const animateToProgress = ({
|
|
|
104
122
|
progressAnimating.set(_constants.FALSE);
|
|
105
123
|
});
|
|
106
124
|
}
|
|
125
|
+
}, {
|
|
126
|
+
value: animationProgress,
|
|
127
|
+
from: animationProgressFrom,
|
|
128
|
+
to: animationProgressTo
|
|
107
129
|
}));
|
|
108
130
|
};
|
|
109
131
|
if (emitWillAnimate) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeWorklets","require","_constants","_animate","setTransitionLifecycleFlags","animations","isClosing","markEntering","closing","set","TRUE","entering","FALSE","animateToProgress","target","spec","onAnimationFinish","
|
|
1
|
+
{"version":3,"names":["_reactNativeWorklets","require","_constants","_animate","setTransitionLifecycleFlags","animations","isClosing","markEntering","closing","set","TRUE","entering","FALSE","resolveAnimationProgressRange","currentProgress","targetProgress","from","Math","min","max","to","exports","animateToProgress","target","spec","onAnimationFinish","animationProgress","emitWillAnimate","initialVelocity","value","config","close","open","isSpringConfig","isSpringAnimationConfig","effectiveConfig","velocity","transitionProgress","willAnimate","progressAnimating","progressSettled","startAnimation","animationProgressFrom","animationProgressTo","get","shouldClearEnteringOnFinish","scheduleOnRN","animate","state","settled","finished","requestAnimationFrame"],"sourceRoot":"../../../../src","sources":["utils/animation/animate-to-progress.ts"],"mappings":";;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAGA,IAAAE,QAAA,GAAAF,OAAA;AAqBA,MAAMG,2BAA2B,GAAGA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CAAC7B,GAAG,CAACG,gBAAK,CAAC;MACtB6B,cAAc,CAAC,CAAC;IACjB,CAAC,CAAC;IACF;EACD;EAEAA,cAAc,CAAC,CAAC;AACjB,CAAC;AAACpB,OAAA,CAAAC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -6,6 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.isSpringAnimationConfig = exports.animate = void 0;
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
8
|
var _spring = require("./spring");
|
|
9
|
+
const linearEasing = progress => {
|
|
10
|
+
"worklet";
|
|
11
|
+
|
|
12
|
+
return progress;
|
|
13
|
+
};
|
|
9
14
|
const isSpringAnimationConfig = config => {
|
|
10
15
|
"worklet";
|
|
11
16
|
|
|
@@ -15,10 +20,17 @@ const isSpringAnimationConfig = config => {
|
|
|
15
20
|
return "stiffness" in config || "damping" in config || "mass" in config || "velocity" in config || "overshootClamping" in config || "energyThreshold" in config || "dampingRatio" in config || "clamp" in config;
|
|
16
21
|
};
|
|
17
22
|
exports.isSpringAnimationConfig = isSpringAnimationConfig;
|
|
18
|
-
const animate = (toValue, config, callback) => {
|
|
23
|
+
const animate = (toValue, config, callback, animationProgress) => {
|
|
19
24
|
"worklet";
|
|
20
25
|
|
|
21
26
|
if (!isSpringAnimationConfig(config)) {
|
|
27
|
+
if (animationProgress) {
|
|
28
|
+
animationProgress.value.set(animationProgress.from);
|
|
29
|
+
animationProgress.value.set((0, _reactNativeReanimated.withTiming)(animationProgress.to, {
|
|
30
|
+
...config,
|
|
31
|
+
easing: linearEasing
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
22
34
|
return (0, _reactNativeReanimated.withTiming)(toValue, config, finished => {
|
|
23
35
|
"worklet";
|
|
24
36
|
|
|
@@ -29,7 +41,7 @@ const animate = (toValue, config, callback) => {
|
|
|
29
41
|
});
|
|
30
42
|
});
|
|
31
43
|
}
|
|
32
|
-
return (0, _spring.withInternalSpring)(toValue, config, callback);
|
|
44
|
+
return (0, _spring.withInternalSpring)(toValue, config, callback, animationProgress);
|
|
33
45
|
};
|
|
34
46
|
exports.animate = animate;
|
|
35
47
|
//# sourceMappingURL=animate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_spring","isSpringAnimationConfig","config","exports","animate","toValue","callback","withTiming","finished","didFinish","settled","withInternalSpring"],"sourceRoot":"../../../../src","sources":["utils/animation/animate.ts"],"mappings":";;;;;;AACA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_spring","linearEasing","progress","isSpringAnimationConfig","config","exports","animate","toValue","callback","animationProgress","value","set","from","withTiming","to","easing","finished","didFinish","settled","withInternalSpring"],"sourceRoot":"../../../../src","sources":["utils/animation/animate.ts"],"mappings":";;;;;;AACA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AASA,MAAME,YAAY,GAAIC,QAAgB,IAAK;EAC1C,SAAS;;EACT,OAAOA,QAAQ;AAChB,CAAC;AAEM,MAAMC,uBAAuB,GACnCC,MAAyC,IACJ;EACrC,SAAS;;EACT,IAAI,OAAOA,MAAM,KAAK,QAAQ,IAAIA,MAAM,KAAK,IAAI,EAAE;IAClD,OAAO,KAAK;EACb;EAEA,OACC,WAAW,IAAIA,MAAM,IACrB,SAAS,IAAIA,MAAM,IACnB,MAAM,IAAIA,MAAM,IAChB,UAAU,IAAIA,MAAM,IACpB,mBAAmB,IAAIA,MAAM,IAC7B,iBAAiB,IAAIA,MAAM,IAC3B,cAAc,IAAIA,MAAM,IACxB,OAAO,IAAIA,MAAM;AAEnB,CAAC;AAACC,OAAA,CAAAF,uBAAA,GAAAA,uBAAA;AAEK,MAAMG,OAAO,GAAGA,CACtBC,OAAe,EACfH,MAA8B,EAC9BI,QAAiC,EACjCC,iBAA2C,KACvC;EACJ,SAAS;;EAET,IAAI,CAACN,uBAAuB,CAACC,MAAM,CAAC,EAAE;IACrC,IAAIK,iBAAiB,EAAE;MACtBA,iBAAiB,CAACC,KAAK,CAACC,GAAG,CAACF,iBAAiB,CAACG,IAAI,CAAC;MACnDH,iBAAiB,CAACC,KAAK,CAACC,GAAG,CAC1B,IAAAE,iCAAU,EAACJ,iBAAiB,CAACK,EAAE,EAAE;QAChC,GAAGV,MAAM;QACTW,MAAM,EAAEd;MACT,CAAC,CACF,CAAC;IACF;IAEA,OAAO,IAAAY,iCAAU,EAACN,OAAO,EAAEH,MAAM,EAAGY,QAAQ,IAAK;MAChD,SAAS;;MACT,MAAMC,SAAS,GAAGD,QAAQ,KAAK,IAAI;MACnCR,QAAQ,GAAG;QACVQ,QAAQ,EAAEC,SAAS;QACnBC,OAAO,EAAED;MACV,CAAC,CAAC;IACH,CAAC,CAAC;EACH;EAEA,OAAO,IAAAE,0BAAkB,EAACZ,OAAO,EAAEH,MAAM,EAAEI,QAAQ,EAAEC,iBAAiB,CAAC;AACxE,CAAC;AAACJ,OAAA,CAAAC,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ const REACT_NATIVE_RUNTIME_KIND = 1;
|
|
|
9
9
|
const REDUCE_MOTION_SYSTEM = "system";
|
|
10
10
|
const REDUCE_MOTION_ALWAYS = "always";
|
|
11
11
|
const DEFAULT_SPRING_SETTLE_DISTANCE = 0.001;
|
|
12
|
+
const MAX_UNFINISHED_ANIMATION_PROGRESS = 1 - 1e-6;
|
|
12
13
|
const DEFAULT_SPRING_CONFIG = {
|
|
13
14
|
damping: 120,
|
|
14
15
|
mass: 4,
|
|
@@ -34,7 +35,7 @@ const getReduceMotionForAnimation = config => {
|
|
|
34
35
|
}
|
|
35
36
|
return config === REDUCE_MOTION_ALWAYS;
|
|
36
37
|
};
|
|
37
|
-
const defineSpringAnimation = (_starting, factory) => {
|
|
38
|
+
const defineSpringAnimation = (_starting, factory, onReducedMotion) => {
|
|
38
39
|
"worklet";
|
|
39
40
|
|
|
40
41
|
const create = () => {
|
|
@@ -46,6 +47,7 @@ const defineSpringAnimation = (_starting, factory) => {
|
|
|
46
47
|
"worklet";
|
|
47
48
|
|
|
48
49
|
if (animation.reduceMotion) {
|
|
50
|
+
onReducedMotion?.();
|
|
49
51
|
animation.current = animation.toValue;
|
|
50
52
|
animation.onFrame = () => true;
|
|
51
53
|
return;
|
|
@@ -78,9 +80,10 @@ const defineSpringAnimation = (_starting, factory) => {
|
|
|
78
80
|
* to the native spring handoff behavior while keeping our own surface small and
|
|
79
81
|
* easy to extend with callbacks tailored to the transition lifecycle.
|
|
80
82
|
*/
|
|
81
|
-
const withInternalSpring = (toValue, userConfig, callback) => {
|
|
83
|
+
const withInternalSpring = (toValue, userConfig, callback, animationProgress) => {
|
|
82
84
|
"worklet";
|
|
83
85
|
|
|
86
|
+
// biome-ignore format: Keep this Reanimated fork aligned with its upstream layout.
|
|
84
87
|
return defineSpringAnimation(toValue, () => {
|
|
85
88
|
"worklet";
|
|
86
89
|
|
|
@@ -119,6 +122,7 @@ const withInternalSpring = (toValue, userConfig, callback) => {
|
|
|
119
122
|
} = animation;
|
|
120
123
|
if (config.skipAnimation) {
|
|
121
124
|
animation.current = toValue;
|
|
125
|
+
animationProgress?.value.set(animationProgress.to);
|
|
122
126
|
animation.lastTimestamp = 0;
|
|
123
127
|
return true;
|
|
124
128
|
}
|
|
@@ -128,6 +132,7 @@ const withInternalSpring = (toValue, userConfig, callback) => {
|
|
|
128
132
|
} = animation;
|
|
129
133
|
const deltaTime = Math.min(Math.max(now - lastTimestamp, 0), 64);
|
|
130
134
|
animation.lastTimestamp = now;
|
|
135
|
+
animation.animationProgressElapsed += deltaTime;
|
|
131
136
|
const t = deltaTime / 1000;
|
|
132
137
|
const v0 = velocity;
|
|
133
138
|
const x0 = current - toValue;
|
|
@@ -157,6 +162,7 @@ const withInternalSpring = (toValue, userConfig, callback) => {
|
|
|
157
162
|
if ((0, _springUtils.isAnimationTerminatingCalculation)(animation, config)) {
|
|
158
163
|
animation.velocity = 0;
|
|
159
164
|
animation.current = toValue;
|
|
165
|
+
animationProgress?.value.set(animationProgress.to);
|
|
160
166
|
settled = true;
|
|
161
167
|
animation.settled = true;
|
|
162
168
|
// clear lastTimestamp to avoid using stale value by the next spring animation that starts after this one
|
|
@@ -164,6 +170,11 @@ const withInternalSpring = (toValue, userConfig, callback) => {
|
|
|
164
170
|
return true;
|
|
165
171
|
}
|
|
166
172
|
notifySettled(animation);
|
|
173
|
+
if (animationProgress) {
|
|
174
|
+
const elapsedFraction = animation.animationProgressDuration <= 0 ? MAX_UNFINISHED_ANIMATION_PROGRESS : Math.min(animation.animationProgressElapsed / animation.animationProgressDuration, MAX_UNFINISHED_ANIMATION_PROGRESS);
|
|
175
|
+
const nextAnimationProgress = animationProgress.from + (animationProgress.to - animationProgress.from) * elapsedFraction;
|
|
176
|
+
animationProgress.value.set(nextAnimationProgress);
|
|
177
|
+
}
|
|
167
178
|
return false;
|
|
168
179
|
}
|
|
169
180
|
function isTriggeredTwice(previousAnimation, animation) {
|
|
@@ -212,6 +223,9 @@ const withInternalSpring = (toValue, userConfig, callback) => {
|
|
|
212
223
|
}
|
|
213
224
|
const initialEnergy = (0, _springUtils.getEnergy)(x0, config.velocity, config.stiffness, config.mass);
|
|
214
225
|
animation.initialEnergy = initialEnergy;
|
|
226
|
+
animation.animationProgressElapsed = 0;
|
|
227
|
+
animation.animationProgressDuration = config.skipAnimation ? 0 : (0, _springUtils.calculateSpringAnimationDuration)(animation, config);
|
|
228
|
+
animationProgress?.value.set(animationProgress.from);
|
|
215
229
|
animation.lastTimestamp = previousAnimation?.lastTimestamp || now;
|
|
216
230
|
animation.startTimestamp = triggeredTwice ? previousAnimation?.startTimestamp || now : now;
|
|
217
231
|
notifySettled(animation);
|
|
@@ -239,9 +253,15 @@ const withInternalSpring = (toValue, userConfig, callback) => {
|
|
|
239
253
|
omega0: 0,
|
|
240
254
|
omega1: 0,
|
|
241
255
|
initialEnergy: 0,
|
|
256
|
+
animationProgressElapsed: 0,
|
|
257
|
+
animationProgressDuration: 0,
|
|
242
258
|
reduceMotion: getReduceMotionForAnimation(config.reduceMotion)
|
|
243
259
|
};
|
|
244
260
|
return animation;
|
|
261
|
+
}, () => {
|
|
262
|
+
"worklet";
|
|
263
|
+
|
|
264
|
+
animationProgress?.value.set(animationProgress.to);
|
|
245
265
|
});
|
|
246
266
|
};
|
|
247
267
|
exports.withInternalSpring = withInternalSpring;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_springUtils","require","REACT_NATIVE_RUNTIME_KIND","REDUCE_MOTION_SYSTEM","REDUCE_MOTION_ALWAYS","DEFAULT_SPRING_SETTLE_DISTANCE","DEFAULT_SPRING_CONFIG","damping","mass","stiffness","duration","dampingRatio","overshootClamping","energyThreshold","velocity","reduceMotion","undefined","clamp","getRuntimeKind","globalThis","__RUNTIME_KIND","getReduceMotionForAnimation","config","defineSpringAnimation","_starting","factory","create","animation","baseOnStart","onStart","value","timestamp","previousAnimation","current","toValue","onFrame","__isAnimationDefinition","withInternalSpring","userConfig","callback","safeMergeConfigs","useDuration","skipAnimation","settleDistance","settled","notifySettled","isAnimationSettledCalculation","finished","checkIfConfigIsValid","springOnFrame","now","lastTimestamp","deltaTime","Math","min","max","t","v0","x0","zeta","omega0","omega1","position","newPosition","newVelocity","underDampedSpringCalculations","criticallyDampedSpringCalculations","isAnimationTerminatingCalculation","isTriggeredTwice","startTimestamp","triggeredTwice","startValue","actualDuration","calculateNewStiffnessToMatchDuration","initialCalculations","scaleZetaToMatchClamps","initialEnergy","getEnergy","didFinish","exports"],"sourceRoot":"../../../../../src","sources":["utils/animation/spring/spring.ts"],"mappings":";;;;;;AAaA,IAAAA,YAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_springUtils","require","REACT_NATIVE_RUNTIME_KIND","REDUCE_MOTION_SYSTEM","REDUCE_MOTION_ALWAYS","DEFAULT_SPRING_SETTLE_DISTANCE","MAX_UNFINISHED_ANIMATION_PROGRESS","DEFAULT_SPRING_CONFIG","damping","mass","stiffness","duration","dampingRatio","overshootClamping","energyThreshold","velocity","reduceMotion","undefined","clamp","getRuntimeKind","globalThis","__RUNTIME_KIND","getReduceMotionForAnimation","config","defineSpringAnimation","_starting","factory","onReducedMotion","create","animation","baseOnStart","onStart","value","timestamp","previousAnimation","current","toValue","onFrame","__isAnimationDefinition","withInternalSpring","userConfig","callback","animationProgress","safeMergeConfigs","useDuration","skipAnimation","settleDistance","settled","notifySettled","isAnimationSettledCalculation","finished","checkIfConfigIsValid","springOnFrame","now","set","to","lastTimestamp","deltaTime","Math","min","max","animationProgressElapsed","t","v0","x0","zeta","omega0","omega1","position","newPosition","newVelocity","underDampedSpringCalculations","criticallyDampedSpringCalculations","isAnimationTerminatingCalculation","elapsedFraction","animationProgressDuration","nextAnimationProgress","from","isTriggeredTwice","startTimestamp","triggeredTwice","startValue","actualDuration","calculateNewStiffnessToMatchDuration","initialCalculations","scaleZetaToMatchClamps","initialEnergy","getEnergy","calculateSpringAnimationDuration","didFinish","exports"],"sourceRoot":"../../../../../src","sources":["utils/animation/spring/spring.ts"],"mappings":";;;;;;AAaA,IAAAA,YAAA,GAAAC,OAAA;AAgBA,MAAMC,yBAAyB,GAAG,CAAC;AACnC,MAAMC,oBAAoB,GAAG,QAAQ;AACrC,MAAMC,oBAAoB,GAAG,QAAQ;AACrC,MAAMC,8BAA8B,GAAG,KAAK;AAC5C,MAAMC,iCAAiC,GAAG,CAAC,GAAG,IAAI;AAElD,MAAMC,qBAAqB,GAAG;EAC7BC,OAAO,EAAE,GAAG;EACZC,IAAI,EAAE,CAAC;EACPC,SAAS,EAAE,GAAG;EACdC,QAAQ,EAAE,GAAG;EACbC,YAAY,EAAE,CAAC;EACfC,iBAAiB,EAAE,KAAK;EACxBC,eAAe,EAAE,IAAI;EACrBC,QAAQ,EAAE,CAAC;EACXC,YAAY,EAAEC,SAAS;EACvBC,KAAK,EA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IAAI,EAAE,CAAC;MACPC,MAAM,EAAE,CAAC;MACTC,MAAM,EAAE,CAAC;MACTmB,aAAa,EAAE,CAAC;MAChBzB,wBAAwB,EAAE,CAAC;MAC3Bc,yBAAyB,EAAE,CAAC;MAC5B3D,YAAY,EAAEM,2BAA2B,CAACC,MAAM,CAACP,YAAY;IAC9D,CAAoB;IAEpB,OAAOa,SAAS;EACjB,CAAC,EAAE,MAAM;IACR,SAAS;;IACTa,iBAAiB,EAAEV,KAAK,CAACsB,GAAG,CAACZ,iBAAiB,CAACa,EAAE,CAAC;EACnD,CAAC,CAAC;AACH,CAA+B;AAACmC,OAAA,CAAAnD,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.calculateNewStiffnessToMatchDuration = calculateNewStiffnessToMatchDuration;
|
|
7
|
+
exports.calculateSpringAnimationDuration = calculateSpringAnimationDuration;
|
|
7
8
|
exports.checkIfConfigIsValid = checkIfConfigIsValid;
|
|
8
9
|
exports.criticallyDampedSpringCalculations = criticallyDampedSpringCalculations;
|
|
9
10
|
exports.getEnergy = getEnergy;
|
|
@@ -274,6 +275,101 @@ function underDampedSpringCalculations(animation, precalculatedValues) {
|
|
|
274
275
|
velocity: underDampedVelocity
|
|
275
276
|
};
|
|
276
277
|
}
|
|
278
|
+
const MAX_SPRING_DURATION_SECONDS = 60;
|
|
279
|
+
const SPRING_DURATION_PRECISION_SECONDS = 0.0001;
|
|
280
|
+
const MAX_OVERSHOOT_DURATION_SAMPLES = 4096;
|
|
281
|
+
function calculateSpringAnimationDuration(animation, config) {
|
|
282
|
+
"worklet";
|
|
283
|
+
|
|
284
|
+
const startPosition = animation.current;
|
|
285
|
+
const startVelocity = animation.velocity;
|
|
286
|
+
const x0 = startPosition - animation.toValue;
|
|
287
|
+
const stateAt = time => {
|
|
288
|
+
"worklet";
|
|
289
|
+
|
|
290
|
+
return animation.zeta < 1 ? underDampedSpringCalculations(animation, {
|
|
291
|
+
zeta: animation.zeta,
|
|
292
|
+
v0: startVelocity,
|
|
293
|
+
x0,
|
|
294
|
+
omega0: animation.omega0,
|
|
295
|
+
omega1: animation.omega1,
|
|
296
|
+
t: time
|
|
297
|
+
}) : criticallyDampedSpringCalculations(animation, {
|
|
298
|
+
v0: startVelocity,
|
|
299
|
+
x0,
|
|
300
|
+
omega0: animation.omega0,
|
|
301
|
+
t: time
|
|
302
|
+
});
|
|
303
|
+
};
|
|
304
|
+
const terminatesByEnergyAt = time => {
|
|
305
|
+
"worklet";
|
|
306
|
+
|
|
307
|
+
if (animation.initialEnergy === 0) {
|
|
308
|
+
return true;
|
|
309
|
+
}
|
|
310
|
+
const state = stateAt(time);
|
|
311
|
+
const energy = getEnergy(animation.toValue - state.position, state.velocity, config.stiffness, config.mass);
|
|
312
|
+
return energy / animation.initialEnergy <= config.energyThreshold;
|
|
313
|
+
};
|
|
314
|
+
if (terminatesByEnergyAt(0)) {
|
|
315
|
+
return 0;
|
|
316
|
+
}
|
|
317
|
+
let lowerBound = 0;
|
|
318
|
+
let upperBound = 1 / 60;
|
|
319
|
+
while (upperBound < MAX_SPRING_DURATION_SECONDS && !terminatesByEnergyAt(upperBound)) {
|
|
320
|
+
lowerBound = upperBound;
|
|
321
|
+
upperBound *= 2;
|
|
322
|
+
}
|
|
323
|
+
upperBound = Math.min(upperBound, MAX_SPRING_DURATION_SECONDS);
|
|
324
|
+
if (terminatesByEnergyAt(upperBound)) {
|
|
325
|
+
while (upperBound - lowerBound > SPRING_DURATION_PRECISION_SECONDS) {
|
|
326
|
+
const midpoint = (lowerBound + upperBound) / 2;
|
|
327
|
+
if (terminatesByEnergyAt(midpoint)) {
|
|
328
|
+
upperBound = midpoint;
|
|
329
|
+
} else {
|
|
330
|
+
lowerBound = midpoint;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
const energyDuration = upperBound;
|
|
335
|
+
if (!config.overshootClamping || energyDuration === 0) {
|
|
336
|
+
return energyDuration * 1000;
|
|
337
|
+
}
|
|
338
|
+
const leftBound = animation.startValue >= 0 ? animation.toValue : animation.toValue + animation.startValue;
|
|
339
|
+
const rightBound = leftBound + Math.abs(animation.startValue);
|
|
340
|
+
const isOutsideBoundsAt = time => {
|
|
341
|
+
"worklet";
|
|
342
|
+
|
|
343
|
+
const {
|
|
344
|
+
position
|
|
345
|
+
} = stateAt(time);
|
|
346
|
+
return position < leftBound || position > rightBound;
|
|
347
|
+
};
|
|
348
|
+
const frequency = animation.zeta < 1 ? animation.omega1 : animation.omega0;
|
|
349
|
+
const sampleStep = frequency > 0 ? Math.min(1 / 240, Math.PI / (frequency * 8)) : 1 / 240;
|
|
350
|
+
const sampleCount = Math.min(MAX_OVERSHOOT_DURATION_SAMPLES, Math.max(1, Math.ceil(energyDuration / sampleStep)));
|
|
351
|
+
const effectiveStep = energyDuration / sampleCount;
|
|
352
|
+
let previousTime = 0;
|
|
353
|
+
for (let index = 1; index <= sampleCount; index += 1) {
|
|
354
|
+
const time = effectiveStep * index;
|
|
355
|
+
if (!isOutsideBoundsAt(time)) {
|
|
356
|
+
previousTime = time;
|
|
357
|
+
continue;
|
|
358
|
+
}
|
|
359
|
+
let crossingLowerBound = previousTime;
|
|
360
|
+
let crossingUpperBound = time;
|
|
361
|
+
while (crossingUpperBound - crossingLowerBound > SPRING_DURATION_PRECISION_SECONDS) {
|
|
362
|
+
const midpoint = (crossingLowerBound + crossingUpperBound) / 2;
|
|
363
|
+
if (isOutsideBoundsAt(midpoint)) {
|
|
364
|
+
crossingUpperBound = midpoint;
|
|
365
|
+
} else {
|
|
366
|
+
crossingLowerBound = midpoint;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
return crossingUpperBound * 1000;
|
|
370
|
+
}
|
|
371
|
+
return energyDuration * 1000;
|
|
372
|
+
}
|
|
277
373
|
function isAnimationTerminatingCalculation(animation, config) {
|
|
278
374
|
"worklet";
|
|
279
375
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["checkIfConfigIsValid","config","errorMessage","forEach","prop","value","duration","clamp","min","max","console","warn","safeMergeConfigs","defaults","userConfig","filtered","Object","fromEntries","entries","filter","v","undefined","bisectRoot","func","precision","maxIterations","direction","idx","current","Math","abs","initialCalculations","stiffness","skipAnimation","zeta","omega0","omega1","useDuration","mass","m","dampingRatio","sqrt","damping","c","k","scaleZetaToMatchClamps","animation","toValue","startValue","toValueNum","Number","firstBound","secondBound","relativeExtremum1","relativeExtremum2","newZeta1","log","PI","newZeta2","zetaSatisfyingClamp","x","getEnergy","displacement","velocity","potentialEnergy","kineticEnergy","calculateNewStiffnessToMatchDuration","x0","v0","energyThreshold","threshold","targetDuration","energyDiffForStiffness","perceptualCoefficient","MILLISECONDS_IN_SECOND","settlingDuration","xtk","exp","vtk","e0","etk","energyFraction","EPSILON","criticallyDampedSpringCalculations","precalculatedValues","t","criticallyDampedEnvelope","criticallyDampedPosition","criticallyDampedVelocity","position","underDampedSpringCalculations","sin1","sin","cos1","cos","underDampedEnvelope","underDampedFrag1","underDampedPosition","underDampedVelocity","isAnimationTerminatingCalculation","initialEnergy","overshootClamping","leftBound","rightBound","currentEnergy","isAnimationSettledCalculation","distance","settleDistance","maxSettledEnergy"],"sourceRoot":"../../../../../src","sources":["utils/animation/spring/springUtils.ts"],"mappings":";;;;;;;;;;;;;;;AAKA;AACA;;AA4BO,SAASA,oBAAoBA,CAACC,MAA2B,EAAW;EAC1E,SAAS;;EACT,IAAIC,YAAY,GAAG,EAAE;EAEpB,CAAC,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAClEC,OAAO,CAAEC,IAAI,IAAK;IACnB,MAAMC,KAAK,GAAGJ,MAAM,CAACG,IAAI,CAAC;IAC1B,IAAIC,KAAK,IAAI,CAAC,EAAE;MACfH,YAAY,IAAI,KAAKE,IAAI,sCAAsCC,KAAK,EA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aAAa,GAAGJ,aAAa,IAAInG,MAAM,CAACoE,eAAe;AAEzD;AAEO,SAASoC,6BAA6BA,CAC5C3D,SAA+B,EAC/B7C,MAA+C,EACrC;EACV,SAAS;;EACT,MAAM;IAAE8C,OAAO;IAAEgB,QAAQ;IAAEnC;EAAQ,CAAC,GAAGkB,SAAS;EAChD,MAAM4D,QAAQ,GAAG7E,IAAI,CAACpB,GAAG,CAAC,CAAC,EAAER,MAAM,CAAC0G,cAAc,CAAC;EAEnD,IAAID,QAAQ,KAAK,CAAC,EAAE;IACnB,OAAOP,iCAAiC,CAACrD,SAAS,EAAE7C,MAAM,CAAC;EAC5D;EAEA,MAAMuG,aAAa,GAAG3C,SAAS,CAC9Bd,OAAO,GAAGnB,OAAO,EACjBmC,QAAQ,EACR9D,MAAM,CAAC+B,SAAS,EAChB/B,MAAM,CAACqC,IACR,CAAC;EACD,MAAMsE,gBAAgB,GAAG/C,SAAS,CACjC6C,QAAQ,EACR,CAAC,EACDzG,MAAM,CAAC+B,SAAS,EAChB/B,MAAM,CAACqC,IACR,CAAC;EAED,OAAOkE,aAAa,IAAII,gBAAgB;AACzC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["checkIfConfigIsValid","config","errorMessage","forEach","prop","value","duration","clamp","min","max","console","warn","safeMergeConfigs","defaults","userConfig","filtered","Object","fromEntries","entries","filter","v","undefined","bisectRoot","func","precision","maxIterations","direction","idx","current","Math","abs","initialCalculations","stiffness","skipAnimation","zeta","omega0","omega1","useDuration","mass","m","dampingRatio","sqrt","damping","c","k","scaleZetaToMatchClamps","animation","toValue","startValue","toValueNum","Number","firstBound","secondBound","relativeExtremum1","relativeExtremum2","newZeta1","log","PI","newZeta2","zetaSatisfyingClamp","x","getEnergy","displacement","velocity","potentialEnergy","kineticEnergy","calculateNewStiffnessToMatchDuration","x0","v0","energyThreshold","threshold","targetDuration","energyDiffForStiffness","perceptualCoefficient","MILLISECONDS_IN_SECOND","settlingDuration","xtk","exp","vtk","e0","etk","energyFraction","EPSILON","criticallyDampedSpringCalculations","precalculatedValues","t","criticallyDampedEnvelope","criticallyDampedPosition","criticallyDampedVelocity","position","underDampedSpringCalculations","sin1","sin","cos1","cos","underDampedEnvelope","underDampedFrag1","underDampedPosition","underDampedVelocity","MAX_SPRING_DURATION_SECONDS","SPRING_DURATION_PRECISION_SECONDS","MAX_OVERSHOOT_DURATION_SAMPLES","calculateSpringAnimationDuration","startPosition","startVelocity","stateAt","time","terminatesByEnergyAt","initialEnergy","state","energy","lowerBound","upperBound","midpoint","energyDuration","overshootClamping","leftBound","rightBound","isOutsideBoundsAt","frequency","sampleStep","sampleCount","ceil","effectiveStep","previousTime","index","crossingLowerBound","crossingUpperBound","isAnimationTerminatingCalculation","currentEnergy","isAnimationSettledCalculation","distance","settleDistance","maxSettledEnergy"],"sourceRoot":"../../../../../src","sources":["utils/animation/spring/springUtils.ts"],"mappings":";;;;;;;;;;;;;;;;AAKA;AACA;;AA8BO,SAASA,oBAAoBA,CAACC,MAA2B,EAAW;EAC1E,SAAS;;EACT,IAAIC,YAAY,GAAG,EAAE;EAEpB,CAAC,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAClEC,OAAO,CAAEC,IAAI,IAAK;IACnB,MAAMC,KAAK,GAAGJ,MAAM,CAACG,IAAI,CAAC;IAC1B,IAAIC,KAAK,IAAI,CAAC,EAAE;MACfH,YAAY,IAAI,KAAKE,IAAI,sCAAsCC,KAAK,EAAE;IACvE;EACD,CAAC,CAAC;EAEF,IAAIJ,MAAM,CAACK,QAAQ,GAAG,CAAC,EAAE;IACxBJ,YAAY,IAAI,qCAAqCD,MAAM,CAACK,QAAQ,EAAE;EACvE;EAEA,IACCL,MAAM,CAACM,KAAK,EAAEC,GAAG,IACjBP,MAAM,CAACM,KAAK,EAAEE,GAAG,IACjBR,MAAM,CAACM,KAAK,CAACC,GAAG,GAAGP,MAAM,CAACM,KAAK,CAACE,GAAG,EAClC;IACDP,YAAY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c,CAAC;EAEnD,IAAID,QAAQ,KAAK,CAAC,EAAE;IACnB,OAAOH,iCAAiC,CAAClF,SAAS,EAAE7C,MAAM,CAAC;EAC5D;EAEA,MAAMgI,aAAa,GAAGpE,SAAS,CAC9Bd,OAAO,GAAGnB,OAAO,EACjBmC,QAAQ,EACR9D,MAAM,CAAC+B,SAAS,EAChB/B,MAAM,CAACqC,IACR,CAAC;EACD,MAAM+F,gBAAgB,GAAGxE,SAAS,CACjCsE,QAAQ,EACR,CAAC,EACDlI,MAAM,CAAC+B,SAAS,EAChB/B,MAAM,CAACqC,IACR,CAAC;EAED,OAAO2F,aAAa,IAAII,gBAAgB;AACzC","ignoreList":[]}
|
|
@@ -8,6 +8,7 @@ exports.mixUnit = mixUnit;
|
|
|
8
8
|
exports.resolveAspectRatioMaskHeight = resolveAspectRatioMaskHeight;
|
|
9
9
|
exports.resolveDismissScaleHandoff = resolveDismissScaleHandoff;
|
|
10
10
|
exports.resolveRevealContentBaseTransform = resolveRevealContentBaseTransform;
|
|
11
|
+
exports.resolveRevealContentBaseTransformFromGeometry = resolveRevealContentBaseTransformFromGeometry;
|
|
11
12
|
exports.resolveRevealDirectionalDragScale = resolveRevealDirectionalDragScale;
|
|
12
13
|
exports.resolveRevealGestureHandoff = resolveRevealGestureHandoff;
|
|
13
14
|
exports.resolveSafeScale = resolveSafeScale;
|
|
@@ -133,6 +134,18 @@ function getBoundsCenterY(bounds) {
|
|
|
133
134
|
|
|
134
135
|
return bounds.pageY + bounds.height / 2;
|
|
135
136
|
}
|
|
137
|
+
function resolveRevealContentBaseTransformFromGeometry({
|
|
138
|
+
progress,
|
|
139
|
+
geometry
|
|
140
|
+
}) {
|
|
141
|
+
"worklet";
|
|
142
|
+
|
|
143
|
+
return {
|
|
144
|
+
translateX: mixUnit(geometry.tx, 0, progress),
|
|
145
|
+
translateY: mixUnit(geometry.ty, 0, progress),
|
|
146
|
+
scale: mixUnit(geometry.s, 1, progress)
|
|
147
|
+
};
|
|
148
|
+
}
|
|
136
149
|
function resolveRevealContentBaseTransform({
|
|
137
150
|
progress,
|
|
138
151
|
sourceBounds,
|
|
@@ -150,11 +163,10 @@ function resolveRevealContentBaseTransform({
|
|
|
150
163
|
anchor,
|
|
151
164
|
scaleMode: "uniform"
|
|
152
165
|
});
|
|
153
|
-
return {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
};
|
|
166
|
+
return resolveRevealContentBaseTransformFromGeometry({
|
|
167
|
+
geometry,
|
|
168
|
+
progress
|
|
169
|
+
});
|
|
158
170
|
}
|
|
159
171
|
function resolveTrackedSourceElementTransform({
|
|
160
172
|
sourceBounds,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","_geometry","_config","clampUnit","value","Math","min","max","mixUnit","from","to","progress","interpolateClamped","inputStart","inputEnd","outputStart","outputEnd","resolveSafeScale","scale","abs","EPSILON","resolveUnitDragTranslation","translation","dimension","baseDistance","exports","resolveRevealDirectionalDragScale","normalized","inverted","dismissalRelative","rawScale","DRAG_DIRECTIONAL_SCALE_MIN","DRAG_DIRECTIONAL_SCALE_EXPONENT","oppositeDrag","DRAG_DIRECTIONAL_SCALE_MAX","resolveUniformScale","sourceWidth","sourceHeight","destinationWidth","destinationHeight","sx","sy","sourceAspect","destinationAspect","aspectDifference","resolveRevealGestureHandoff","rawDrag","maxSensitivity","clampedRawDrag","gestureSensitivity","releaseBoost","releaseSensitivity","gestureReleaseVelocityScale","resolveDismissScaleHandoff","releaseScale","targetScale","velocity","velocityDepth","closeProgress","easeIn","cos","PI","scaleProgress","baseScale","orbitDepth","orbitScale","sin","resolveAspectRatioMaskHeight","maskWidth","maskHeight","targetWidth","targetHeight","safeMaskWidth","safeMaskHeight","safeTargetWidth","safeTargetHeight","targetAspectHeight","getBoundsCenterX","bounds","pageX","width","getBoundsCenterY","pageY","height","
|
|
1
|
+
{"version":3,"names":["_constants","require","_geometry","_config","clampUnit","value","Math","min","max","mixUnit","from","to","progress","interpolateClamped","inputStart","inputEnd","outputStart","outputEnd","resolveSafeScale","scale","abs","EPSILON","resolveUnitDragTranslation","translation","dimension","baseDistance","exports","resolveRevealDirectionalDragScale","normalized","inverted","dismissalRelative","rawScale","DRAG_DIRECTIONAL_SCALE_MIN","DRAG_DIRECTIONAL_SCALE_EXPONENT","oppositeDrag","DRAG_DIRECTIONAL_SCALE_MAX","resolveUniformScale","sourceWidth","sourceHeight","destinationWidth","destinationHeight","sx","sy","sourceAspect","destinationAspect","aspectDifference","resolveRevealGestureHandoff","rawDrag","maxSensitivity","clampedRawDrag","gestureSensitivity","releaseBoost","releaseSensitivity","gestureReleaseVelocityScale","resolveDismissScaleHandoff","releaseScale","targetScale","velocity","velocityDepth","closeProgress","easeIn","cos","PI","scaleProgress","baseScale","orbitDepth","orbitScale","sin","resolveAspectRatioMaskHeight","maskWidth","maskHeight","targetWidth","targetHeight","safeMaskWidth","safeMaskHeight","safeTargetWidth","safeTargetHeight","targetAspectHeight","getBoundsCenterX","bounds","pageX","width","getBoundsCenterY","pageY","height","resolveRevealContentBaseTransformFromGeometry","geometry","translateX","tx","translateY","ty","s","resolveRevealContentBaseTransform","sourceBounds","destinationBounds","screenLayout","anchor","computeContentTransformGeometry","start","end","entering","dimensions","scaleMode","resolveTrackedSourceElementTransform","contentTranslateX","contentTranslateY","contentScale","parentScale","screenWidth","screenHeight","screenCenterX","screenCenterY","safeParentScale","safeSourceWidth","safeSourceHeight","sourceCenterX","sourceCenterY","destinationCenterX","destinationCenterY","trackedCenterX","trackedCenterY","scaleX","scaleY"],"sourceRoot":"../../../../../../src","sources":["utils/bounds/navigation/reveal/math.ts"],"mappings":";;;;;;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAGA,IAAAE,OAAA,GAAAF,OAAA;AAMA,SAASG,SAASA,CAACC,KAAa,EAAE;EACjC,SAAS;;EACT,OAAOC,IAAI,CAACC,GAAG,CAAC,CAAC,EAA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