react-native-screen-transitions 3.9.0 → 3.10.0
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/shared/animation/snap-to.js +2 -0
- package/lib/commonjs/shared/animation/snap-to.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js +19 -20
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js +16 -2
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +5 -0
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +1 -3
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/index.js +4 -3
- package/lib/commonjs/shared/components/boundary/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +47 -187
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js +21 -13
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js +1 -12
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +40 -33
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +3 -4
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +46 -130
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js +45 -9
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +2 -29
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/handoff-target.js +33 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/handoff-target.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js +19 -15
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +1 -10
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +18 -36
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +7 -0
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/resolve-boundary-target.js +29 -0
- package/lib/commonjs/shared/components/boundary/utils/resolve-boundary-target.js.map +1 -0
- package/lib/commonjs/shared/components/masked-view.js +9 -1
- package/lib/commonjs/shared/components/masked-view.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +3 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +9 -1
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +4 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js +2 -8
- package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +37 -3
- package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-release.js +3 -2
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/types.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/transition-visual-state.js +42 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/transition-visual-state.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js +11 -5
- package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +23 -10
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +10 -8
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +4 -4
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/scroll.store.js +20 -2
- package/lib/commonjs/shared/stores/scroll.store.js.map +1 -1
- package/lib/commonjs/shared/stores/system.store.js +2 -0
- package/lib/commonjs/shared/stores/system.store.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js +23 -1
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate.js +14 -2
- package/lib/commonjs/shared/utils/animation/animate.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/spring/spring.js +22 -2
- package/lib/commonjs/shared/utils/animation/spring/spring.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/spring/springUtils.js +96 -0
- package/lib/commonjs/shared/utils/animation/spring/springUtils.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/state.js +4 -0
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +17 -5
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +44 -20
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js +2 -31
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js +3 -17
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/module/shared/animation/snap-to.js +2 -0
- package/lib/module/shared/animation/snap-to.js.map +1 -1
- package/lib/module/shared/components/boundary/components/boundary-target.js +19 -20
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/shared/components/boundary/create-boundary-component.js +17 -3
- package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +5 -0
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +1 -3
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/index.js +3 -2
- package/lib/module/shared/components/boundary/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +49 -189
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js +21 -13
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js +2 -13
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +43 -36
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +3 -4
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +50 -134
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js +44 -9
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -27
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/handoff-target.js +28 -0
- package/lib/module/shared/components/boundary/portal/utils/handoff-target.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js +19 -15
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +0 -8
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +19 -37
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/refresh-signals.js +7 -0
- package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/resolve-boundary-target.js +24 -0
- package/lib/module/shared/components/boundary/utils/resolve-boundary-target.js.map +1 -0
- package/lib/module/shared/components/masked-view.js +10 -2
- package/lib/module/shared/components/masked-view.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js +3 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +10 -2
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +4 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/gestures.provider.js +2 -8
- package/lib/module/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +35 -2
- package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +1 -0
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-release.js +3 -2
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/types.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/transition-visual-state.js +35 -0
- package/lib/module/shared/providers/screen/styles/helpers/transition-visual-state.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js +11 -5
- package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +23 -10
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +10 -8
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +4 -4
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/scroll.store.js +17 -0
- package/lib/module/shared/stores/scroll.store.js.map +1 -1
- package/lib/module/shared/stores/system.store.js +2 -0
- package/lib/module/shared/stores/system.store.js.map +1 -1
- package/lib/module/shared/utils/animation/animate-to-progress.js +21 -0
- package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/module/shared/utils/animation/animate.js +14 -2
- package/lib/module/shared/utils/animation/animate.js.map +1 -1
- package/lib/module/shared/utils/animation/spring/spring.js +23 -3
- package/lib/module/shared/utils/animation/spring/spring.js.map +1 -1
- package/lib/module/shared/utils/animation/spring/springUtils.js +95 -0
- package/lib/module/shared/utils/animation/spring/springUtils.js.map +1 -1
- package/lib/module/shared/utils/animation/state.js +2 -0
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js +16 -5
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +46 -22
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/drag.js +2 -30
- package/lib/module/shared/utils/bounds/navigation/zoom/drag.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js +4 -18
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/typescript/shared/animation/snap-to.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +2 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +3 -4
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/index.d.ts +6 -9
- package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts +1 -3
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts +1 -10
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts +1 -3
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts +2 -2
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts +0 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +1 -10
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/handoff-target.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/portal/utils/handoff-target.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts +2 -3
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +0 -4
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +8 -12
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts +1 -0
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/resolve-boundary-target.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/utils/resolve-boundary-target.d.ts.map +1 -0
- package/lib/typescript/shared/components/masked-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/gestures.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-release.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts +1 -9
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/transition-visual-state.d.ts +18 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/transition-visual-state.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts +2 -2
- package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/shared/stores/scroll.store.d.ts +7 -0
- package/lib/typescript/shared/stores/scroll.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/system.store.d.ts +5 -0
- package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts +6 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/animate.d.ts +2 -2
- package/lib/typescript/shared/utils/animation/animate.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/spring/spring.d.ts +2 -2
- package/lib/typescript/shared/utils/animation/spring/spring.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/spring/springUtils.d.ts +3 -0
- package/lib/typescript/shared/utils/animation/spring/springUtils.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/state.d.ts +6 -0
- package/lib/typescript/shared/utils/animation/state.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts +9 -0
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts +2 -11
- package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts +7 -4
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/animation/snap-to.ts +5 -0
- package/src/shared/components/boundary/components/boundary-target.tsx +37 -23
- package/src/shared/components/boundary/create-boundary-component.tsx +29 -3
- package/src/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +11 -0
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +3 -9
- package/src/shared/components/boundary/index.tsx +4 -8
- package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +73 -275
- package/src/shared/components/boundary/portal/components/boundary-content-portal/index.tsx +31 -12
- package/src/shared/components/boundary/portal/components/boundary-portal/components/host.tsx +2 -12
- package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +64 -62
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts +2 -9
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +73 -186
- package/src/shared/components/boundary/portal/components/boundary-portal/index.tsx +72 -12
- package/src/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.ts +0 -1
- package/src/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +2 -39
- package/src/shared/components/boundary/portal/utils/handoff-target.ts +48 -0
- package/src/shared/components/boundary/portal/utils/resolve-portal.ts +26 -18
- package/src/shared/components/boundary/portal/utils/teleport-control.ts +0 -12
- package/src/shared/components/boundary/providers/boundary-root.provider.tsx +28 -80
- package/src/shared/components/boundary/utils/refresh-signals.ts +8 -0
- package/src/shared/components/boundary/utils/resolve-boundary-target.tsx +39 -0
- package/src/shared/components/masked-view.tsx +20 -4
- package/src/shared/components/screen-container/layers/backdrop.tsx +3 -1
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +14 -4
- package/src/shared/components/screen-lifecycle/hooks/use-transition-start-controller.ts +2 -0
- package/src/shared/providers/helpers/measured-bounds-writes.ts +1 -0
- package/src/shared/providers/screen/gestures/gestures.provider.tsx +2 -10
- package/src/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.ts +1 -0
- package/src/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.ts +74 -3
- package/src/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +1 -0
- package/src/shared/providers/screen/gestures/pinch/behavior/pinch-release.ts +2 -4
- package/src/shared/providers/screen/gestures/types.ts +0 -14
- package/src/shared/providers/screen/styles/helpers/transition-visual-state.ts +44 -0
- package/src/shared/providers/screen/styles/helpers/visibility-gate.ts +17 -7
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +30 -15
- package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +14 -13
- package/src/shared/stores/bounds/internals/links.ts +13 -2
- package/src/shared/stores/scroll.store.ts +23 -0
- package/src/shared/stores/system.store.ts +8 -0
- package/src/shared/utils/animation/animate-to-progress.ts +59 -28
- package/src/shared/utils/animation/animate.ts +18 -2
- package/src/shared/utils/animation/spring/spring.ts +36 -1
- package/src/shared/utils/animation/spring/springUtils.ts +130 -0
- package/src/shared/utils/animation/state.ts +8 -0
- package/src/shared/utils/bounds/navigation/reveal/math.ts +21 -5
- package/src/shared/utils/bounds/navigation/zoom/build.ts +77 -23
- package/src/shared/utils/bounds/navigation/zoom/drag.ts +3 -42
- package/src/shared/utils/bounds/navigation/zoom/helpers.ts +9 -23
- package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js +0 -32
- package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +0 -51
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +0 -220
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js +0 -29
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js +0 -25
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js +0 -64
- package/lib/commonjs/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +0 -21
- package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +0 -29
- package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js +0 -38
- package/lib/commonjs/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js +0 -32
- package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-register-target.js +0 -27
- package/lib/module/shared/components/boundary/hooks/use-register-target.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +0 -46
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/utils/ownership.js +0 -213
- package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js +0 -24
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js +0 -20
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js +0 -59
- package/lib/module/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +0 -15
- package/lib/module/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +0 -24
- package/lib/module/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js +0 -33
- package/lib/module/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js +0 -26
- package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts +0 -10
- package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts +0 -13
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +0 -34
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts +0 -8
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts +0 -8
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts +0 -15
- package/lib/typescript/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts +0 -4
- package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts +0 -5
- package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts +0 -9
- package/lib/typescript/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts +0 -16
- package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts.map +0 -1
- package/src/shared/components/boundary/hooks/use-register-target.ts +0 -43
- package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx +0 -79
- package/src/shared/components/boundary/portal/utils/ownership.ts +0 -319
- package/src/shared/components/boundary/portal/utils/shallow-equal.ts +0 -25
- package/src/shared/components/boundary/portal/utils/visible-host.ts +0 -24
- package/src/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.ts +0 -88
- package/src/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.ts +0 -19
- package/src/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.ts +0 -47
- package/src/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.ts +0 -50
- package/src/shared/providers/screen/styles/helpers/opening-phase.ts +0 -25
|
@@ -19,8 +19,8 @@ var _descriptors = require("../../descriptors");
|
|
|
19
19
|
var _options = require("../../options");
|
|
20
20
|
var _collectInterpolatorSharedValues = require("../helpers/collect-interpolator-shared-values");
|
|
21
21
|
var _normalizeSlots = require("../helpers/normalize-slots");
|
|
22
|
-
var _openingPhase = require("../helpers/opening-phase");
|
|
23
22
|
var _stripInterpolatorOptions = require("../helpers/strip-interpolator-options");
|
|
23
|
+
var _transitionVisualState = require("../helpers/transition-visual-state");
|
|
24
24
|
const NO_STYLE_LAYERS = [];
|
|
25
25
|
const normalizeRawStyleMap = rawStyleMap => {
|
|
26
26
|
"worklet";
|
|
@@ -114,11 +114,13 @@ const useInterpolatedStylesMap = () => {
|
|
|
114
114
|
const interpolatorSharedValues = (0, _react.useMemo)(() => (0, _collectInterpolatorSharedValues.collectInterpolatorSharedValues)([currentInterpolator, nextInterpolator]), [currentInterpolator, nextInterpolator]);
|
|
115
115
|
const activeScreenKey = nextScreenKey ?? currentScreenKey;
|
|
116
116
|
const {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
closing: activeClosing,
|
|
118
|
+
entering: activeEntering
|
|
119
119
|
} = _animation.AnimationStore.getBag(activeScreenKey);
|
|
120
120
|
const {
|
|
121
|
-
|
|
121
|
+
animationProgress: activeAnimationProgress,
|
|
122
|
+
pendingLifecycleRequestKind: activePendingLifecycleRequestKind,
|
|
123
|
+
pendingLifecycleStartBlockCount: activePendingLifecycleStartBlockCount
|
|
122
124
|
} = _system.SystemStore.getBag(activeScreenKey);
|
|
123
125
|
const isGesturingDuringCloseAnimation = (0, _reactNativeReanimated.useSharedValue)(false);
|
|
124
126
|
const localStylesMaps = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
@@ -145,14 +147,25 @@ const useInterpolatedStylesMap = () => {
|
|
|
145
147
|
}
|
|
146
148
|
const isInGestureMode = !!isDragging || isGesturingDuringCloseAnimation.get();
|
|
147
149
|
|
|
148
|
-
//
|
|
149
|
-
//
|
|
150
|
-
//
|
|
151
|
-
//
|
|
150
|
+
// Interpolator ownership changes only at visual boundaries on the UI thread:
|
|
151
|
+
// the next screen attaches after its blockers clear and progress starts, then
|
|
152
|
+
// detaches once its closing progress has committed at zero. The downstream
|
|
153
|
+
// resolver sees the owner disappear in this same graph and resets its styles
|
|
154
|
+
// without waiting for React to remove the screen.
|
|
152
155
|
const isPendingOpen = activePendingLifecycleRequestKind.get() === _system.LifecycleTransitionRequestKind.Open;
|
|
153
156
|
const activeOpening = isPendingOpen || !!activeEntering.get();
|
|
154
|
-
const
|
|
155
|
-
|
|
157
|
+
const isOpeningBlocked = (0, _transitionVisualState.isOpenTransitionBlocked)({
|
|
158
|
+
opening: activeOpening,
|
|
159
|
+
pendingLifecycleStartBlockCount: activePendingLifecycleStartBlockCount.get(),
|
|
160
|
+
animationProgress: activeAnimationProgress.get()
|
|
161
|
+
});
|
|
162
|
+
const hasCloseFinished = (0, _transitionVisualState.hasCloseTransitionFinished)({
|
|
163
|
+
closing: activeClosing.get(),
|
|
164
|
+
animationProgress: activeAnimationProgress.get()
|
|
165
|
+
});
|
|
166
|
+
const currentOwnsInterpolator = isInGestureMode || !nextInterpolator || isOpeningBlocked || hasCloseFinished;
|
|
167
|
+
const nextReady = currentOwnsInterpolator ? 0 : 1;
|
|
168
|
+
nextInterpolatorReady.set(nextReady);
|
|
156
169
|
const interpolatorOptionsOwner = currentOwnsInterpolator ? "current" : "next";
|
|
157
170
|
let selectedProgress = progress;
|
|
158
171
|
let selectedNext = next;
|
package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_constants","_animation","_system","_logger","_animation2","_useBuildBoundsAccessor","_useBuildTransitionAccessor","_readScreenAnimationRevisions","_selectedInterpolatorOptions","_descriptors","_options","_collectInterpolatorSharedValues","_normalizeSlots","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_constants","_animation","_system","_logger","_animation2","_useBuildBoundsAccessor","_useBuildTransitionAccessor","_readScreenAnimationRevisions","_selectedInterpolatorOptions","_descriptors","_options","_collectInterpolatorSharedValues","_normalizeSlots","_stripInterpolatorOptions","_transitionVisualState","NO_STYLE_LAYERS","normalizeRawStyleMap","rawStyleMap","NO_STYLES","stylesMap","normalizeSlots","stripInterpolatorOptions","runInterpolator","interpolator","props","progress","next","bounds","transition","undefined","raw","_","__DEV__","logger","warn","appendLayer","layers","result","push","useInterpolatedStylesMap","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","screenOptions","useScreenOptionsContext","screenInterpolatorProps","screenInterpolatorPropsRevision","selectedInterpolatorOptions","nextInterpolator","currentInterpolator","ancestorScreenAnimationSources","descendantScreenAnimationSources","useScreenAnimationContext","boundsAccessor","useBuildBoundsAccessor","useBuildTransitionAccessor","nextInterpolatorReady","useSharedValue","interpolatorSharedValues","useMemo","collectInterpolatorSharedValues","activeScreenKey","closing","activeClosing","entering","activeEntering","AnimationStore","getBag","animationProgress","activeAnimationProgress","pendingLifecycleRequestKind","activePendingLifecycleRequestKind","pendingLifecycleStartBlockCount","activePendingLifecycleStartBlockCount","SystemStore","isGesturingDuringCloseAnimation","localStylesMaps","useDerivedValue","readScreenAnimationRevisions","get","current","isDragging","gesture","dragging","isNextClosing","set","isInGestureMode","isPendingOpen","LifecycleTransitionRequestKind","Open","activeOpening","isOpeningBlocked","isOpenTransitionBlocked","opening","hasCloseFinished","hasCloseTransitionFinished","currentOwnsInterpolator","nextReady","interpolatorOptionsOwner","selectedProgress","selectedNext","currentResult","syncSelectedInterpolatorOptions","options","syncScreenOptionsOverrides","nextResult","length","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AASA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,uBAAA,GAAAP,OAAA;AACA,IAAAQ,2BAAA,GAAAR,OAAA;AAEA,IAAAS,6BAAA,GAAAT,OAAA;AACA,IAAAU,4BAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,QAAA,GAAAZ,OAAA;AAIA,IAAAa,gCAAA,GAAAb,OAAA;AACA,IAAAc,eAAA,GAAAd,OAAA;AAEA,IAAAe,yBAAA,GAAAf,OAAA;AACA,IAAAgB,sBAAA,GAAAhB,OAAA;AAKA,MAAMiB,eAAiC,GAAG,EAAE;AAgB5C,MAAMC,oBAAoB,GACzBC,WAAoD,IAChD;EACJ,SAAS;;EAET,IAAI,CAACA,WAAW,EAAE;IACjB,OAAOC,oBAAS;EACjB;EAEA,MAAMC,SAAS,GAAG,IAAAC,8BAAc,EAAC,IAAAC,kDAAwB,EAACJ,WAAW,CAAC,CAAC;EAEvE,OAAOE,SAAS;AACjB,CAAC;AAED,MAAMG,eAAe,GAAGA,CAAC;EACxBC,YAAY;EACZC,KAAK;EACLC,QAAQ;EACRC,IAAI;EACJC,MAAM;EACNC;AACsB,CAAC,KAAqC;EAC5D,SAAS;;EAET,IAAI,CAACL,YAAY,EAAE;IAClB,OAAOM,SAAS;EACjB;EAEA,IAAI;IACH,MAAMC,GAAG,GAAGP,YAAY,CAAC;MACxB,GAAGC,KAAK;MACRC,QAAQ;MACRC,I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MAAM,EAAE4B,cAAc;MACtB3B;IACD,CAAC,CAAC;IAEF,IAAIwE,wBAAwB,KAAK,SAAS,EAAE;MAC3C,IAAAI,4DAA+B,EAC9BvD,2BAA2B,EAC3B,SAAS,EACTsD,aAAa,EAAEtF,WAAW,EAAEwF,OAC7B,CAAC;MACD,IAAAC,mCAA0B,EAACH,aAAa,EAAEtF,WAAW,EAAE4B,aAAa,CAAC;MAErE,IAAI,CAAC0D,aAAa,EAAE;QACnB,OAAOxF,eAAe;MACvB;MAEA,OAAO,CAACwF,aAAa,CAACpF,SAAS,CAAC;IACjC;IAEA,MAAMwF,UAAU,GAAGrF,eAAe,CAAC;MAClCC,YAAY,EAAE2B,gBAAgB;MAC9B1B,KAAK;MACLC,QAAQ,EAAE4E,gBAAgB;MAC1B3E,IAAI,EAAE4E,YAAY;MAClB3E,MAAM,EAAE4B,cAAc;MACtB3B;IACD,CAAC,CAAC;IAEF,IAAA4E,4DAA+B,EAC9BvD,2BAA2B,EAC3B,MAAM,EACN0D,UAAU,EAAE1F,WAAW,EAAEwF,OAC1B,CAAC;IACD,IAAAC,mCAA0B,EAAC7E,SAAS,EAAEgB,aAAa,CAAC;IAEpD,MAAMT,MAAwB,GAAG,EAAE;IAEnCD,WAAW,CAACC,MAAM,EAAEmE,aAAa,CAAC;IAClCpE,WAAW,CAACC,MAAM,EAAEuE,UAAU,CAAC;IAE/B,IAAIvE,MAAM,CAACwE,MAAM,KAAK,CAAC,EAAE;MACxB,OAAO7F,eAAe;IACvB;IAEA,OAAOqB,MAAM;EACd,CAAC,CAAC;EAEF,OAAO;IACN0C,eAAe;IACfpB;EACD,CAAC;AACF,CAAC;AAACmD,OAAA,CAAAtE,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -10,6 +10,7 @@ var _animation = require("../../../../stores/animation.store");
|
|
|
10
10
|
var _system = require("../../../../stores/system.store");
|
|
11
11
|
var _visibilityBlockOffset = require("../../../../utils/visibility-block-offset");
|
|
12
12
|
var _descriptors = require("../../descriptors");
|
|
13
|
+
var _transitionVisualState = require("../helpers/transition-visual-state");
|
|
13
14
|
var _visibilityGate = require("../helpers/visibility-gate");
|
|
14
15
|
const useMaybeBlockVisibility = isFloatingOverlay => {
|
|
15
16
|
const {
|
|
@@ -20,11 +21,10 @@ const useMaybeBlockVisibility = isFloatingOverlay => {
|
|
|
20
21
|
} = (0, _descriptors.useDescriptorDerivations)();
|
|
21
22
|
const {
|
|
22
23
|
closing,
|
|
23
|
-
entering
|
|
24
|
-
progressAnimating,
|
|
25
|
-
transitionProgress
|
|
24
|
+
entering
|
|
26
25
|
} = _animation.AnimationStore.getBag(currentScreenKey);
|
|
27
26
|
const {
|
|
27
|
+
animationProgress,
|
|
28
28
|
pendingLifecycleStartBlockCount,
|
|
29
29
|
pendingLifecycleRequestKind
|
|
30
30
|
} = _system.SystemStore.getBag(currentScreenKey);
|
|
@@ -38,7 +38,7 @@ const useMaybeBlockVisibility = isFloatingOverlay => {
|
|
|
38
38
|
hasVisibilityGateOpened: hasVisibilityGateOpened.get(),
|
|
39
39
|
pendingLifecycleStartBlockCount: pendingLifecycleStartBlockCount.get(),
|
|
40
40
|
pendingLifecycleRequestKind: pendingLifecycleRequestKind.get(),
|
|
41
|
-
|
|
41
|
+
animationProgress: animationProgress.get(),
|
|
42
42
|
entering: entering.get()
|
|
43
43
|
});
|
|
44
44
|
}, gate => {
|
|
@@ -53,10 +53,12 @@ const useMaybeBlockVisibility = isFloatingOverlay => {
|
|
|
53
53
|
"worklet";
|
|
54
54
|
|
|
55
55
|
const offset = (0, _visibilityBlockOffset.getVisibilityBlockOffset)(height);
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
// Hide the outgoing screen after its visual close while React removes its
|
|
57
|
+
// host asynchronously.
|
|
58
|
+
const shouldHideClosedScreen = (0, _transitionVisualState.hasCloseTransitionFinished)({
|
|
59
|
+
closing: closing.get(),
|
|
60
|
+
animationProgress: animationProgress.get()
|
|
61
|
+
});
|
|
60
62
|
if (shouldHideClosedScreen) {
|
|
61
63
|
return {
|
|
62
64
|
opacity: 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_animation","_system","_visibilityBlockOffset","_descriptors","_visibilityGate","useMaybeBlockVisibility","isFloatingOverlay","height","useWindowDimensions","currentScreenKey","useDescriptorDerivations","closing","entering","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeReanimated","_animation","_system","_visibilityBlockOffset","_descriptors","_transitionVisualState","_visibilityGate","useMaybeBlockVisibility","isFloatingOverlay","height","useWindowDimensions","currentScreenKey","useDescriptorDerivations","closing","entering","AnimationStore","getBag","animationProgress","pendingLifecycleStartBlockCount","pendingLifecycleRequestKind","SystemStore","hasVisibilityGateOpened","useSharedValue","shouldBlockVisibility","useAnimatedReaction","resolveScreenVisibilityGate","get","gate","shouldOpenGate","set","shouldBlock","animatedStyle","useAnimatedStyle","offset","getVisibilityBlockOffset","shouldHideClosedScreen","hasCloseTransitionFinished","opacity","transform","translateY","animatedProps","useAnimatedProps","pointerEvents","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAMA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AAEO,MAAMQ,uBAAuB,GAAIC,iBAA2B,IAAK;EACvE,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,gCAAmB,EAAC,CAAC;EACxC,MAAM;IAAEC;EAAiB,CAAC,GAAG,IAAAC,qCAAwB,EAAC,CAAC;EACvD,MAAM;IAAEC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,EAAE;MAC3B,OAAO;QACNE,OAAO,EAAE;MACV,CAAC;IACF;IAEA,OAAO;MACNC,SAAS,EAAE,CACV;QACCC,UAAU,EAAEhB,qBAAqB,CAACG,GAAG,CAAC,CAAC,GAAGO,MAAM,GAAG;MACpD,CAAC;IAEH,CAAC;EACF,CAAC,CAAC;EAEF,MAAMO,aAAa,GAAG,IAAAC,uCAAgB,EAAC,MAAM;IAC5C,SAAS;;IACT,OAAO;MACNC,aAAa,EAAEnB,qBAAqB,CAACG,GAAG,CAAC,CAAC,GACtC,MAAM,GACN;IACL,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IACNK,aAAa;IACbS,aAAa;IACbjB;EACD,CAAC;AACF,CAAC;AAACoB,OAAA,CAAApC,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -147,11 +147,11 @@ const writeGroup = (state, pairKey, group, activeId, initialId) => {
|
|
|
147
147
|
initialId: previousInitialId ?? initialId ?? activeId
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
|
-
const writeDestination = (state, pairKey, linkKey, screenKey, bounds, styles, group) => {
|
|
150
|
+
const writeDestination = (state, pairKey, linkKey, screenKey, bounds, styles, group, runtimeFlags = {}) => {
|
|
151
151
|
"worklet";
|
|
152
152
|
|
|
153
153
|
const existingLink = (0, _linkPairs.getLink)(state, pairKey, linkKey);
|
|
154
|
-
const destination = createLinkSide(screenKey, bounds, styles);
|
|
154
|
+
const destination = createLinkSide(screenKey, bounds, styles, runtimeFlags);
|
|
155
155
|
const link = existingLink ?? {
|
|
156
156
|
group,
|
|
157
157
|
status: "source-incomplete",
|
|
@@ -200,14 +200,14 @@ function setSource(pairKey, tag, screenKey, bounds, styles = {}, group, runtimeF
|
|
|
200
200
|
return state;
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
function setDestination(pairKey, tag, screenKey, bounds, styles = {}, group) {
|
|
203
|
+
function setDestination(pairKey, tag, screenKey, bounds, styles = {}, group, runtimeFlags = {}) {
|
|
204
204
|
"worklet";
|
|
205
205
|
|
|
206
206
|
_state.pairs.modify(state => {
|
|
207
207
|
"worklet";
|
|
208
208
|
|
|
209
209
|
const linkKey = (0, _linkPairs.getLinkKeyFromTag)(tag);
|
|
210
|
-
writeDestination(state, pairKey, linkKey, screenKey, bounds, styles, group);
|
|
210
|
+
writeDestination(state, pairKey, linkKey, screenKey, bounds, styles, group, runtimeFlags);
|
|
211
211
|
return state;
|
|
212
212
|
});
|
|
213
213
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_linkPairs","require","_state","syncLinkStatus","link","status","source","destination","isSharedValueLike","value","_isReanimatedSharedValue","snapshotSharedValue","snapshotTransformArrayValue","snapshot","index","length","snapshotValue","snapshotTransformEntryValue","undefined","push","Array","isArray","snapshotTransformItem","hasValue","key","snapshotTransform","snapshotStyles","styles","transform","createLinkSide","screenKey","bounds","runtimeFlags","handoff","escapeClipping","writePairLink","state","pairKey","linkKey","ensurePairLinks","writeGroup","group","activeId","initialId","previousInitialId","groups","ensurePairGroups","writeDestination","existingLink","getPairLink","initialDestination","setSource","tag","pairs","modify","getLinkKeyFromTag","pairLinks","initialSource","sourceRequests","setDestination","setActiveGroupId","requestSourceMeasure","ensurePairSourceRequests","getActiveGroupId","getPairActiveGroupId","get","getLink","hasSourceLink","getResolvedLink","getGroupKeyFromTag","initialLink","createGroupTag","getSource","getPairSource","getDestination","getPairDestination"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/links.ts"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAuBA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,cAAc,GAAIC,IAAa,IAAK;EACzC,SAAS;;EACTA,IAAI,CAACC,MAAM,GAAGD,IAAI,CAACE,MAAM,GACtBF,IAAI,CAACG,WAAW,GACf,UAAU,GACV,wBAAwB,GACzB,mBAAmB;AACvB,CAAC;AAQD,MAAMC,iBAAiB,GAAIC,KAAc,IAA+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E,IAAAG,2BAAgB,EAACV,KAAK,EAAEC,OAAO,CAAC,CAACI,KAAK,CAAC,GAAG;IACzCC,QAAQ;IACRC,SAAS,EAAEC,iBAAiB,IAAID,SAAS,IAAID;EAC9C,CAAC;AACF,CAAC;AAED,MAAMK,gBAAgB,GAAGA,CACxBX,KAAqB,EACrBC,OAAsB,EACtBC,OAAgB,EAChBR,SAAoB,EACpBC,MAA0B,EAC1BJ,MAAkB,EAClBc,KAAgB,
|
|
1
|
+
{"version":3,"names":["_linkPairs","require","_state","syncLinkStatus","link","status","source","destination","isSharedValueLike","value","_isReanimatedSharedValue","snapshotSharedValue","snapshotTransformArrayValue","snapshot","index","length","snapshotValue","snapshotTransformEntryValue","undefined","push","Array","isArray","snapshotTransformItem","hasValue","key","snapshotTransform","snapshotStyles","styles","transform","createLinkSide","screenKey","bounds","runtimeFlags","handoff","escapeClipping","writePairLink","state","pairKey","linkKey","ensurePairLinks","writeGroup","group","activeId","initialId","previousInitialId","groups","ensurePairGroups","writeDestination","existingLink","getPairLink","initialDestination","setSource","tag","pairs","modify","getLinkKeyFromTag","pairLinks","initialSource","sourceRequests","setDestination","setActiveGroupId","requestSourceMeasure","ensurePairSourceRequests","getActiveGroupId","getPairActiveGroupId","get","getLink","hasSourceLink","getResolvedLink","getGroupKeyFromTag","initialLink","createGroupTag","getSource","getPairSource","getDestination","getPairDestination"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/links.ts"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAuBA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,cAAc,GAAIC,IAAa,IAAK;EACzC,SAAS;;EACTA,IAAI,CAACC,MAAM,GAAGD,IAAI,CAACE,MAAM,GACtBF,IAAI,CAACG,WAAW,GACf,UAAU,GACV,wBAAwB,GACzB,mBAAmB;AACvB,CAAC;AAQD,MAAMC,iBAAiB,GAAIC,KAAc,IAA+B;EACvE,SAAS;;EACT,OACEA,KA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BAAa,EAACpB,YAAK,CAACY,GAAG,CAAC,CAAC,EAAE5B,OAAO,EAAE,IAAAkB,4BAAiB,EAACH,GAAG,CAAC,CAAC;AACnE;AAEA,SAASsB,cAAcA,CACtBrC,OAAsB,EACtBe,GAAU,EACsB;EAChC,SAAS;;EACT,OAAO,IAAAuB,yBAAkB,EAACtB,YAAK,CAACY,GAAG,CAAC,CAAC,EAAE5B,OAAO,EAAE,IAAAkB,4BAAiB,EAACH,GAAG,CAAC,CAAC;AACxE","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getClampedScrollAxisDelta = exports.cloneScrollMetadataState = exports.clampScrollAxisOffset = exports.ScrollStore = void 0;
|
|
6
|
+
exports.getVisualScrollAxisDelta = exports.getClampedScrollAxisDelta = exports.cloneScrollMetadataState = exports.clampScrollAxisOffset = exports.ScrollStore = void 0;
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
8
|
var _createStore = require("../utils/create-store");
|
|
9
9
|
const metadataWriters = {};
|
|
@@ -89,12 +89,30 @@ const getClampedScrollAxisDelta = (current, captured, axis) => {
|
|
|
89
89
|
return currentOffset - capturedOffset;
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Visual scroll travel from a bounds snapshot normalized to its at-rest
|
|
94
|
+
* position. The captured side is clamped because measurement removes transient
|
|
95
|
+
* rubber-band displacement; the current side stays raw so consumers can follow
|
|
96
|
+
* the position that is actually visible on iOS.
|
|
97
|
+
*/
|
|
98
|
+
exports.getClampedScrollAxisDelta = getClampedScrollAxisDelta;
|
|
99
|
+
const getVisualScrollAxisDelta = (current, captured, axis) => {
|
|
100
|
+
"worklet";
|
|
101
|
+
|
|
102
|
+
const currentAxisState = current?.[axis];
|
|
103
|
+
const capturedOffset = clampScrollAxisOffset(captured?.[axis]);
|
|
104
|
+
if (!currentAxisState || capturedOffset === null) {
|
|
105
|
+
return 0;
|
|
106
|
+
}
|
|
107
|
+
return currentAxisState.offset - capturedOffset;
|
|
108
|
+
};
|
|
109
|
+
|
|
92
110
|
/**
|
|
93
111
|
* Route-keyed scroll geometry used by gesture activation and bounds measurement.
|
|
94
112
|
* Coordination tracks gesture-owner scoped ScrollView offsets and dimensions;
|
|
95
113
|
* metadata tracks screen-scoped scroll values exposed to animation consumers.
|
|
96
114
|
*/
|
|
97
|
-
exports.
|
|
115
|
+
exports.getVisualScrollAxisDelta = getVisualScrollAxisDelta;
|
|
98
116
|
const scrollStore = (0, _createStore.createStore)({
|
|
99
117
|
createBag: () => ({
|
|
100
118
|
coordination: (0, _reactNativeReanimated.makeMutable)(null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_createStore","metadataWriters","nextMetadataWriterId","createMetadataWriterId","claimMetadataWriter","routeKey","axis","writerId","writers","releaseMetadataWriter","vertical","horizontal","hasMetadataWriters","Boolean","clearMetadataWriters","cloneScrollMetadataState","scroll","offset","contentSize","layoutSize","isTouched","exports","clampScrollAxisOffset","axisState","maxOffset","Math","max","min","getClampedScrollAxisDelta","current","captured","currentOffset","capturedOffset","scrollStore","createStore","createBag","coordination","makeMutable","metadata","disposeBag","bag","cancelAnimation","ScrollStore","clearBag"],"sourceRoot":"../../../../src","sources":["shared/stores/scroll.store.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAYA,IAAAC,YAAA,GAAAD,OAAA;AAOA,MAAME,eAGL,GAAG,CAAC,CAAC;AAEN,IAAIC,oBAAoB,GAAG,CAAC;AAE5B,MAAMC,sBAAsB,GAAGA,CAAA,KAAM;EACpCD,oBAAoB,IAAI,CAAC;EACzB,OAAO,mBAAmBA,oBAAoB,EAAE;AACjD,CAAC;AAED,MAAME,mBAAmB,GAAGA,CAC3BC,QAAmB,EACnBC,IAAuB,EACvBC,QAAgB,KACH;EACb,MAAM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AAc;AACtC,CAAC;;AAED;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_createStore","metadataWriters","nextMetadataWriterId","createMetadataWriterId","claimMetadataWriter","routeKey","axis","writerId","writers","releaseMetadataWriter","vertical","horizontal","hasMetadataWriters","Boolean","clearMetadataWriters","cloneScrollMetadataState","scroll","offset","contentSize","layoutSize","isTouched","exports","clampScrollAxisOffset","axisState","maxOffset","Math","max","min","getClampedScrollAxisDelta","current","captured","currentOffset","capturedOffset","getVisualScrollAxisDelta","currentAxisState","scrollStore","createStore","createBag","coordination","makeMutable","metadata","disposeBag","bag","cancelAnimation","ScrollStore","clearBag"],"sourceRoot":"../../../../src","sources":["shared/stores/scroll.store.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAYA,IAAAC,YAAA,GAAAD,OAAA;AAOA,MAAME,eAGL,GAAG,CAAC,CAAC;AAEN,IAAIC,oBAAoB,GAAG,CAAC;AAE5B,MAAMC,sBAAsB,GAAGA,CAAA,KAAM;EACpCD,oBAAoB,IAAI,CAAC;EACzB,OAAO,mBAAmBA,oBAAoB,EAAE;AACjD,CAAC;AAED,MAAME,mBAAmB,GAAGA,CAC3BC,QAAmB,EACnBC,IAAuB,EACvBC,QAAgB,KACH;EACb,MAAMC,OAAO,GAAGP,eAAe,CAACI,QAAQ,CAAC,IAAI,CAAC,CAAC;EAC/CJ,eAAe,CAACI,QAAQ,CAAC,GAAGG,OAAO;EAEnC,IAAI,CAACA,OAAO,CAACF,IAAI,CAAC,EAAE;IACnBE,OAAO,CAACF,IAAI,CAAC,GAAGC,QAAQ;EACzB;EAEA,OAAOC,OAAO,CAACF,IAAI,CAAC,KAAKC,QAAQ;AAClC,CAAC;AAED,MAAME,qBAAqB,GAAGA,CAC7BJ,QAAmB,EACnBC,IAAuB,EACvBC,QAAgB,KACH;EACb,MAAMC,OAAO,GAAGP,eAAe,CAACI,QAAQ,CAAC;EACzC,IAAI,CAACG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gB,CAACjB,MAAM,GAAGe,cAAc;AAChD,CAAC;;AAED;AACA;AACA;AACA;AACA;AAJAX,OAAA,CAAAY,wBAAA,GAAAA,wBAAA;AAKA,MAAME,WAAW,GAAG,IAAAC,wBAAW,EAAiB;EAC/CC,SAAS,EAAEA,CAAA,MAAO;IACjBC,YAAY,EAAE,IAAAC,kCAAW,EAA4B,IAAI,CAAC;IAC1DC,QAAQ,EAAE,IAAAD,kCAAW,EAA6B,IAAI;EACvD,CAAC,CAAC;EACFE,UAAU,EAAGC,GAAG,IAAK;IACpB,IAAAC,sCAAe,EAACD,GAAG,CAACJ,YAAY,CAAC;IACjC,IAAAK,sCAAe,EAACD,GAAG,CAACF,QAAQ,CAAC;EAC9B;AACD,CAAC,CAAC;AAEK,MAAMI,WAAW,GAAAvB,OAAA,CAAAuB,WAAA,GAAG;EAC1B,GAAGT,WAAW;EACdhC,sBAAsB;EACtBC,mBAAmB;EACnBK,qBAAqB;EACrBG,kBAAkB;EAClBiC,QAAQA,CAACxC,QAAmB,EAAE;IAC7BS,oBAAoB,CAACT,QAAQ,CAAC;IAC9B8B,WAAW,CAACU,QAAQ,CAACxC,QAAQ,CAAC;EAC/B;AACD,CAAC","ignoreList":[]}
|
|
@@ -22,6 +22,7 @@ let LifecycleTransitionRequestKind = exports.LifecycleTransitionRequestKind = /*
|
|
|
22
22
|
const SystemStore = exports.SystemStore = (0, _createStore.createStore)({
|
|
23
23
|
createBag: () => ({
|
|
24
24
|
targetProgress: (0, _reactNativeReanimated.makeMutable)(1),
|
|
25
|
+
animationProgress: (0, _reactNativeReanimated.makeMutable)(0),
|
|
25
26
|
resolvedAutoSnapPoint: (0, _reactNativeReanimated.makeMutable)(-1),
|
|
26
27
|
measuredContentLayout: (0, _reactNativeReanimated.makeMutable)(null),
|
|
27
28
|
pendingLifecycleRequestKind: (0, _reactNativeReanimated.makeMutable)(LifecycleTransitionRequestKind.None),
|
|
@@ -30,6 +31,7 @@ const SystemStore = exports.SystemStore = (0, _createStore.createStore)({
|
|
|
30
31
|
}),
|
|
31
32
|
disposeBag: bag => {
|
|
32
33
|
(0, _reactNativeReanimated.cancelAnimation)(bag.targetProgress);
|
|
34
|
+
(0, _reactNativeReanimated.cancelAnimation)(bag.animationProgress);
|
|
33
35
|
(0, _reactNativeReanimated.cancelAnimation)(bag.resolvedAutoSnapPoint);
|
|
34
36
|
(0, _reactNativeReanimated.cancelAnimation)(bag.measuredContentLayout);
|
|
35
37
|
(0, _reactNativeReanimated.cancelAnimation)(bag.pendingLifecycleRequestKind);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_createStore","LifecycleTransitionRequestKind","exports","SystemStore","createStore","createBag","targetProgress","makeMutable","resolvedAutoSnapPoint","measuredContentLayout","pendingLifecycleRequestKind","None","pendingLifecycleRequestTarget","pendingLifecycleStartBlockCount","disposeBag","bag","cancelAnimation","actions","requestLifecycleTransition","kind","target","set","clearLifecycleTransitionRequest","blockLifecycleStart","modify","count","unblockLifecycleStart","Math","max","drainLifecycleStartBlocks"],"sourceRoot":"../../../../src","sources":["shared/stores/system.store.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AAAoD,IAExCE,8BAA8B,GAAAC,OAAA,CAAAD,8BAAA,0BAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA;
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_createStore","LifecycleTransitionRequestKind","exports","SystemStore","createStore","createBag","targetProgress","makeMutable","animationProgress","resolvedAutoSnapPoint","measuredContentLayout","pendingLifecycleRequestKind","None","pendingLifecycleRequestTarget","pendingLifecycleStartBlockCount","disposeBag","bag","cancelAnimation","actions","requestLifecycleTransition","kind","target","set","clearLifecycleTransitionRequest","blockLifecycleStart","modify","count","unblockLifecycleStart","Math","max","drainLifecycleStartBlocks"],"sourceRoot":"../../../../src","sources":["shared/stores/system.store.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AAAoD,IAExCE,8BAA8B,GAAAC,OAAA,CAAAD,8BAAA,0BAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA;AA0D1C;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,WAAW,GAAAD,OAAA,CAAAC,WAAA,GAAG,IAAAC,wBAAW,EAAuC;EAC5EC,SAAS,EAAEA,CAAA,MAAO;IACjBC,cAAc,EAAE,IAAAC,kCAAW,EAAC,CAAC,CAAC;IAC9BC,iBAAiB,EAAE,IAAAD,kCAAW,EAAC,CAAC,CAAC;IACjCE,qBAAqB,EAAE,IAAAF,kCAAW,EAAC,CAAC,CAAC,CAAC;IACtCG,qBAAqB,EAAE,IAAAH,kCAAW,EAAgB,IAAI,CAAC;IACvDI,2BAA2B,EAAE,IAAAJ,kCAAW,EACvCN,8BAA8B,CAACW,IAChC,CAAC;IACDC,6BAA6B,EAAE,IAAAN,kCAAW,EAAS,CAAC,CAAC;IACrDO,+BAA+B,EAAE,IAAAP,kCAAW,EAAS,CAAC;EACvD,CAAC,CAAC;EACFQ,UAAU,EAAGC,GAAG,IAAK;IACpB,IAAAC,sCAAe,EAACD,GAAG,CAACV,cAAc,CAAC;IACnC,IAAAW,sCAAe,EAACD,GAAG,CAACR,iBAAiB,CAAC;IACtC,IAAAS,sCAAe,EAACD,GAAG,CAACP,qBAAqB,CAAC;IAC1C,IAAAQ,sCAAe,EAACD,GAAG,CAACN,qBAAqB,CAAC;IAC1C,IAAAO,sCAAe,EAACD,GAAG,CAACL,2BAA2B,CAAC;IAChD,IAAAM,sCAAe,EAACD,GAAG,CAACH,6BAA6B,CAAC;IAClD,IAAAI,sCAAe,EAACD,GAAG,CAACF,+BAA+B,CAAC;EACrD,CAAC;EACDI,OAAO,EAAGF,GAAG,KAAM;IAClBG,0BAA0BA,CAACC,IAAI,EAAEC,MAAM,EAAE;MACxC,SAAS;;MACTL,GAAG,CAACH,6BAA6B,CAACS,GAAG,CAACD,MAAM,CAAC;MAC7CL,GAAG,CAACL,2BAA2B,CAACW,GAAG,CAACF,IAAI,CAAC;IAC1C,CAAC;IAEDG,+BAA+BA,CAAA,EAAG;MACjC,SAAS;;MACTP,GAAG,CAACL,2BAA2B,CAACW,GAAG,CAACrB,8BAA8B,CAACW,IAAI,CAAC;MACxEI,GAAG,CAACH,6BAA6B,CAACS,GAAG,CAAC,CAAC,CAAC;IACzC,CAAC;IAEDE,mBAAmBA,CAAA,EAAG;MACrB,SAAS;;MACTR,GAAG,CAACF,+BAA+B,CAACW,MAAM,CACtBC,KAAQ,IAAQ;QAClC,SAAS;;QACT,OAAQA,KAAK,GAAG,CAAC;MAClB,CACD,CAAC;IACF,CAAC;IAEDC,qBAAqBA,CAAA,EAAG;MACvB,SAAS;;MACTX,GAAG,CAACF,+BAA+B,CAACW,MAAM,CACtBC,KAAQ,IAAQ;QAClC,SAAS;;QACT,OAAOE,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,KAAK,GAAG,CAAC,CAAC;MAC9B,CACD,CAAC;IACF,CAAC;IAEDI,yBAAyBA,CAAA,EAAG;MAC3B,SAAS;;MACTd,GAAG,CAACF,+BAA+B,CAACQ,GAAG,CAAC,CAAC,CAAC;IAC3C;EACD,CAAC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -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 _reactNativeReanimated = require("react-native-reanimated");
|
|
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":["_reactNativeReanimated","require","_constants","_animate","setTransitionLifecycleFlags","animations","isClosing","markEntering","closing","set","TRUE","entering","FALSE","animateToProgress","target","spec","onAnimationFinish","
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","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","runOnJS","animate","state","settled","finished","requestAnimationFrame"],"sourceRoot":"../../../../../src","sources":["shared/utils/animation/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e,EAAE;IACpBvB,2BAA2B,CAACC,UAAU,EAAEC,SAAS,EAAEC,YAAY,CAAC;IAEhE+B,WAAW,CAAC7B,GAAG,CAACC,eAAI,CAAC;IACrByC,qBAAqB,CAAC,MAAM;MAC3B,SAAS;;MACTb,WAAW,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":["shared/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":["shared/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;
|