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
|
@@ -4,221 +4,80 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useBoundaryContentPortalAttachment = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
-
var _reactNativeWorklets = require("react-native-worklets");
|
|
10
8
|
var _descriptors = require("../../../../../../providers/screen/descriptors");
|
|
11
9
|
var _styles = require("../../../../../../providers/screen/styles");
|
|
12
|
-
var
|
|
10
|
+
var _transitionVisualState = require("../../../../../../providers/screen/styles/helpers/transition-visual-state");
|
|
13
11
|
var _animation = require("../../../../../../stores/animation.store");
|
|
14
|
-
var _linkPairs = require("../../../../../../stores/bounds/helpers/link-pairs.helpers");
|
|
15
12
|
var _state = require("../../../../../../stores/bounds/internals/state");
|
|
13
|
+
var _system = require("../../../../../../stores/system.store");
|
|
14
|
+
var _handoffTarget = require("../../../utils/handoff-target");
|
|
16
15
|
var _naming = require("../../../utils/naming");
|
|
17
|
-
var _ownership = require("../../../utils/ownership");
|
|
18
|
-
var _shallowEqual = require("../../../utils/shallow-equal");
|
|
19
16
|
var _teleportControl = require("../../../utils/teleport-control");
|
|
20
|
-
var _visibleHost = require("../../../utils/visible-host");
|
|
21
17
|
var _hostName = require("../helpers/host-name");
|
|
22
18
|
const useBoundaryContentPortalAttachment = ({
|
|
23
|
-
boundaryId
|
|
24
|
-
enabled
|
|
19
|
+
boundaryId
|
|
25
20
|
}) => {
|
|
26
|
-
const
|
|
21
|
+
const {
|
|
22
|
+
slotsMap
|
|
23
|
+
} = (0, _styles.useScreenSlots)();
|
|
27
24
|
const sourcePairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.sourcePairKey);
|
|
28
25
|
const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const {
|
|
34
|
-
nextInterpolatorReady: activeNextInterpolatorReady,
|
|
35
|
-
slotsMap: activeSlotsMap
|
|
36
|
-
} = activeScreenSlots;
|
|
37
|
-
const requestedPortalHostName = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
38
|
-
const visiblePortalHostName = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
39
|
-
const canSwitchPortalHostImmediately = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
40
|
-
const targetScreenKey = ownership ? ownership.hostScreenKey : null;
|
|
41
|
-
const settledHostScreenKey = ownership?.hostScreenKey ?? null;
|
|
42
|
-
const settledHostProgress = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "progressSettled");
|
|
43
|
-
const settledHostAnimating = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "progressAnimating");
|
|
44
|
-
const settledHostWillAnimate = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "willAnimate");
|
|
45
|
-
const settledHostClosing = _animation.AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "closing");
|
|
46
|
-
const handoffHostName = targetScreenKey !== null ? (0, _hostName.createBoundaryContentPortalHostName)(targetScreenKey, boundaryId) : null;
|
|
47
|
-
const updatePortalOwnership = (0, _react.useCallback)((hostScreenKey, ownerPairKey, ownerScreenKey) => {
|
|
48
|
-
if (hostScreenKey && ownerPairKey && ownerScreenKey) {
|
|
49
|
-
setOwnership(current => {
|
|
50
|
-
if (current?.hostScreenKey === hostScreenKey && current.ownerPairKey === ownerPairKey && current.ownerScreenKey === ownerScreenKey) {
|
|
51
|
-
return current;
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
hostScreenKey,
|
|
55
|
-
ownerPairKey,
|
|
56
|
-
ownerScreenKey,
|
|
57
|
-
status: "complete"
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
setOwnership(current => current ? null : current);
|
|
63
|
-
}, []);
|
|
64
|
-
(0, _react.useLayoutEffect)(() => {
|
|
65
|
-
if (!enabled || !ownership || !handoffHostName) {
|
|
66
|
-
requestedPortalHostName.set(null);
|
|
67
|
-
visiblePortalHostName.set(null);
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
requestedPortalHostName.set(handoffHostName);
|
|
71
|
-
}, [enabled, handoffHostName, ownership, requestedPortalHostName, visiblePortalHostName]);
|
|
72
|
-
(0, _react.useLayoutEffect)(() => {
|
|
73
|
-
return () => {
|
|
74
|
-
requestedPortalHostName.set(null);
|
|
75
|
-
visiblePortalHostName.set(null);
|
|
76
|
-
};
|
|
77
|
-
}, [requestedPortalHostName, visiblePortalHostName]);
|
|
78
|
-
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
79
|
-
"worklet";
|
|
26
|
+
const nextScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.nextScreenKey);
|
|
27
|
+
const destinationScreenKey = nextScreenKey ?? currentScreenKey;
|
|
28
|
+
const destinationAnimationProgress = _system.SystemStore.getValue(destinationScreenKey, "animationProgress");
|
|
29
|
+
const destinationClosing = _animation.AnimationStore.getValue(destinationScreenKey, "closing");
|
|
80
30
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
ownerScreenKey: null,
|
|
86
|
-
status: "clear"
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
const progressAnimating = settledHostAnimating.get();
|
|
90
|
-
const progressSettled = settledHostProgress.get();
|
|
91
|
-
const willAnimate = settledHostWillAnimate.get();
|
|
92
|
-
const closing = settledHostClosing.get();
|
|
93
|
-
const isOwnedHostClosing = !!closing && !!ownership && settledHostScreenKey === ownership.hostScreenKey;
|
|
94
|
-
if (isOwnedHostClosing && ownership) {
|
|
95
|
-
const isClosingComplete = (0, _ownership.isHandoffHostClosingComplete)({
|
|
96
|
-
closing,
|
|
97
|
-
progressAnimating,
|
|
98
|
-
progressSettled,
|
|
99
|
-
willAnimate
|
|
100
|
-
});
|
|
101
|
-
if (!isClosingComplete) {
|
|
102
|
-
return ownership;
|
|
103
|
-
}
|
|
104
|
-
const sourceScreenKey = (0, _linkPairs.getSourceScreenKeyFromPairKey)(ownership.ownerPairKey);
|
|
105
|
-
return {
|
|
106
|
-
hostScreenKey: sourceScreenKey,
|
|
107
|
-
ownerPairKey: ownership.ownerPairKey,
|
|
108
|
-
ownerScreenKey: sourceScreenKey,
|
|
109
|
-
status: "complete"
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
if (!sourcePairKey) {
|
|
113
|
-
return {
|
|
114
|
-
hostScreenKey: null,
|
|
115
|
-
ownerPairKey: sourcePairKey,
|
|
116
|
-
ownerScreenKey: null,
|
|
117
|
-
status: "clear"
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
return (0, _ownership.resolveBoundaryPortalOwnership)({
|
|
121
|
-
boundaryId,
|
|
122
|
-
currentScreenKey,
|
|
123
|
-
handoff: true,
|
|
124
|
-
isSettledHostClosingComplete: (0, _ownership.isHandoffHostClosingComplete)({
|
|
125
|
-
closing,
|
|
126
|
-
progressAnimating,
|
|
127
|
-
progressSettled,
|
|
128
|
-
willAnimate
|
|
129
|
-
}),
|
|
130
|
-
isSettledHostReady: progressSettled === 1 && progressAnimating === 0,
|
|
131
|
-
pairsState: _state.pairs.get(),
|
|
132
|
-
settledHostScreenKey,
|
|
133
|
-
sourcePairKey
|
|
134
|
-
});
|
|
135
|
-
}, (signal, previousSignal) => {
|
|
136
|
-
"worklet";
|
|
137
|
-
|
|
138
|
-
if ((0, _shallowEqual.shallowEqual)(previousSignal, signal)) {
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
if (signal.status === "pending") {
|
|
142
|
-
canSwitchPortalHostImmediately.set(0);
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
const hostScreenKey = signal.status === "complete" ? signal.hostScreenKey : null;
|
|
146
|
-
let previousOwnerPairKey;
|
|
147
|
-
if (previousSignal?.status === "complete") {
|
|
148
|
-
previousOwnerPairKey = previousSignal.ownerPairKey ?? undefined;
|
|
149
|
-
}
|
|
150
|
-
const canSwitchImmediately = (0, _ownership.canSwitchHandoffHostImmediately)({
|
|
151
|
-
hostScreenKey,
|
|
152
|
-
ownerPairKey: signal.status === "complete" ? signal.ownerPairKey : undefined,
|
|
153
|
-
previousOwnerPairKey
|
|
154
|
-
});
|
|
155
|
-
canSwitchPortalHostImmediately.set(canSwitchImmediately ? 1 : 0);
|
|
156
|
-
if (canSwitchImmediately && hostScreenKey) {
|
|
157
|
-
const hostName = (0, _hostName.createBoundaryContentPortalHostName)(hostScreenKey, boundaryId);
|
|
158
|
-
requestedPortalHostName.set(hostName);
|
|
159
|
-
visiblePortalHostName.set(hostName);
|
|
160
|
-
}
|
|
161
|
-
(0, _reactNativeWorklets.scheduleOnRN)(updatePortalOwnership, signal.hostScreenKey, signal.ownerPairKey, signal.ownerScreenKey ?? undefined);
|
|
162
|
-
});
|
|
163
|
-
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
164
|
-
"worklet";
|
|
165
|
-
|
|
166
|
-
const slot = activeSlotsMap.get()[boundaryId];
|
|
167
|
-
const teleport = slot?.props?.teleport;
|
|
168
|
-
const shouldTeleport = (0, _teleportControl.shouldAttachBoundaryPortal)({
|
|
169
|
-
enabled,
|
|
170
|
-
teleport
|
|
171
|
-
});
|
|
172
|
-
const requestedName = requestedPortalHostName.get();
|
|
173
|
-
const visibleName = visiblePortalHostName.get();
|
|
174
|
-
const isInterpolatorReady = activeNextInterpolatorReady.get();
|
|
175
|
-
const nextVisibleName = (0, _visibleHost.resolveNextVisiblePortalHostName)({
|
|
176
|
-
canSwitchImmediately: canSwitchPortalHostImmediately.get() === 1,
|
|
177
|
-
isInterpolatorReady: isInterpolatorReady === 1,
|
|
178
|
-
requestedName,
|
|
179
|
-
shouldTeleport,
|
|
180
|
-
visibleName
|
|
181
|
-
});
|
|
182
|
-
return {
|
|
183
|
-
isInterpolatorReady,
|
|
184
|
-
nextVisibleName,
|
|
185
|
-
requestedName,
|
|
186
|
-
shouldTeleport,
|
|
187
|
-
teleport,
|
|
188
|
-
visibleName
|
|
189
|
-
};
|
|
190
|
-
}, (state, previousState) => {
|
|
191
|
-
"worklet";
|
|
192
|
-
|
|
193
|
-
if ((0, _shallowEqual.shallowEqual)(previousState, state)) {
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
if (state.nextVisibleName !== state.visibleName) {
|
|
197
|
-
visiblePortalHostName.set(state.nextVisibleName);
|
|
198
|
-
}
|
|
199
|
-
});
|
|
31
|
+
// `nextScreenKey` can change while the previously attached destination is
|
|
32
|
+
// still closing. Retain that destination's lifecycle shared values so this
|
|
33
|
+
// payload follows the screen that actually hosts it, not the newest route.
|
|
34
|
+
const attachedDestination = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
200
35
|
const teleportProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
|
|
201
36
|
"worklet";
|
|
202
37
|
|
|
203
|
-
const slot =
|
|
38
|
+
const slot = slotsMap.get()[boundaryId];
|
|
204
39
|
const {
|
|
205
40
|
pointerEvents: _pointerEvents,
|
|
206
41
|
teleport,
|
|
207
42
|
...slotProps
|
|
208
43
|
} = slot?.props ?? {};
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
|
|
44
|
+
const animationProgress = destinationAnimationProgress.get();
|
|
45
|
+
const shouldTeleport = (0, _teleportControl.isTeleportEnabled)(teleport);
|
|
46
|
+
const pairsState = _state.pairs.get();
|
|
47
|
+
const enteringTargetScreenKey = shouldTeleport ? (0, _handoffTarget.resolveEnteringHandoffTarget)({
|
|
48
|
+
animationProgress,
|
|
49
|
+
boundaryId,
|
|
50
|
+
currentScreenKey,
|
|
51
|
+
pairsState,
|
|
52
|
+
sourcePairKey
|
|
53
|
+
}) : null;
|
|
54
|
+
if (enteringTargetScreenKey) {
|
|
55
|
+
// A valid entering pair is the only event that replaces the current
|
|
56
|
+
// attachment and its lifecycle owner.
|
|
57
|
+
attachedDestination.set({
|
|
58
|
+
animationProgress: destinationAnimationProgress,
|
|
59
|
+
closing: destinationClosing,
|
|
60
|
+
screenKey: enteringTargetScreenKey
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
const attached = attachedDestination.get();
|
|
64
|
+
const hasAttachedCloseFinished = attached !== null && (0, _transitionVisualState.hasCloseTransitionFinished)({
|
|
65
|
+
animationProgress: attached.animationProgress.get(),
|
|
66
|
+
closing: attached.closing.get()
|
|
212
67
|
});
|
|
213
|
-
|
|
68
|
+
|
|
69
|
+
// Missing or changing pairs do not imply a return: keep the current host
|
|
70
|
+
// until its own screen visually closes. At that point, target the source
|
|
71
|
+
// host explicitly instead of `null` so Teleport restores source dimensions.
|
|
72
|
+
const targetScreenKey = enteringTargetScreenKey ? enteringTargetScreenKey : shouldTeleport ? hasAttachedCloseFinished ? currentScreenKey : attached?.screenKey ?? null : null;
|
|
73
|
+
const targetHostName = targetScreenKey ? (0, _hostName.createBoundaryContentPortalHostName)(targetScreenKey, boundaryId) : _naming.PORTAL_HOST_NAME_RESET_VALUE;
|
|
214
74
|
return {
|
|
215
75
|
...slotProps,
|
|
216
|
-
hostName:
|
|
76
|
+
hostName: targetHostName
|
|
217
77
|
};
|
|
218
78
|
});
|
|
219
79
|
return {
|
|
220
|
-
teleportProps
|
|
221
|
-
visiblePortalHostName
|
|
80
|
+
teleportProps
|
|
222
81
|
};
|
|
223
82
|
};
|
|
224
83
|
exports.useBoundaryContentPortalAttachment = useBoundaryContentPortalAttachment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_descriptors","_styles","_transitionVisualState","_animation","_state","_system","_handoffTarget","_naming","_teleportControl","_hostName","useBoundaryContentPortalAttachment","boundaryId","slotsMap","useScreenSlots","sourcePairKey","useDescriptorsStore","s","derivations","currentScreenKey","nextScreenKey","destinationScreenKey","destinationAnimationProgress","SystemStore","getValue","destinationClosing","AnimationStore","attachedDestination","useSharedValue","teleportProps","useAnimatedProps","slot","get","pointerEvents","_pointerEvents","teleport","slotProps","props","animationProgress","shouldTeleport","isTeleportEnabled","pairsState","pairs","enteringTargetScreenKey","resolveEnteringHandoffTarget","set","closing","screenKey","attached","hasAttachedCloseFinished","hasCloseTransitionFinished","targetScreenKey","targetHostName","createBoundaryContentPortalHostName","PORTAL_HOST_NAME_RESET_VALUE","hostName","exports"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,cAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,gBAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AAYO,MAAMW,kCAAkC,GAAGA,CAAC;EAClDC;AACyC,CAAC,KAAK;EAC/C,MAAM;IAAEC;EAAS,CAAC,GAAG,IAAAC,sBAAc,EAAC,CAAC;EACrC,MAAMC,aAAa,GAAG,IAAAC,gCAAmB,EAAEC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACH,aAAa,CAAC;EAC7E,MAAMI,gBAAgB,GAAG,IAAAH,gCAAmB,EAC1CC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,gBACtB,CAAC;EACD,MAAMC,aAAa,GAAG,IAAAJ,gCAAmB,EAAEC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACE,aAAa,CAAC;EAC7E,MAAMC,oBAAoB,GAAGD,aAAa,IAAID,gBAAgB;EAC9D,MAAMG,4BAA4B,GAAGC,mBAAW,CAACC,QAAQ,CACxDH,oBAAoB,EACpB,mBACD,CAAC;EACD,MAAMI,kBAAkB,GAAGC,yBAAc,CAACF,QAAQ,CACjDH,oBAAoB,EACpB,SACD,CAAC;;EAED;EACA;EACA;EACA,MAAMM,mBAAmB,GAAG,IAAAC,qCAAc,EAA6B,IAAI,CAAC;EAE5E,MAAMC,aAAa,GAAG,IAAAC,uCAAgB,EAAC,MAAM;IAC5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AAAE,6CAAmC,EAACF,eAAe,EAAEvC,UAAU,CAAC,GAChE0C,oCAA4B;IAE/B,OAAO;MACN,GAAGlB,SAAS;MACZmB,QAAQ,EAAEH;IACX,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IAAEvB;EAAc,CAAC;AACzB,CAAC;AAAC2B,OAAA,CAAA7C,kCAAA,GAAAA,kCAAA","ignoreList":[]}
|
|
@@ -19,27 +19,35 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
19
19
|
var _host = require("./components/host");
|
|
20
20
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
21
|
const AnimatedNativePortal = _teleport.NativePortal ? _reactNativeReanimated.default.createAnimatedComponent(_teleport.NativePortal) : null;
|
|
22
|
+
const EnabledNativePortal = AnimatedNativePortal;
|
|
22
23
|
const BoundaryContentPortal = exports.BoundaryContentPortal = /*#__PURE__*/(0, _react.memo)(function BoundaryContentPortal({
|
|
23
24
|
boundaryId,
|
|
24
25
|
children,
|
|
25
26
|
enabled
|
|
26
27
|
}) {
|
|
27
|
-
|
|
28
|
+
if (!enabled || boundaryId === undefined || !_teleport.isTeleportAvailable || !AnimatedNativePortal) {
|
|
29
|
+
return children;
|
|
30
|
+
}
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(EnabledBoundaryContentPortal, {
|
|
32
|
+
boundaryId: boundaryId,
|
|
33
|
+
children: children
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
const EnabledBoundaryContentPortal = /*#__PURE__*/(0, _react.memo)(function EnabledBoundaryContentPortal({
|
|
37
|
+
boundaryId,
|
|
38
|
+
children
|
|
39
|
+
}) {
|
|
28
40
|
const {
|
|
29
41
|
teleportProps
|
|
30
42
|
} = (0, _useBoundaryContentPortalAttachment.useBoundaryContentPortalAttachment)({
|
|
31
|
-
boundaryId
|
|
32
|
-
|
|
43
|
+
boundaryId
|
|
44
|
+
});
|
|
45
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(EnabledNativePortal, {
|
|
46
|
+
animatedProps: teleportProps,
|
|
47
|
+
name: boundaryId,
|
|
48
|
+
pointerEvents: _teleport.PORTAL_POINTER_EVENTS,
|
|
49
|
+
style: _reactNative.StyleSheet.absoluteFill,
|
|
50
|
+
children: children
|
|
33
51
|
});
|
|
34
|
-
if (shouldEnablePortal && _teleport.isTeleportAvailable && AnimatedNativePortal) {
|
|
35
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedNativePortal, {
|
|
36
|
-
animatedProps: teleportProps,
|
|
37
|
-
name: boundaryId,
|
|
38
|
-
pointerEvents: _teleport.PORTAL_POINTER_EVENTS,
|
|
39
|
-
style: _reactNative.StyleSheet.absoluteFill,
|
|
40
|
-
children: children
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
return children;
|
|
44
52
|
});
|
|
45
53
|
//# sourceMappingURL=index.js.map
|
package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_teleport","_useBoundaryContentPortalAttachment","_jsxRuntime","_host","e","__esModule","default","AnimatedNativePortal","NativePortal","Animated","createAnimatedComponent","BoundaryContentPortal","exports","memo","boundaryId","children","enabled","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_teleport","_useBoundaryContentPortalAttachment","_jsxRuntime","_host","e","__esModule","default","AnimatedNativePortal","NativePortal","Animated","createAnimatedComponent","EnabledNativePortal","BoundaryContentPortal","exports","memo","boundaryId","children","enabled","undefined","isTeleportAvailable","jsx","EnabledBoundaryContentPortal","teleportProps","useBoundaryContentPortalAttachment","animatedProps","name","pointerEvents","PORTAL_POINTER_EVENTS","style","StyleSheet","absoluteFill"],"sourceRoot":"../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/index.tsx"],"mappings":";;;;;;;;;;;;AA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KAAK,EAAEC,uBAAU,CAACC,YAAa;IAAAd,QAAA,EAE9BA;EAAQ,CACW,CAAC;AAExB,CACD,CAAC","ignoreList":[]}
|
package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/host.js
CHANGED
|
@@ -9,7 +9,6 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
|
|
10
10
|
var _descriptors = require("../../../../../../providers/screen/descriptors");
|
|
11
11
|
var _styles = require("../../../../../../providers/screen/styles");
|
|
12
|
-
var _system = require("../../../../../../stores/system.store");
|
|
13
12
|
var _teleport = require("../../../teleport");
|
|
14
13
|
var _useHostMeasurement = require("../hooks/use-host-measurement");
|
|
15
14
|
var _hostRegistry = require("../stores/host-registry.store");
|
|
@@ -23,9 +22,6 @@ function HostImpl({
|
|
|
23
22
|
style
|
|
24
23
|
}) {
|
|
25
24
|
const screenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
|
|
26
|
-
const {
|
|
27
|
-
unblockLifecycleStart
|
|
28
|
-
} = _system.SystemStore.getBag(screenKey).actions;
|
|
29
25
|
const generatedHostKeyRef = (0, _react.useRef)(null);
|
|
30
26
|
if (generatedHostKeyRef.current === null) {
|
|
31
27
|
generatedHostKeyRef.current = `${screenKey}-host-${nextHostId++}`;
|
|
@@ -51,7 +47,6 @@ function HostImpl({
|
|
|
51
47
|
});
|
|
52
48
|
(0, _react.useLayoutEffect)(() => {
|
|
53
49
|
(0, _hostRegistry.registerHost)({
|
|
54
|
-
capturesScroll,
|
|
55
50
|
fallback,
|
|
56
51
|
hostKey,
|
|
57
52
|
screenKey
|
|
@@ -59,19 +54,13 @@ function HostImpl({
|
|
|
59
54
|
return () => {
|
|
60
55
|
(0, _hostRegistry.unregisterHost)(screenKey, hostKey);
|
|
61
56
|
};
|
|
62
|
-
}, [
|
|
63
|
-
const handleUnblocking = (0, _react.useCallback)(() => {
|
|
64
|
-
// Each destination boundary contributes one lifecycle start block. Release
|
|
65
|
-
// only this host's block so unrelated boundary and user blocks stay intact.
|
|
66
|
-
unblockLifecycleStart();
|
|
67
|
-
}, [unblockLifecycleStart]);
|
|
57
|
+
}, [fallback, hostKey, screenKey]);
|
|
68
58
|
const boundaryHosts = measurement.canRenderHosts ? activeBoundaryHosts.map(host => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
69
59
|
pointerEvents: _teleport.PORTAL_POINTER_EVENTS,
|
|
70
60
|
style: [styles.boundaryHostViewport, {
|
|
71
61
|
width: viewportWidth,
|
|
72
62
|
height: viewportHeight
|
|
73
63
|
}],
|
|
74
|
-
onLayout: handleUnblocking,
|
|
75
64
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_portalBoundaryHost2.PortalBoundaryHost, {
|
|
76
65
|
host: host,
|
|
77
66
|
style: _reactNative.StyleSheet.absoluteFill
|
package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/host.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_descriptors","_styles","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_descriptors","_styles","_teleport","_useHostMeasurement","_hostRegistry","_portalBoundaryHost","_portalBoundaryHost2","_jsxRuntime","e","__esModule","default","nextHostId","HostImpl","fallback","style","screenKey","useDescriptorsStore","s","derivations","currentScreenKey","generatedHostKeyRef","useRef","current","hostKey","capturesScroll","activeBoundaryHosts","useActivePortalBoundaryHosts","visibilityBlocked","useScreenSlots","height","viewportHeight","width","viewportWidth","useWindowDimensions","measurement","useHostMeasurement","enabled","length","useLayoutEffect","registerHost","unregisterHost","boundaryHosts","canRenderHosts","map","host","jsx","View","pointerEvents","PORTAL_POINTER_EVENTS","styles","boundaryHostViewport","children","PortalBoundaryHost","StyleSheet","absoluteFill","portalHostName","ref","hostRef","collapsable","Host","exports","memo","props","ScreenFallbackHost","create","elevation","left","overflow","position","top","zIndex"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/components/host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,sBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AACA,IAAAU,oBAAA,GAAAV,OAAA;AAA4D,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAG,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE5D,IAAIG,UAAU,GAAG,CAAC;AAUlB,SAASC,QAAQA,CAAC;EAAEC,QAAQ,GAAG,KAAK;EAAEC;AAAqB,CAAC,EAAE;EAC7D,MAAMC,SAAS,GAAG,IAAAC,gCAAmB,EAAEC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,gBAAgB,CAAC;EAC5E,MAAMC,mBAAmB,GAAG,IAAAC,aAAM,EAAgB,IAAI,CAAC;EAEvD,IAAID,mBAAmB,CAACE,OAAO,KAAK,IAAI,EAAE;IACzCF,mBAAmB,CAACE,OAAO,GAAG,GAAGP,SAAS,SAASJ,UAAU,EAAE,EAAE;EAClE;EAEA,MAAMY,OAAO,GAAGV,QAAQ,GAAGE,SAAS,GAAGK,mBAAmB,CAACE,OAAO;EAClE,MAAME,cAAc,GAAG,CAACX,QAAQ;EAChC,MAAMY,mBAAmB,GAAG,IAAAC,gDAA4B,EAACH,OAAO,CAAC;EACjE,MAAM;IAAEI;EAAkB,CAAC,GAAG,IAAAC,sBAAc,EAAC,CAAC;EAC9C,MAAM;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ACNmC,MAAM,CAACL,IAAI,EACX;MAAEb,KAAK,EAAEC,aAAa;MAAEH,MAAM,EAAEC;IAAe,CAAC,EAChDhB,KAAK,CACJ;IACF4C,WAAW,EAAE,KAAM;IAAAP,QAAA,EAElBV;EAAa,CACA,CAAC;AAElB;AAEO,MAAMkB,IAAI,GAAAC,OAAA,CAAAD,IAAA,gBAAG,IAAAE,WAAI,EAAC,SAASF,IAAIA,CAACG,KAAsB,EAAE;EAC9D,oBAAO,IAAAvD,WAAA,CAAAsC,GAAA,EAACjC,QAAQ;IAAA,GAAKkD;EAAK,CAAG,CAAC;AAC/B,CAAC,CAAC;AAEK,MAAMC,kBAAkB,GAAAH,OAAA,CAAAG,kBAAA,gBAAG,IAAAF,WAAI,EAAC,SAASE,kBAAkBA,CAAA,EAAG;EACpE,oBAAO,IAAAxD,WAAA,CAAAsC,GAAA,EAACjC,QAAQ;IAACC,QAAQ;EAAA,CAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAMoC,MAAM,GAAGI,uBAAU,CAACW,MAAM,CAAC;EAChCpB,IAAI,EAAE;IACLqB,SAAS,EAAE,MAAM;IACjBC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE;EACT,CAAC;EACDpB,oBAAoB,EAAE;IACrBgB,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -9,13 +9,12 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
10
|
var _constants = require("../../../../../../constants");
|
|
11
11
|
var _composeSlotStyle = require("../../../../../../providers/screen/styles/helpers/compose-slot-style");
|
|
12
|
-
var _animation = require("../../../../../../stores/animation.store");
|
|
13
|
-
var _linkPairs = require("../../../../../../stores/bounds/helpers/link-pairs.helpers");
|
|
14
12
|
var _links = require("../../../../../../stores/bounds/internals/links");
|
|
15
|
-
var
|
|
13
|
+
var _system = require("../../../../../../stores/system.store");
|
|
16
14
|
var _teleport = require("../../../teleport");
|
|
17
15
|
var _hasLocalSlot = require("../helpers/has-local-slot");
|
|
18
16
|
var _offsetStyle = require("../helpers/offset-style");
|
|
17
|
+
var _hostBounds = require("../stores/host-bounds.store");
|
|
19
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
21
20
|
const AnimatedPortalBoundaryHost = _teleport.NativePortalHost ? _reactNativeReanimated.default.createAnimatedComponent(_teleport.NativePortalHost) : null;
|
|
@@ -23,13 +22,32 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
|
|
|
23
22
|
host,
|
|
24
23
|
style
|
|
25
24
|
}) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
const geometryReadyFrames = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
26
|
+
const {
|
|
27
|
+
unblockLifecycleStart
|
|
28
|
+
} = _system.SystemStore.getBag(host.screenKey).actions;
|
|
29
|
+
const handleFrame = (0, _react.useCallback)(() => {
|
|
30
|
+
"worklet";
|
|
31
|
+
|
|
32
|
+
if (host.portalHostReady.get()) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const link = (0, _links.getLink)(host.pairKey, host.boundaryId);
|
|
36
|
+
const hasGeometry = link?.source !== null && link !== undefined && (0, _hostBounds.getPortalHostBounds)(host.hostKey) !== null && (0, _hasLocalSlot.hasLocalSlot)(host.localStylesMaps.get(), host.boundaryId);
|
|
37
|
+
if (!hasGeometry) {
|
|
38
|
+
geometryReadyFrames.set(0);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (geometryReadyFrames.get() === 0) {
|
|
42
|
+
// Give the source frame, host offset, and slot style one UI frame to
|
|
43
|
+
// reach native before Teleport targets this receiver.
|
|
44
|
+
geometryReadyFrames.set(1);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
host.portalHostReady.set(true);
|
|
48
|
+
unblockLifecycleStart();
|
|
49
|
+
}, [geometryReadyFrames, host, unblockLifecycleStart]);
|
|
50
|
+
(0, _reactNativeReanimated.useFrameCallback)(handleFrame, true);
|
|
33
51
|
const hostStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
34
52
|
"worklet";
|
|
35
53
|
|
|
@@ -41,30 +59,10 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
|
|
|
41
59
|
}
|
|
42
60
|
const sourceBounds = link.source.bounds;
|
|
43
61
|
const isCrossScreenPortal = link.source.screenKey !== host.screenKey;
|
|
44
|
-
let landingShift;
|
|
45
|
-
if (isCrossScreenPortal) {
|
|
46
|
-
// Weight by distance-to-landing so the destination end of the flight
|
|
47
|
-
// stays pinned: no correction while the content sits over the
|
|
48
|
-
// destination rect (progress 1), full correction at touchdown on the
|
|
49
|
-
// source rect (progress 0).
|
|
50
|
-
const landingWeight = 1 - Math.min(Math.max(hostVisualProgress.get(), 0), 1);
|
|
51
|
-
if (landingWeight > 0) {
|
|
52
|
-
const liveScroll = sourceScrollMetadata.get();
|
|
53
|
-
const capturedScroll = sourceBounds.scroll ?? null;
|
|
54
|
-
|
|
55
|
-
// Scroll offset grows as content moves up/left, so the rect's
|
|
56
|
-
// on-screen position shifts by the negative delta.
|
|
57
|
-
landingShift = {
|
|
58
|
-
x: -(0, _scroll.getClampedScrollAxisDelta)(liveScroll, capturedScroll, "horizontal") * landingWeight,
|
|
59
|
-
y: -(0, _scroll.getClampedScrollAxisDelta)(liveScroll, capturedScroll, "vertical") * landingWeight
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
62
|
return (0, _offsetStyle.resolvePortalOffsetStyle)({
|
|
64
63
|
bounds: sourceBounds,
|
|
65
64
|
hostKey: host.hostKey,
|
|
66
|
-
placement: isCrossScreenPortal ? "cross-screen" : "same-screen"
|
|
67
|
-
landingShift
|
|
65
|
+
placement: isCrossScreenPortal ? "cross-screen" : "same-screen"
|
|
68
66
|
});
|
|
69
67
|
});
|
|
70
68
|
const contentFrameStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
@@ -93,7 +91,7 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
|
|
|
93
91
|
// cleanup frame. If the current local interpolator layers did not emit this
|
|
94
92
|
// boundary id, any resolved style here is cleanup/stale residue and should
|
|
95
93
|
// not be drawn by the host.
|
|
96
|
-
if (
|
|
94
|
+
if (!(0, _hasLocalSlot.hasLocalSlot)(host.localStylesMaps.get(), host.boundaryId)) {
|
|
97
95
|
return _constants.NO_STYLES;
|
|
98
96
|
}
|
|
99
97
|
const slot = host.slotsMap.get()[host.boundaryId];
|
|
@@ -116,8 +114,17 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
|
|
|
116
114
|
})
|
|
117
115
|
});
|
|
118
116
|
});
|
|
117
|
+
|
|
118
|
+
// The teleport offset is a physical page delta measured from the screen's
|
|
119
|
+
// left edge, so the content box must anchor there too. Under native RTL,
|
|
120
|
+
// `left: 0` swaps to a right-edge anchor; `end: 0` is the physical left edge
|
|
121
|
+
// in RTL regardless of the swap setting.
|
|
119
122
|
const styles = _reactNative.StyleSheet.create({
|
|
120
|
-
content: {
|
|
123
|
+
content: _reactNative.I18nManager.isRTL ? {
|
|
124
|
+
end: 0,
|
|
125
|
+
position: "absolute",
|
|
126
|
+
top: 0
|
|
127
|
+
} : {
|
|
121
128
|
left: 0,
|
|
122
129
|
position: "absolute",
|
|
123
130
|
top: 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_constants","_composeSlotStyle","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_constants","_composeSlotStyle","_links","_system","_teleport","_hasLocalSlot","_offsetStyle","_hostBounds","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedPortalBoundaryHost","NativePortalHost","Animated","createAnimatedComponent","PortalBoundaryHost","exports","memo","host","style","geometryReadyFrames","useSharedValue","unblockLifecycleStart","SystemStore","getBag","screenKey","actions","handleFrame","useCallback","portalHostReady","link","getLink","pairKey","boundaryId","hasGeometry","source","undefined","getPortalHostBounds","hostKey","hasLocalSlot","localStylesMaps","useFrameCallback","hostStyle","useAnimatedStyle","NO_STYLES","sourceBounds","bounds","isCrossScreenPortal","resolvePortalOffsetStyle","placement","contentFrameStyle","height","width","slotStyle","slot","slotsMap","composeSlotStyleWithLocalTransform","boundsLocalTransform","jsx","View","pointerEvents","PORTAL_POINTER_EVENTS","collapsable","children","name","portalHostName","styles","content","StyleSheet","create","I18nManager","isRTL","end","position","top","left"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,O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,IAAI,CAACsB,eAAe,CAACpC,GAAG,CAAC,CAAC,EAAEc,IAAI,CAACe,UAAU,CAAC,EAAE;MAC/D,OAAOW,oBAAS;IACjB;IAEA,MAAMU,IAAI,GAAGpC,IAAI,CAACqC,QAAQ,CAACnD,GAAG,CAAC,CAAC,CAACc,IAAI,CAACe,UAAU,CAAC;IAEjD,OAAO,IAAAuB,oDAAkC,EACxCF,IAAI,EAAEnC,KAAK,IAAIyB,oBAAS,EACxBR,SAAS,EACTkB,IAAI,EAAEG,oBACP,CAAC;EACF,CAAC,CAAC;;EAEF;EACA;EACA,IAAI,CAAC9C,0BAA0B,EAAE;IAChC,OAAO,IAAI;EACZ;EAEA,oBACC,IAAApB,WAAA,CAAAmE,GAAA,EAAC7E,sBAAA,CAAAqB,OAAQ,CAACyD,IAAI;IACbC,aAAa,EAAEC,+BAAsB;IACrC1C,KAAK,EAAE,CAACA,KAAK,EAAEuB,SAAS,CAAE;IAC1BoB,WAAW,EAAE,KAAM;IAAAC,QAAA,eAEnB,IAAAxE,WAAA,CAAAmE,GAAA,EAAC/C,0BAA0B;MAC1BqD,IAAI,EAAE9C,IAAI,CAAC+C,cAAe;MAC1BL,aAAa,EAAEC,+BAAsB;MACrC1C,KAAK,EAAE,CAAC+C,MAAM,CAACC,OAAO,EAAEjB,iBAAiB,EAAEG,SAAS;IAAE,CACtD;EAAC,CACY,CAAC;AAElB,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA,MAAMa,MAAM,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAChCF,OAAO,EAAEG,wBAAW,CAACC,KAAK,GACvB;IACAC,GAAG,EAAE,CAAC;IACNC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN,CAAC,GACA;IACAC,IAAI,EAAE,CAAC;IACPF,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACH,CAAC,CAAC","ignoreList":[]}
|
package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/offset-style.js
CHANGED
|
@@ -19,8 +19,7 @@ var _hostBounds = require("../stores/host-bounds.store");
|
|
|
19
19
|
const resolvePortalOffsetStyle = ({
|
|
20
20
|
bounds,
|
|
21
21
|
hostKey,
|
|
22
|
-
placement
|
|
23
|
-
landingShift
|
|
22
|
+
placement
|
|
24
23
|
}) => {
|
|
25
24
|
"worklet";
|
|
26
25
|
|
|
@@ -41,9 +40,9 @@ const resolvePortalOffsetStyle = ({
|
|
|
41
40
|
const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY : 0;
|
|
42
41
|
return {
|
|
43
42
|
transform: [{
|
|
44
|
-
translateY: bounds.pageY - adjustedHostPageY
|
|
43
|
+
translateY: bounds.pageY - adjustedHostPageY
|
|
45
44
|
}, {
|
|
46
|
-
translateX: bounds.pageX - adjustedHostPageX
|
|
45
|
+
translateX: bounds.pageX - adjustedHostPageX
|
|
47
46
|
}]
|
|
48
47
|
};
|
|
49
48
|
};
|