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
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.buildZoomStyles = buildZoomStyles;
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
8
|
var _constants = require("../../../../constants");
|
|
9
|
+
var _scroll = require("../../../../stores/scroll.store");
|
|
9
10
|
var _createBoundsAccessorCore = require("../../helpers/create-bounds-accessor-core");
|
|
11
|
+
var _geometry = require("../../helpers/geometry");
|
|
10
12
|
var _helpers = require("../helpers");
|
|
11
13
|
var _math = require("../reveal/math");
|
|
12
14
|
var _config = require("./config");
|
|
@@ -76,25 +78,30 @@ function buildZoomStyles({
|
|
|
76
78
|
if (!trackingContentTarget) {
|
|
77
79
|
return {};
|
|
78
80
|
}
|
|
81
|
+
const isDismissing = active.gesture.dismissing === 1;
|
|
82
|
+
const dismissalTrackingGeometry = isDismissing ? (0, _geometry.computeContentTransformGeometry)({
|
|
83
|
+
start: sourceBounds,
|
|
84
|
+
end: trackingContentTarget,
|
|
85
|
+
entering: true,
|
|
86
|
+
dimensions: screenLayout,
|
|
87
|
+
anchor: zoomContentAnchor,
|
|
88
|
+
scaleMode: "uniform"
|
|
89
|
+
}) : null;
|
|
90
|
+
const dismissalCollapsedContentScale = dismissalTrackingGeometry ? (0, _math.resolveRevealContentBaseTransformFromGeometry)({
|
|
91
|
+
geometry: dismissalTrackingGeometry,
|
|
92
|
+
progress: 0
|
|
93
|
+
}).scale : 1;
|
|
79
94
|
const drag = (0, _drag.resolveZoomDragState)({
|
|
80
95
|
gesture: active.gesture,
|
|
81
96
|
activeTransitionProgress,
|
|
82
97
|
screenLayout,
|
|
83
|
-
|
|
84
|
-
trackingContentTarget,
|
|
98
|
+
collapsedContentScale: dismissalCollapsedContentScale,
|
|
85
99
|
dragOptions: zoomOptions?.drag
|
|
86
100
|
});
|
|
87
|
-
const trackedGestureScale = (0, _drag.resolveZoomTrackedGestureScale)({
|
|
88
|
-
drag,
|
|
89
|
-
activeTransitionProgress,
|
|
90
|
-
screenLayout,
|
|
91
|
-
sourceBounds,
|
|
92
|
-
trackingContentTarget
|
|
93
|
-
});
|
|
94
101
|
const focalGesture = drag.isDismissing ? active.gesture.handoff : active.gesture;
|
|
95
102
|
const focalProgress = drag.isDismissing ? activeTransitionProgress : 1;
|
|
96
103
|
const pinchFocalOffset = active.gesture.handoff.active === "pinch-in" ? (0, _helpers2.resolveZoomPinchFocalOffset)({
|
|
97
|
-
gestureScale: drag.isDismissing ? focalGesture.scale :
|
|
104
|
+
gestureScale: drag.isDismissing ? focalGesture.scale : drag.gestureScale,
|
|
98
105
|
pinchOriginX: focalGesture.pinchOriginX,
|
|
99
106
|
pinchOriginY: focalGesture.pinchOriginY,
|
|
100
107
|
progress: focalProgress,
|
|
@@ -105,6 +112,11 @@ function buildZoomStyles({
|
|
|
105
112
|
y: 0
|
|
106
113
|
};
|
|
107
114
|
if (focused) {
|
|
115
|
+
const capturedSourceScroll = sourceBounds.scroll;
|
|
116
|
+
const liveSourceScroll = props.inactive?.layouts.scroll;
|
|
117
|
+
const sourceScrollWeight = keepFocusedVisible && (active.entering || active.closing) ? 1 - Math.min(Math.max(activeTransitionProgress, 0), 1) : 0;
|
|
118
|
+
const sourceScrollDeltaX = (0, _scroll.getVisualScrollAxisDelta)(liveSourceScroll, capturedSourceScroll, "horizontal") * sourceScrollWeight;
|
|
119
|
+
const sourceScrollDeltaY = (0, _scroll.getVisualScrollAxisDelta)(liveSourceScroll, capturedSourceScroll, "vertical") * sourceScrollWeight;
|
|
108
120
|
const sourceBorderRadius = (0, _helpers.getSourceBorderRadius)(link);
|
|
109
121
|
const navigationMaskEnabled = current.options.navigationMaskEnabled;
|
|
110
122
|
const backdropOpacity = (0, _helpers2.resolveZoomBackdropOpacity)({
|
|
@@ -125,8 +137,8 @@ function buildZoomStyles({
|
|
|
125
137
|
const contentBaseTranslateX = contentRaw.translateX;
|
|
126
138
|
const contentBaseTranslateY = contentRaw.translateY;
|
|
127
139
|
const contentBaseScale = contentRaw.scale;
|
|
128
|
-
const contentTranslateX = contentBaseTranslateX + drag.dragX + pinchFocalOffset.x * contentBaseScale;
|
|
129
|
-
const contentTranslateY = contentBaseTranslateY + drag.dragY + pinchFocalOffset.y * contentBaseScale;
|
|
140
|
+
const contentTranslateX = contentBaseTranslateX + drag.dragX + pinchFocalOffset.x * contentBaseScale - sourceScrollDeltaX;
|
|
141
|
+
const contentTranslateY = contentBaseTranslateY + drag.dragY + pinchFocalOffset.y * contentBaseScale - sourceScrollDeltaY;
|
|
130
142
|
const contentScale = drag.isDismissing ? drag.dismissContentScale : contentBaseScale * drag.gestureScale;
|
|
131
143
|
return {
|
|
132
144
|
options: {
|
|
@@ -205,16 +217,29 @@ function buildZoomStyles({
|
|
|
205
217
|
}
|
|
206
218
|
};
|
|
207
219
|
}
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
screenLayout
|
|
220
|
+
const trackingGeometry = dismissalTrackingGeometry ?? (0, _geometry.computeContentTransformGeometry)({
|
|
221
|
+
start: sourceBounds,
|
|
222
|
+
end: trackingContentTarget,
|
|
223
|
+
entering: true,
|
|
224
|
+
dimensions: screenLayout,
|
|
225
|
+
anchor: zoomContentAnchor,
|
|
226
|
+
scaleMode: "uniform"
|
|
227
|
+
});
|
|
228
|
+
const trackedContentBaseTransform = (0, _math.resolveRevealContentBaseTransformFromGeometry)({
|
|
229
|
+
geometry: trackingGeometry,
|
|
230
|
+
progress: activeTransitionProgress
|
|
231
|
+
});
|
|
232
|
+
const collapsedContentScale = drag.isDismissing ? dismissalCollapsedContentScale : (0, _math.resolveRevealContentBaseTransformFromGeometry)({
|
|
233
|
+
geometry: trackingGeometry,
|
|
234
|
+
progress: 0
|
|
213
235
|
}).scale;
|
|
236
|
+
const trackedGestureScale = drag.isDismissing ? drag.dismissContentScale / trackedContentBaseTransform.scale : drag.gestureScale;
|
|
237
|
+
const trackedContentBaseScale = trackedContentBaseTransform.scale;
|
|
214
238
|
const trackedDragX = drag.dragX + pinchFocalOffset.x * trackedContentBaseScale;
|
|
215
239
|
const trackedDragY = drag.dragY + pinchFocalOffset.y * trackedContentBaseScale;
|
|
216
240
|
const trackedSourceElement = (0, _helpers2.resolveZoomTrackedSourceTransform)({
|
|
217
|
-
|
|
241
|
+
contentBaseTransform: trackedContentBaseTransform,
|
|
242
|
+
collapsedContentScale,
|
|
218
243
|
sourceBounds,
|
|
219
244
|
destinationBounds: trackingContentTarget,
|
|
220
245
|
screenLayout,
|
|
@@ -222,8 +247,7 @@ function buildZoomStyles({
|
|
|
222
247
|
dragY: trackedDragY,
|
|
223
248
|
gestureScale: trackedGestureScale,
|
|
224
249
|
parentScale: unfocusedContentScale,
|
|
225
|
-
rotation: drag.rotation
|
|
226
|
-
anchor: zoomContentAnchor
|
|
250
|
+
rotation: drag.rotation
|
|
227
251
|
});
|
|
228
252
|
return {
|
|
229
253
|
content: unfocusedContent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_constants","_createBoundsAccessorCore","_helpers","_math","_config","_drag","_helpers2","_mask","_targets","buildZoomStyles","tag","props","zoomOptions","target","keepFocusedVisible","expandedBorderRadius","Math","max","borderRadius","ZOOM_NAVIGATION_MASK_BORDER_RADIUS","backgroundScale","ZOOM_BACKGROUND_SCALE","backdropColor","maxBackdropOpacity","backdropOpacity","ZOOM_BACKDROP_MAX_OPACITY","active","current","focused","transitionProgress","layouts","screen","screenLayout","activeTransitionProgress","bounds","createBoundsAccessorCore","getProps","scopedBounds","link","sourceBounds","source","values","scaleMode","ZOOM_SHARED_OPTIONS","anchor","method","progress","zoomContentTarget","getZoomContentTarget","explicitTarget","zoomContentAnchor","getZoomContentAnchor","trackingContentTarget","resolveZoomTrackingContentTarget","contentTarget","drag","resolveZoomDragState","gesture","dragOptions","trackedGestureScale","resolveZoomTrackedGestureScale","focalGesture","isDismissing","handoff","focalProgress","pinchFocalOffset","resolveZoomPinchFocalOffset","gestureScale","scale","pinchOriginX","pinchOriginY","rotation","x","y","sourceBorderRadius","getSourceBorderRadius","navigationMaskEnabled","options","resolveZoomBackdropOpacity","dismissalDrag","dismissNorm","fadeEnd","ZOOM_SCREEN_A_FADE_END","maxOpacity","contentRaw","focusedOpacityRange","closing","ZOOM_FOCUSED_ELEMENT_CLOSE_OPACITY_RANGE","ZOOM_FOCUSED_ELEMENT_OPEN_OPACITY_RANGE","focusedFade","interpolate","contentBaseTranslateX","translateX","contentBaseTranslateY","translateY","contentBaseScale","contentTranslateX","dragX","contentTranslateY","dragY","contentScale","dismissContentScale","gestureReleaseVelocityScale","backdrop","style","backgroundColor","opacity","content","transform","rotateZ","animating","overflow","NAVIGATION_MASK_ELEMENT_STYLE_ID","resolveZoomNavigationMaskStyle","contentTransform","unfocusedOpacityRange","ZOOM_UNFOCUSED_ELEMENT_CLOSE_OPACITY_RANGE","ZOOM_UNFOCUSED_ELEMENT_OPEN_OPACITY_RANGE","unfocusedFade","unfocusedScale","shouldHideSource","EPSILON","unfocusedContentScale","settled","unfocusedContent","id","scaleX","scaleY","trackedContentBaseScale","resolveRevealContentBaseTransform","destinationBounds","trackedDragX","trackedDragY","trackedSourceElement","resolveZoomTrackedSourceTransform","parentScale"],"sourceRoot":"../../../../../../src","sources":["utils/bounds/navigation/zoom/build.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAIA,IAAAE,yBAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAUA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAKA,IAAAQ,KAAA,GAAAR,OAAA;AAIA,IAAAS,QAAA,GAAAT,OAAA;AAOO,SAASU,eAAeA,CAAC;EAC/BC,GAAG;EACHC,KAAK;EACLC;AACsB,CAAC,EAAyB;EAChD,SAAS;;EAET,IAAI,CAACF,GAAG,EAAE;IACT,OAAO,CAAC,CAAC;EACV;EAEA,MAAMG,MAAM,GAAGD,WAAW,EAAEC,MAAM;EAClC,MAAMC,kBAAkB,GAAGF,WAAW,EAAEE,kBAAkB,KAAK,IAAI;EACnE,MAAMC,oBAAoB,GAAGC,IAAI,CAACC,GAAG,CACpC,CAAC,EACDL,WAAW,EAAEM,YAAY,IAAIC,wCAC9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hC,gBAAgB,CAACO,CAAC,GAAGwD,uBAAuB;EAC1D,MAAMI,YAAY,GACjB7E,IAAI,CAAC4C,KAAK,GAAGlC,gBAAgB,CAACQ,CAAC,GAAGuD,uBAAuB;EAE1D,MAAMK,oBAAoB,GAAG,IAAAC,2CAAiC,EAAC;IAC9DxF,QAAQ,EAAEb,wBAAwB;IAClCM,YAAY;IACZ2F,iBAAiB,EAAE9E,qBAAqB;IACxCpB,YAAY;IACZiE,KAAK,EAAEkC,YAAY;IACnBhC,KAAK,EAAEiC,YAAY;IACnBjE,YAAY,EAAER,mBAAmB;IACjC4E,WAAW,EAAEb,qBAAqB;IAClCnD,QAAQ,EAAEhB,IAAI,CAACgB,QAAQ;IACvB3B,MAAM,EAAEM;EACT,CAAC,CAAC;EAEF,OAAO;IACNyD,OAAO,EAAEiB,gBAAgB;IACzB,CAACtF,IAAI,CAACuF,EAAE,GAAG;MACVrB,KAAK,EAAE;QACNI,SAAS,EAAE,CACV;UAAEhB,UAAU,EAAEyC,oBAAoB,CAACzC;QAAW,CAAC,EAC/C;UAAEE,UAAU,EAAEuC,oBAAoB,CAACvC;QAAW,CAAC,EAC/C;UAAEe,OAAO,EAAE,GAAGtD,IAAI,CAACgB,QAAQ;QAAM,CAAC,EAClC;UAAEuD,MAAM,EAAEO,oBAAoB,CAACP;QAAO,CAAC,EACvC;UAAEC,MAAM,EAAEM,oBAAoB,CAACN;QAAO,CAAC,CACvC;QACDrB,OAAO,EAAEY;MACV;IACD;EACD,CAAC;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_constants","_scroll","_createBoundsAccessorCore","_geometry","_helpers","_math","_config","_drag","_helpers2","_mask","_targets","buildZoomStyles","tag","props","zoomOptions","target","keepFocusedVisible","expandedBorderRadius","Math","max","borderRadius","ZOOM_NAVIGATION_MASK_BORDER_RADIUS","backgroundScale","ZOOM_BACKGROUND_SCALE","backdropColor","maxBackdropOpacity","backdropOpacity","ZOOM_BACKDROP_MAX_OPACITY","active","current","focused","transitionProgress","layouts","screen","screenLayout","activeTransitionProgress","bounds","createBoundsAccessorCore","getProps","scopedBounds","link","sourceBounds","source","values","scaleMode","ZOOM_SHARED_OPTIONS","anchor","method","progress","zoomContentTarget","getZoomContentTarget","explicitTarget","zoomContentAnchor","getZoomContentAnchor","trackingContentTarget","resolveZoomTrackingContentTarget","contentTarget","isDismissing","gesture","dismissing","dismissalTrackingGeometry","computeContentTransformGeometry","start","end","entering","dimensions","dismissalCollapsedContentScale","resolveRevealContentBaseTransformFromGeometry","geometry","scale","drag","resolveZoomDragState","collapsedContentScale","dragOptions","focalGesture","handoff","focalProgress","pinchFocalOffset","resolveZoomPinchFocalOffset","gestureScale","pinchOriginX","pinchOriginY","rotation","x","y","capturedSourceScroll","scroll","liveSourceScroll","inactive","sourceScrollWeight","closing","min","sourceScrollDeltaX","getVisualScrollAxisDelta","sourceScrollDeltaY","sourceBorderRadius","getSourceBorderRadius","navigationMaskEnabled","options","resolveZoomBackdropOpacity","dismissalDrag","dismissNorm","fadeEnd","ZOOM_SCREEN_A_FADE_END","maxOpacity","contentRaw","focusedOpacityRange","ZOOM_FOCUSED_ELEMENT_CLOSE_OPACITY_RANGE","ZOOM_FOCUSED_ELEMENT_OPEN_OPACITY_RANGE","focusedFade","interpolate","contentBaseTranslateX","translateX","contentBaseTranslateY","translateY","contentBaseScale","contentTranslateX","dragX","contentTranslateY","dragY","contentScale","dismissContentScale","gestureReleaseVelocityScale","backdrop","style","backgroundColor","opacity","content","transform","rotateZ","animating","overflow","NAVIGATION_MASK_ELEMENT_STYLE_ID","resolveZoomNavigationMaskStyle","contentTransform","unfocusedOpacityRange","ZOOM_UNFOCUSED_ELEMENT_CLOSE_OPACITY_RANGE","ZOOM_UNFOCUSED_ELEMENT_OPEN_OPACITY_RANGE","unfocusedFade","unfocusedScale","shouldHideSource","EPSILON","unfocusedContentScale","settled","unfocusedContent","id","scaleX","scaleY","trackingGeometry","trackedContentBaseTransform","trackedGestureScale","trackedContentBaseScale","trackedDragX","trackedDragY","trackedSourceElement","resolveZoomTrackedSourceTransform","contentBaseTransform","destinationBounds","parentScale"],"sourceRoot":"../../../../../../src","sources":["utils/bounds/navigation/zoom/build.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAIA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,yBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAUA,IAAAQ,KAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AAKA,IAAAU,KAAA,GAAAV,OAAA;AAIA,IAAAW,QAAA,GAAAX,OAAA;AAOO,SAASY,eAAeA,CAAC;EAC/BC,GAAG;EACHC,KAAK;EACLC;AACsB,CAAC,EAAyB;EAChD,SAAS;;EAET,IAAI,CAACF,GAAG,EAAE;IACT,OAAO,CAAC,CAAC;EACV;EAEA,MAAMG,MAAM,GAAGD,WAAW,EAAEC,MAAM;EAClC,MAAMC,kBAAkB,GAAGF,WAAW,EAAEE,kBAAkB,KAAK,IAAI;EACnE,MAAMC,oBAAoB,GAAGC,IAAI,CAACC,GAAG,CACpC,CAAC,EACDL,WAAW,EAAEM,YAAY,IAAIC,wCAC9B,CAAC;EACD,MAAMC,eAAe,GAAGR,WAAW,EAAEQ,eAAe,IAAIC,6BAAqB;EAC7E,MAAMC,aAAa,GAAGV,WAAW,EAAEU,aAAa,IAAI,OAAO;EAC3D,MAAMC,kBAAkB,GACvBX,WAAW,EAAEY,eAAe,IAAIC,iCAAyB;EAE1D,MAAM;IACLC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,kBAAkB;IAClBC,OAAO,EAAE;MAAEC,MAAM,EAAEC;IAAa;EACjC,CAAC,GAAGrB,KAAK;EAET,MAA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,GAAGoE,uBAAuB;EAC1D,MAAME,YAAY,GACjBnF,IAAI,CAACiD,KAAK,GAAG1C,gBAAgB,CAACO,CAAC,GAAGmE,uBAAuB;EAE1D,MAAMG,oBAAoB,GAAG,IAAAC,2CAAiC,EAAC;IAC9DC,oBAAoB,EAAEP,2BAA2B;IACjD7E,qBAAqB;IACrB/B,YAAY;IACZoH,iBAAiB,EAAEvG,qBAAqB;IACxCpB,YAAY;IACZmF,KAAK,EAAEmC,YAAY;IACnBjC,KAAK,EAAEkC,YAAY;IACnB1E,YAAY,EAAEuE,mBAAmB;IACjCQ,WAAW,EAAEhB,qBAAqB;IAClC5D,QAAQ,EAAEZ,IAAI,CAACY;EAChB,CAAC,CAAC;EAEF,OAAO;IACN6C,OAAO,EAAEiB,gBAAgB;IACzB,CAACxG,IAAI,CAACyG,EAAE,GAAG;MACVrB,KAAK,EAAE;QACNI,SAAS,EAAE,CACV;UAAEhB,UAAU,EAAE0C,oBAAoB,CAAC1C;QAAW,CAAC,EAC/C;UAAEE,UAAU,EAAEwC,oBAAoB,CAACxC;QAAW,CAAC,EAC/C;UAAEe,OAAO,EAAE,GAAG3D,IAAI,CAACY,QAAQ;QAAM,CAAC,EAClC;UAAEgE,MAAM,EAAEQ,oBAAoB,CAACR;QAAO,CAAC,EACvC;UAAEC,MAAM,EAAEO,oBAAoB,CAACP;QAAO,CAAC,CACvC;QACDrB,OAAO,EAAEY;MACV;IACD;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -11,9 +11,7 @@ exports.resolveZoomDragState = resolveZoomDragState;
|
|
|
11
11
|
exports.resolveZoomHorizontalDragTranslation = resolveZoomHorizontalDragTranslation;
|
|
12
12
|
exports.resolveZoomPinchScale = resolveZoomPinchScale;
|
|
13
13
|
exports.resolveZoomPrimaryDragTranslation = resolveZoomPrimaryDragTranslation;
|
|
14
|
-
exports.resolveZoomTrackedGestureScale = resolveZoomTrackedGestureScale;
|
|
15
14
|
var _constants = require("../../../../constants");
|
|
16
|
-
var _math = require("../reveal/math");
|
|
17
15
|
var _config = require("./config");
|
|
18
16
|
const ZOOM_DRAG_SCALE_EXPONENT = 2;
|
|
19
17
|
const ZOOM_DRAG_SCALE_FLOOR = 0.5;
|
|
@@ -104,8 +102,7 @@ function resolveZoomDragState({
|
|
|
104
102
|
gesture,
|
|
105
103
|
activeTransitionProgress,
|
|
106
104
|
screenLayout,
|
|
107
|
-
|
|
108
|
-
trackingContentTarget,
|
|
105
|
+
collapsedContentScale,
|
|
109
106
|
dragOptions
|
|
110
107
|
}) {
|
|
111
108
|
"worklet";
|
|
@@ -146,16 +143,10 @@ function resolveZoomDragState({
|
|
|
146
143
|
const rotation = isPinchIn ? isDismissing ? gestureHandoff.rotation * activeTransitionProgress : gesture.rotation : 0;
|
|
147
144
|
let dismissContentScale = gestureScale;
|
|
148
145
|
if (isDismissing) {
|
|
149
|
-
const targetContentScale = (0, _math.resolveRevealContentBaseTransform)({
|
|
150
|
-
progress: 0,
|
|
151
|
-
sourceBounds,
|
|
152
|
-
destinationBounds: trackingContentTarget,
|
|
153
|
-
screenLayout
|
|
154
|
-
}).scale;
|
|
155
146
|
dismissContentScale = resolveZoomDismissContentScale({
|
|
156
147
|
transitionRemaining: activeTransitionProgress,
|
|
157
148
|
releaseScale: gestureScale,
|
|
158
|
-
targetScale:
|
|
149
|
+
targetScale: collapsedContentScale,
|
|
159
150
|
velocity: gestureHandoff.velocity,
|
|
160
151
|
velocityDepth: _config.ZOOM_DISMISS_VELOCITY_DEPTH * (isPinchIn ? ZOOM_PINCH_VELOCITY_DEPTH_MULTIPLIER : 1)
|
|
161
152
|
});
|
|
@@ -173,24 +164,4 @@ function resolveZoomDragState({
|
|
|
173
164
|
rotation
|
|
174
165
|
};
|
|
175
166
|
}
|
|
176
|
-
function resolveZoomTrackedGestureScale({
|
|
177
|
-
drag,
|
|
178
|
-
activeTransitionProgress,
|
|
179
|
-
screenLayout,
|
|
180
|
-
sourceBounds,
|
|
181
|
-
trackingContentTarget
|
|
182
|
-
}) {
|
|
183
|
-
"worklet";
|
|
184
|
-
|
|
185
|
-
if (!drag.isDismissing) {
|
|
186
|
-
return drag.gestureScale;
|
|
187
|
-
}
|
|
188
|
-
const trackedContentBaseScale = (0, _math.resolveRevealContentBaseTransform)({
|
|
189
|
-
progress: activeTransitionProgress,
|
|
190
|
-
sourceBounds,
|
|
191
|
-
destinationBounds: trackingContentTarget,
|
|
192
|
-
screenLayout
|
|
193
|
-
}).scale;
|
|
194
|
-
return drag.dismissContentScale / trackedContentBaseScale;
|
|
195
|
-
}
|
|
196
167
|
//# sourceMappingURL=drag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","
|
|
1
|
+
{"version":3,"names":["_constants","require","_config","ZOOM_DRAG_SCALE_EXPONENT","ZOOM_DRAG_SCALE_FLOOR","ZOOM_COUNTER_DRAG_SCALE_INTENSITY","ZOOM_PRIMARY_DRAG_TRANSLATION_SCALE","ZOOM_PRIMARY_DRAG_RESISTANCE","ZOOM_HORIZONTAL_DRAG_DISTANCE_SCALE","ZOOM_CROSS_AXIS_DRAG_TRANSLATION_SCALE","ZOOM_CROSS_AXIS_DRAG_RESISTANCE","ZOOM_PINCH_SCALE_RESPONSE","ZOOM_PINCH_VELOCITY_DEPTH_MULTIPLIER","resolveZoomDismissContentScale","transitionRemaining","releaseScale","targetScale","velocity","velocityDepth","closeProgress","depth","scaleDelta","controlScale1","linearControlScale2","controlScale2","Math","max","EPSILON","remaining","resolveZoomPrimaryDragTranslation","translation","dimension","direction","translationDistance","abs","baseDistance","normalizedTranslation","effectiveResistance","resistedTranslation","exp","min","resolveZoomHorizontalDragTranslation","resolveZoomCrossAxisDragTranslation","resolveZoomDragScale","normalized","scaleInput","progress","rawMinimumScale","rawScale","resolveZoomPinchScale","scale","resolveZoomDismissalNorm","isInverted","resolveZoomDragState","gesture","activeTransitionProgress","screenLayout","collapsedContentScale","dragOptions","gestureHandoff","handoff","isDismissing","dismissing","activeGesture","active","isHorizontalInverted","isHorizontal","isVerticalInverted","isVertical","isPinchIn","translationResponse","horizontal","vertical","scaleResponse","handoffPrimaryNorm","normScale","normX","normY","livePrimaryNorm","dismissNorm","nativeDragX","x","width","nativeDragY","y","height","dragX","dragY","scaleNorm","nativeGestureScale","gestureScale","rotation","dismissContentScale","ZOOM_DISMISS_VELOCITY_DEPTH","collapsesMask","dismissProgress"],"sourceRoot":"../../../../../../src","sources":["utils/bounds/navigation/zoom/drag.ts"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAMA,IAAAC,OAAA,GAAAD,OAAA;AAEA,MAAME,wBAAwB,GAAG,CAAC;AAClC,MAAMC,qBAAqB,GAAG,GAAG;AACjC,MAAMC,iCAAiC,GAAG,GAAG;AAC7C,MAAMC,mCAAmC,GAAG,GAAG;AAC/C,MAAMC,4BAA4B,GAAG,CAAC;AACtC,MAAMC,mCAAmC,GAAG,GAAG;AAC/C,MAAMC,sCAAsC,GAAG,IAAI;AACnD,MAAMC,+BAA+B,GAAG,IAAI;AAC5C,MAAMC,yBAAyB,GAAG,CAAC;AACnC,MAAMC,oCAAoC,GAAG,CAAC;AAiBvC,SAASC,8BAA8BA,CAAC;EAC9CC,mBAAmB;EACnBC,YAAY;EACZC,WAAW;EACXC,QAAQ;EACRC;AAOD,CAAC,EAAE;EACF,SAAS;;EAET,MAAMC,aAAa,GAAG,CAAC,GAAGL,mBAAmB;EAC7C,MAAMM,KAAK,GAAGF,aAAa,GAAGD,QAAQ;EAEtC,MAAMI,UAAU,GAAGL,WAAW,GAAGD,YAAY;EAC7C,MAAMO,aAAa,GAAGP,YAAY,GAAGM,UAAU,GAAG,CAAC;EACnD,MAAME,mBAAmB,GAAGR,YAAY,GAAI,CAAC,GAAGM,UAAU,GAAI,CAAC;EAC/D,MAAMG,aAAa,GAAGC,IAAI,CAACC,GAAG,CAACC,kBAAO,EAAEJ,mBAAmB,IAAI,CAAC,GAAGH,KAAK,CAAC,CAAC;EAC1E,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,cAAc,CAACgC,QAAQ,GAAGpC,wBAAwB,GAClDD,OAAO,CAACqC,QAAQ,GACjB,CAAC;EAEJ,IAAIC,mBAAmB,GAAGF,YAAY;EAEtC,IAAI7B,YAAY,EAAE;IACjB+B,mBAAmB,GAAG/E,8BAA8B,CAAC;MACpDC,mBAAmB,EAAEyC,wBAAwB;MAC7CxC,YAAY,EAAE2E,YAAY;MAC1B1E,WAAW,EAAEyC,qBAAqB;MAClCxC,QAAQ,EAAE0C,cAAc,CAAC1C,QAAQ;MACjCC,aAAa,EACZ2E,mCAA2B,IAC1BxB,SAAS,GAAGzD,oCAAoC,GAAG,CAAC;IACvD,CAAC,CAAC;EACH;EAEA,OAAO;IACNkF,aAAa,EAAE1B,UAAU;IACzBwB,mBAAmB;IACnBb,WAAW;IACXgB,eAAe,EAAElC,YAAY,GAAG,CAAC,GAAGN,wBAAwB,GAAG,CAAC;IAChE+B,KAAK;IACLC,KAAK;IACLG,YAAY;IACZ7B,YAAY;IACZM,kBAAkB;IAClBwB;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -52,33 +52,19 @@ function resolveZoomPinchFocalOffset({
|
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
function resolveZoomTrackedSourceTransform({
|
|
55
|
-
progress,
|
|
56
55
|
sourceBounds,
|
|
57
56
|
destinationBounds,
|
|
58
57
|
screenLayout,
|
|
58
|
+
contentBaseTransform,
|
|
59
|
+
collapsedContentScale,
|
|
59
60
|
dragX,
|
|
60
61
|
dragY,
|
|
61
62
|
gestureScale,
|
|
62
63
|
parentScale,
|
|
63
|
-
rotation = 0
|
|
64
|
-
anchor
|
|
64
|
+
rotation = 0
|
|
65
65
|
}) {
|
|
66
66
|
"worklet";
|
|
67
67
|
|
|
68
|
-
const contentBaseTransform = (0, _math.resolveRevealContentBaseTransform)({
|
|
69
|
-
progress,
|
|
70
|
-
sourceBounds,
|
|
71
|
-
destinationBounds,
|
|
72
|
-
screenLayout,
|
|
73
|
-
anchor
|
|
74
|
-
});
|
|
75
|
-
const collapsedContentScale = (0, _math.resolveRevealContentBaseTransform)({
|
|
76
|
-
progress: 0,
|
|
77
|
-
sourceBounds,
|
|
78
|
-
destinationBounds,
|
|
79
|
-
screenLayout,
|
|
80
|
-
anchor
|
|
81
|
-
}).scale;
|
|
82
68
|
const contentScale = contentBaseTransform.scale * gestureScale;
|
|
83
69
|
const safeCollapsedContentScale = Math.max(Math.abs(collapsedContentScale), _constants.EPSILON);
|
|
84
70
|
const safeParentScale = Math.max(Math.abs(parentScale), _constants.EPSILON);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","_math","resolveZoomBackdropOpacity","transitionProgress","dismissalDrag","fadeEnd","maxOpacity","clampedProgress","Math","min","max","clampedDrag","safeFadeEnd","EPSILON","transitionOpacity","clampedMaxOpacity","resolveZoomPinchFocalOffset","gestureScale","pinchOriginX","pinchOriginY","progress","rotation","screenLayout","abs","x","y","offsetX","width","offsetY","height","cosine","cos","sine","sin","transformedOffsetX","transformedOffsetY","resolveZoomTrackedSourceTransform","sourceBounds","destinationBounds","
|
|
1
|
+
{"version":3,"names":["_constants","require","_math","resolveZoomBackdropOpacity","transitionProgress","dismissalDrag","fadeEnd","maxOpacity","clampedProgress","Math","min","max","clampedDrag","safeFadeEnd","EPSILON","transitionOpacity","clampedMaxOpacity","resolveZoomPinchFocalOffset","gestureScale","pinchOriginX","pinchOriginY","progress","rotation","screenLayout","abs","x","y","offsetX","width","offsetY","height","cosine","cos","sine","sin","transformedOffsetX","transformedOffsetY","resolveZoomTrackedSourceTransform","sourceBounds","destinationBounds","contentBaseTransform","collapsedContentScale","dragX","dragY","parentScale","contentScale","scale","safeCollapsedContentScale","safeParentScale","uniformSourceScale","trackedTransform","resolveTrackedSourceElementTransform","contentTranslateX","translateX","contentTranslateY","translateY","screenWidth","screenHeight","scaleX","scaleY","screenCenterX","screenCenterY","destinationCenterX","pageX","destinationCenterY","pageY","scaledOffsetX","scaledOffsetY","r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a,GAAGjC,IAAI,GAAGkC,aAAa,GAAGpC,MAAM;EAEpE,OAAO;IACN,GAAGmB,gBAAgB;IACnBG,UAAU,EACTH,gBAAgB,CAACG,UAAU,GAC3B,CAACe,cAAc,GAAGF,aAAa,IAAIlB,eAAe;IACnDO,UAAU,EACTL,gBAAgB,CAACK,UAAU,GAC3B,CAACc,cAAc,GAAGF,aAAa,IAAInB;EACrC,CAAC;AACF","ignoreList":[]}
|
|
@@ -29,6 +29,7 @@ export function snapDescriptorToIndex(descriptor, index) {
|
|
|
29
29
|
const targetProgress = sorted[index];
|
|
30
30
|
const animations = AnimationStore.getBag(descriptor.route.key);
|
|
31
31
|
const targetProgressValue = SystemStore.getValue(descriptor.route.key, "targetProgress");
|
|
32
|
+
const animationProgressValue = SystemStore.getValue(descriptor.route.key, "animationProgress");
|
|
32
33
|
scheduleOnUI(() => {
|
|
33
34
|
"worklet";
|
|
34
35
|
|
|
@@ -37,6 +38,7 @@ export function snapDescriptorToIndex(descriptor, index) {
|
|
|
37
38
|
target: targetProgress,
|
|
38
39
|
animations,
|
|
39
40
|
targetProgress: targetProgressValue,
|
|
41
|
+
animationProgress: animationProgressValue,
|
|
40
42
|
spec: resolveSnapTransitionSpec(descriptor.options.transitionSpec, targetProgress < currentProgress ? "collapse" : "expand")
|
|
41
43
|
});
|
|
42
44
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["scheduleOnUI","AnimationStore","SystemStore","animateToProgress","resolveSnapTransitionSpec","logger","resolveSnapTargetEntry","getSortedSnapPoints","descriptor","snapPoints","options","length","autoVal","getValue","route","key","get","resolved","map","p","filter","sort","a","b","snapDescriptorToIndex","index","sorted","warn","targetProgress","animations","getBag","targetProgressValue","currentProgress","transitionProgress","target","spec","transitionSpec","snapTo","screenWithSnapPoints"],"sourceRoot":"../../../src","sources":["animation/snap-to.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,uBAAuB;AACpD,SAASC,cAAc,QAAQ,2BAA2B;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AAC,GAC7D,CAAC;IACD,OAAO,KAAK;EACb;EAEA,MAAMiB,cAAc,GAAGF,MAAM,CAACD,KAAK,CAAC;EACpC,MAAMI,UAAU,GAAG5B,cAAc,CAAC6B,MAAM,CAACtB,UAAU,CAACM,KAAK,CAACC,GAAG,CAAC;EAC9D,MAAMgB,mBAAmB,GAAG7B,WAAW,CAACW,QAAQ,CAC/CL,UAAU,CAACM,KAAK,CAACC,GAAG,EACpB,gBACD,CAAC;EAEDf,YAAY,CAAC,MAAM;IAClB,SAAS;;IACT,
|
|
1
|
+
{"version":3,"names":["scheduleOnUI","AnimationStore","SystemStore","animateToProgress","resolveSnapTransitionSpec","logger","resolveSnapTargetEntry","getSortedSnapPoints","descriptor","snapPoints","options","length","autoVal","getValue","route","key","get","resolved","map","p","filter","sort","a","b","snapDescriptorToIndex","index","sorted","warn","targetProgress","animations","getBag","targetProgressValue","animationProgressValue","currentProgress","transitionProgress","target","animationProgress","spec","transitionSpec","snapTo","screenWithSnapPoints"],"sourceRoot":"../../../src","sources":["animation/snap-to.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,uBAAuB;AACpD,SAASC,cAAc,QAAQ,2BAA2B;AAE1D,SAASC,WAAW,QAAQ,wBAAwB;AACpD,SAASC,iBAAiB,QAAQ,wCAAwC;AAC1E,SAASC,yBAAyB,QAAQ,iDAAiD;AAC3F,SAASC,MAAM,QAAQ,iBAAiB;AACxC,SAASC,sBAAsB,QAAQ,uBAAuB;AAE9D,MAAMC,mBAAmB,GACxBC,UAAsC,IACjB;EACrB,MAAMC,UAAU,GAAGD,UAAU,CAACE,OAAO,EAAED,UAAU;EACjD,IAAI,CAACA,UAAU,IAAIA,UAAU,CAACE,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;;EAEvD;EACA,MAAMC,OAAO,GAAGV,WAAW,CAACW,QAAQ,CACnCL,UAAU,CAACM,KAAK,CAACC,GAAG,EACpB,uBACD,CAAC,CAACC,GAAG,CAAC,CAAC;EAEP,MAA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,CAAC;IAE3Db,iBAAiB,CAAC;MACjBgC,MAAM,EAAEP,cAAc;MACtBC,UAAU;MACVD,cAAc,EAAEG,mBAAmB;MACnCK,iBAAiB,EAAEJ,sBAAsB;MACzCK,IAAI,EAAEjC,yBAAyB,CAC9BI,UAAU,CAACE,OAAO,CAAC4B,cAAc,EACjCV,cAAc,GAAGK,eAAe,GAAG,UAAU,GAAG,QACjD;IACD,CAAC,CAAC;EACH,CAAC,CAAC;EAEF,OAAO,IAAI;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,MAAMA,CAACd,KAAa,EAAQ;EAC3C,MAAMe,oBAAoB,GAAGlC,sBAAsB,CAAC,CAAC;EAErD,IAAI,CAACkC,oBAAoB,EAAE;IAC1BnC,MAAM,CAACsB,IAAI,CAAC,+CAA+C,CAAC;IAC5D;EACD;EAEAH,qBAAqB,CAACgB,oBAAoB,CAAChC,UAAU,EAAEiB,KAAK,CAAC;AAC9D","ignoreList":[]}
|
|
@@ -1,48 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { memo,
|
|
4
|
-
import Animated
|
|
3
|
+
import { memo, useLayoutEffect } from "react";
|
|
4
|
+
import Animated from "react-native-reanimated";
|
|
5
5
|
import { useComposedSlotStyles, useSlotLayoutStyles } from "../../../providers/screen/styles";
|
|
6
|
-
import {
|
|
7
|
-
import { useRegisterTarget } from "../hooks/use-register-target";
|
|
6
|
+
import { logger } from "../../../utils/logger";
|
|
8
7
|
import { BoundaryContentPortal, BoundaryContentPortalHost } from "../portal/components/boundary-content-portal";
|
|
9
8
|
import { BoundaryPortal } from "../portal/components/boundary-portal";
|
|
10
|
-
import { useBoundaryRootContext } from "../providers/boundary-root.provider";
|
|
9
|
+
import { TARGET_OUTSIDE_ROOT_WARNING, useBoundaryRootContext } from "../providers/boundary-root.provider";
|
|
11
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
export const
|
|
11
|
+
export const BOUNDARY_TARGET_ACTIVE_PROP = "__boundaryTargetActive";
|
|
12
|
+
const BoundaryTargetInner = props => {
|
|
13
13
|
const {
|
|
14
|
+
[BOUNDARY_TARGET_ACTIVE_PROP]: active,
|
|
14
15
|
children,
|
|
15
16
|
pointerEvents,
|
|
16
17
|
style,
|
|
17
18
|
...rest
|
|
18
19
|
} = props;
|
|
19
|
-
const targetAnimatedRef = useAnimatedRef();
|
|
20
|
-
const targetEscapePlaceholderRef = useAnimatedRef();
|
|
21
20
|
const rootContext = useBoundaryRootContext();
|
|
22
21
|
const boundaryId = rootContext?.boundTag.tag;
|
|
23
|
-
const isActiveTarget =
|
|
22
|
+
const isActiveTarget = active === true && rootContext !== null;
|
|
24
23
|
const portalRuntime = rootContext?.portalRuntime;
|
|
25
24
|
const handoffEnabled = isActiveTarget && rootContext?.handoffEnabled === true;
|
|
26
|
-
const shouldEscapeTargetToScreenHost = portalRuntime?.escapeClipping === true
|
|
25
|
+
const shouldEscapeTargetToScreenHost = isActiveTarget && portalRuntime?.escapeClipping === true;
|
|
27
26
|
const shouldApplyAssociatedStyleInline = isActiveTarget && portalRuntime?.escapeClipping !== true;
|
|
28
27
|
const shouldApplyPortalLayoutStyle = isActiveTarget && portalRuntime?.escapeClipping === true;
|
|
29
28
|
const associatedTargetStyles = useComposedSlotStyles(rootContext?.boundTag.tag, style);
|
|
30
29
|
const portalLayoutStyle = useSlotLayoutStyles(rootContext?.boundTag.tag);
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
30
|
+
const measurementRef = isActiveTarget ? rootContext.measurementRef : undefined;
|
|
31
|
+
useLayoutEffect(() => {
|
|
32
|
+
if (__DEV__ && rootContext === null) {
|
|
33
|
+
logger.warn(TARGET_OUTSIDE_ROOT_WARNING);
|
|
34
|
+
}
|
|
35
|
+
}, [rootContext]);
|
|
38
36
|
return /*#__PURE__*/_jsx(BoundaryPortal, {
|
|
39
37
|
boundaryId: boundaryId ?? "",
|
|
40
38
|
enabled: shouldEscapeTargetToScreenHost,
|
|
41
|
-
placeholderRef:
|
|
39
|
+
placeholderRef: measurementRef,
|
|
42
40
|
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
43
41
|
...rest,
|
|
44
42
|
pointerEvents: pointerEvents,
|
|
45
|
-
ref:
|
|
43
|
+
ref: shouldEscapeTargetToScreenHost ? undefined : measurementRef,
|
|
46
44
|
style: [style, shouldApplyAssociatedStyleInline ? associatedTargetStyles : undefined, shouldApplyPortalLayoutStyle ? portalLayoutStyle : undefined],
|
|
47
45
|
collapsable: false,
|
|
48
46
|
children: /*#__PURE__*/_jsx(BoundaryContentPortalHost, {
|
|
@@ -57,5 +55,6 @@ export const BoundaryTarget = /*#__PURE__*/memo(function BoundaryTarget(props) {
|
|
|
57
55
|
})
|
|
58
56
|
})
|
|
59
57
|
});
|
|
60
|
-
}
|
|
58
|
+
};
|
|
59
|
+
export const BoundaryTarget = /*#__PURE__*/memo(BoundaryTargetInner);
|
|
61
60
|
//# sourceMappingURL=boundary-target.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","
|
|
1
|
+
{"version":3,"names":["memo","useLayoutEffect","Animated","useComposedSlotStyles","useSlotLayoutStyles","logger","BoundaryContentPortal","BoundaryContentPortalHost","BoundaryPortal","TARGET_OUTSIDE_ROOT_WARNING","useBoundaryRootContext","jsx","_jsx","BOUNDARY_TARGET_ACTIVE_PROP","BoundaryTargetInner","props","active","children","pointerEvents","style","rest","rootContext","boundaryId","boundTag","tag","isActiveTarget","portalRuntime","handoffEnabled","shouldEscapeTargetToScreenHost","escapeClipping","shouldApplyAssociatedStyleInline","shouldApplyPortalLayoutStyle","associatedTargetStyles","portalLayoutStyle","measurementRef","undefined","__DEV__","warn","enabled","placeholderRef","View","ref","collapsable","screenKey","currentScreenKey","BoundaryTarget"],"s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
3
|
-
import { forwardRef, memo } from "react";
|
|
3
|
+
import { cloneElement, forwardRef, memo, useMemo } from "react";
|
|
4
4
|
import Animated from "react-native-reanimated";
|
|
5
|
+
import { BOUNDARY_TARGET_ACTIVE_PROP, BoundaryTarget } from "./components/boundary-target";
|
|
5
6
|
import { BoundaryContentPortalHost } from "./portal/components/boundary-content-portal";
|
|
6
7
|
import { BoundaryPortal } from "./portal/components/boundary-portal";
|
|
7
8
|
import { BoundaryRootProvider } from "./providers/boundary-root.provider";
|
|
9
|
+
import { resolveBoundaryTarget } from "./utils/resolve-boundary-target";
|
|
8
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
11
|
export function createBoundaryComponent(Wrapped, options = {}) {
|
|
10
12
|
const {
|
|
@@ -26,6 +28,15 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
26
28
|
children,
|
|
27
29
|
...rest
|
|
28
30
|
} = props;
|
|
31
|
+
const targetResolution = useMemo(() => {
|
|
32
|
+
return resolveBoundaryTarget(children, {
|
|
33
|
+
isTarget: element => element.type === BoundaryTarget,
|
|
34
|
+
mapTarget: (element, selected) => /*#__PURE__*/cloneElement(element, {
|
|
35
|
+
[BOUNDARY_TARGET_ACTIVE_PROP]: selected
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
}, [children]);
|
|
39
|
+
const targetStyle = targetResolution.target?.props?.style;
|
|
29
40
|
return /*#__PURE__*/_jsx(BoundaryRootProvider, {
|
|
30
41
|
config: {
|
|
31
42
|
anchor,
|
|
@@ -38,12 +49,15 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
38
49
|
forwardedRef: forwardedRef,
|
|
39
50
|
group: group,
|
|
40
51
|
handoff: handoff,
|
|
52
|
+
hasTarget: targetResolution.target !== null,
|
|
41
53
|
id: id,
|
|
42
54
|
style: style,
|
|
55
|
+
targetCount: targetResolution.targetCount,
|
|
56
|
+
targetStyle: targetStyle,
|
|
43
57
|
children: root => /*#__PURE__*/_jsx(BoundaryPortal, {
|
|
44
58
|
boundaryId: root.boundTag.tag,
|
|
45
59
|
enabled: root.shouldRenderBoundaryRootThroughPortal,
|
|
46
|
-
placeholderRef: root.
|
|
60
|
+
placeholderRef: root.measurementRef,
|
|
47
61
|
children: /*#__PURE__*/_jsx(AnimatedComponent, {
|
|
48
62
|
...rest,
|
|
49
63
|
ref: root.ref,
|
|
@@ -53,7 +67,7 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
53
67
|
boundaryId: root.boundTag.tag,
|
|
54
68
|
enabled: root.shouldRenderHandoffHost,
|
|
55
69
|
screenKey: root.currentScreenKey,
|
|
56
|
-
children: children
|
|
70
|
+
children: targetResolution.children
|
|
57
71
|
})
|
|
58
72
|
})
|
|
59
73
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","memo","Animated","BoundaryContentPortalHost","BoundaryPortal","BoundaryRootProvider","jsx","_jsx","createBoundaryComponent","Wrapped","options","alreadyAnimated","AnimatedComponent","createAnimatedComponent","Inner","props","forwardedRef","enabled","group","id","anchor","scaleMode","target","method","style","handoff","escapeClipping","children","rest","config","root","boundaryId","boundTag","tag","shouldRenderBoundaryRootThroughPortal","placeholderRef","
|
|
1
|
+
{"version":3,"names":["cloneElement","forwardRef","memo","useMemo","Animated","BOUNDARY_TARGET_ACTIVE_PROP","BoundaryTarget","BoundaryContentPortalHost","BoundaryPortal","BoundaryRootProvider","resolveBoundaryTarget","jsx","_jsx","createBoundaryComponent","Wrapped","options","alreadyAnimated","AnimatedComponent","createAnimatedComponent","Inner","props","forwardedRef","enabled","group","id","anchor","scaleMode","target","method","style","handoff","escapeClipping","children","rest","targetResolution","isTarget","element","type","mapTarget","selected","targetStyle","config","hasTarget","targetCount","root","boundaryId","boundTag","tag","shouldRenderBoundaryRootThroughPortal","placeholderRef","measurementRef","ref","attachedStyle","collapsable","shouldRenderHandoffHost","screenKey","currentScreenKey"],"sourceRoot":"../../../../src","sources":["components/boundary/create-bound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Reaction } from "react-native-reanimated";
|
|
|
4
4
|
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
5
5
|
import { AnimationStore } from "../../../../stores/animation.store";
|
|
6
6
|
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
7
|
+
import { GestureStore } from "../../../../stores/gesture.store";
|
|
7
8
|
import { getRefreshBoundarySignal } from "../../utils/refresh-signals";
|
|
8
9
|
export const useRefreshBoundary = ({
|
|
9
10
|
enabled,
|
|
@@ -27,6 +28,9 @@ export const useRefreshBoundary = ({
|
|
|
27
28
|
const refreshEntering = AnimationStore.getValue(refreshScreenKey, "entering");
|
|
28
29
|
const refreshAnimating = AnimationStore.getValue(refreshScreenKey, "progressAnimating");
|
|
29
30
|
const refreshProgress = AnimationStore.getValue(refreshScreenKey, "transitionProgress");
|
|
31
|
+
const refreshDragging = GestureStore.getValue(refreshScreenKey, "dragging");
|
|
32
|
+
const refreshDismissing = GestureStore.getValue(refreshScreenKey, "dismissing");
|
|
33
|
+
const refreshSettling = GestureStore.getValue(refreshScreenKey, "settling");
|
|
30
34
|
useAnimatedReaction(() => {
|
|
31
35
|
"worklet";
|
|
32
36
|
|
|
@@ -44,6 +48,7 @@ export const useRefreshBoundary = ({
|
|
|
44
48
|
entering: !!refreshEntering.get(),
|
|
45
49
|
animating: !!refreshAnimating.get(),
|
|
46
50
|
progress: refreshProgress.get(),
|
|
51
|
+
gestureInProgress: !!refreshDragging.get() || !!refreshDismissing.get() || !!refreshSettling.get(),
|
|
47
52
|
linkState: pairs.get()
|
|
48
53
|
});
|
|
49
54
|
}, (refreshSignal, prevRefreshSignal) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedReaction","useDescriptorsStore","AnimationStore","pairs","getRefreshBoundarySignal","useRefreshBoundary","enabled","boundTag","measureBoundary","linkKey","group","currentScreenKey","s","derivations","nextScreenKey","sourcePairKey","destinationPairKey","ancestorDestinationPairKey","refreshScreenKey","refreshWillAnimate","getValue","refreshClosing","refreshEntering","refreshAnimating","refreshProgress","linkId","shouldRefresh","get","closing","entering","animating","progress","linkState","refreshSignal","prevRefreshSignal","signal","type","pairKey"],"sourceRoot":"../../../../../../src","sources":["components/boundary/hooks/lifecycles/use-refresh-boundary.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,mBAAmB,QAAQ,0CAA0C;AAC9E,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,KAAK,QAAQ,2CAA2C;
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","useDescriptorsStore","AnimationStore","pairs","GestureStore","getRefreshBoundarySignal","useRefreshBoundary","enabled","boundTag","measureBoundary","linkKey","group","currentScreenKey","s","derivations","nextScreenKey","sourcePairKey","destinationPairKey","ancestorDestinationPairKey","refreshScreenKey","refreshWillAnimate","getValue","refreshClosing","refreshEntering","refreshAnimating","refreshProgress","refreshDragging","refreshDismissing","refreshSettling","linkId","shouldRefresh","get","closing","entering","animating","progress","gestureInProgress","linkState","refreshSignal","prevRefreshSignal","signal","type","pairKey"],"sourceRoot":"../../../../../../src","sources":["components/boundary/hooks/lifecycles/use-refresh-boundary.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,mBAAmB,QAAQ,0CAA0C;AAC9E,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,KAAK,QAAQ,2CAA2C;AAEjE,SAASC,YAAY,QAAQ,kCAAkC;AAE/D,SAASC,wBAAwB,QAAQ,6BAA6B;AAQtE,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC,OAAO;EACPC,QAAQ;EACRC;AACyB,CAAC,KAAK;EAC/B,MAAM;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGH,QAAQ;EACnC,MAAMI,gBAAgB,GAAGX,mBAAmB,CAC1CY,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,gBACtB,CAAC;EACD,MAAMG,aAAa,GAAGd,mBAAm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