react-native-screen-transitions 3.9.0 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/shared/animation/snap-to.js +2 -0
- package/lib/commonjs/shared/animation/snap-to.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js +19 -20
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js +16 -2
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +5 -0
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +1 -3
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/index.js +4 -3
- package/lib/commonjs/shared/components/boundary/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +47 -187
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js +21 -13
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js +1 -12
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +40 -33
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +3 -4
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +46 -130
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js +45 -9
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +2 -29
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/handoff-target.js +33 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/handoff-target.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js +19 -15
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +1 -10
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +18 -36
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +7 -0
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/resolve-boundary-target.js +29 -0
- package/lib/commonjs/shared/components/boundary/utils/resolve-boundary-target.js.map +1 -0
- package/lib/commonjs/shared/components/masked-view.js +9 -1
- package/lib/commonjs/shared/components/masked-view.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +3 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +9 -1
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +4 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js +2 -8
- package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +37 -3
- package/lib/commonjs/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-release.js +3 -2
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/types.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/transition-visual-state.js +42 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/transition-visual-state.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js +11 -5
- package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +23 -10
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +10 -8
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +4 -4
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/scroll.store.js +20 -2
- package/lib/commonjs/shared/stores/scroll.store.js.map +1 -1
- package/lib/commonjs/shared/stores/system.store.js +2 -0
- package/lib/commonjs/shared/stores/system.store.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js +23 -1
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate.js +14 -2
- package/lib/commonjs/shared/utils/animation/animate.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/spring/spring.js +22 -2
- package/lib/commonjs/shared/utils/animation/spring/spring.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/spring/springUtils.js +96 -0
- package/lib/commonjs/shared/utils/animation/spring/springUtils.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/state.js +4 -0
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +17 -5
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +44 -20
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js +2 -31
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/drag.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js +3 -17
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/module/shared/animation/snap-to.js +2 -0
- package/lib/module/shared/animation/snap-to.js.map +1 -1
- package/lib/module/shared/components/boundary/components/boundary-target.js +19 -20
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/shared/components/boundary/create-boundary-component.js +17 -3
- package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +5 -0
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +1 -3
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/index.js +3 -2
- package/lib/module/shared/components/boundary/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +49 -189
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js +21 -13
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js +2 -13
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +43 -36
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +3 -4
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +50 -134
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js +44 -9
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -27
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/handoff-target.js +28 -0
- package/lib/module/shared/components/boundary/portal/utils/handoff-target.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js +19 -15
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +0 -8
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +19 -37
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/refresh-signals.js +7 -0
- package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/resolve-boundary-target.js +24 -0
- package/lib/module/shared/components/boundary/utils/resolve-boundary-target.js.map +1 -0
- package/lib/module/shared/components/masked-view.js +10 -2
- package/lib/module/shared/components/masked-view.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js +3 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +10 -2
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +2 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +4 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/gestures.provider.js +2 -8
- package/lib/module/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js +35 -2
- package/lib/module/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +1 -0
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-release.js +3 -2
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/types.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/transition-visual-state.js +35 -0
- package/lib/module/shared/providers/screen/styles/helpers/transition-visual-state.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js +11 -5
- package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +23 -10
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +10 -8
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +4 -4
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/scroll.store.js +17 -0
- package/lib/module/shared/stores/scroll.store.js.map +1 -1
- package/lib/module/shared/stores/system.store.js +2 -0
- package/lib/module/shared/stores/system.store.js.map +1 -1
- package/lib/module/shared/utils/animation/animate-to-progress.js +21 -0
- package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/module/shared/utils/animation/animate.js +14 -2
- package/lib/module/shared/utils/animation/animate.js.map +1 -1
- package/lib/module/shared/utils/animation/spring/spring.js +23 -3
- package/lib/module/shared/utils/animation/spring/spring.js.map +1 -1
- package/lib/module/shared/utils/animation/spring/springUtils.js +95 -0
- package/lib/module/shared/utils/animation/spring/springUtils.js.map +1 -1
- package/lib/module/shared/utils/animation/state.js +2 -0
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js +16 -5
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +46 -22
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/drag.js +2 -30
- package/lib/module/shared/utils/bounds/navigation/zoom/drag.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js +4 -18
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/typescript/shared/animation/snap-to.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +2 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +3 -4
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/index.d.ts +6 -9
- package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts +1 -3
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts +1 -10
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts +1 -3
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts +2 -2
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts +0 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +1 -10
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/handoff-target.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/portal/utils/handoff-target.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts +2 -3
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +0 -4
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +8 -12
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts +1 -0
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/resolve-boundary-target.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/utils/resolve-boundary-target.d.ts.map +1 -0
- package/lib/typescript/shared/components/masked-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/gestures.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-release.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts +1 -9
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/transition-visual-state.d.ts +18 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/transition-visual-state.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts +2 -2
- package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/shared/stores/scroll.store.d.ts +7 -0
- package/lib/typescript/shared/stores/scroll.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/system.store.d.ts +5 -0
- package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts +6 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/animate.d.ts +2 -2
- package/lib/typescript/shared/utils/animation/animate.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/spring/spring.d.ts +2 -2
- package/lib/typescript/shared/utils/animation/spring/spring.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/spring/springUtils.d.ts +3 -0
- package/lib/typescript/shared/utils/animation/spring/springUtils.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/state.d.ts +6 -0
- package/lib/typescript/shared/utils/animation/state.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts +9 -0
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts +2 -11
- package/lib/typescript/shared/utils/bounds/navigation/zoom/drag.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts +7 -4
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/animation/snap-to.ts +5 -0
- package/src/shared/components/boundary/components/boundary-target.tsx +37 -23
- package/src/shared/components/boundary/create-boundary-component.tsx +29 -3
- package/src/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +11 -0
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +3 -9
- package/src/shared/components/boundary/index.tsx +4 -8
- package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +73 -275
- package/src/shared/components/boundary/portal/components/boundary-content-portal/index.tsx +31 -12
- package/src/shared/components/boundary/portal/components/boundary-portal/components/host.tsx +2 -12
- package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +64 -62
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts +2 -9
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +73 -186
- package/src/shared/components/boundary/portal/components/boundary-portal/index.tsx +72 -12
- package/src/shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.ts +0 -1
- package/src/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +2 -39
- package/src/shared/components/boundary/portal/utils/handoff-target.ts +48 -0
- package/src/shared/components/boundary/portal/utils/resolve-portal.ts +26 -18
- package/src/shared/components/boundary/portal/utils/teleport-control.ts +0 -12
- package/src/shared/components/boundary/providers/boundary-root.provider.tsx +28 -80
- package/src/shared/components/boundary/utils/refresh-signals.ts +8 -0
- package/src/shared/components/boundary/utils/resolve-boundary-target.tsx +39 -0
- package/src/shared/components/masked-view.tsx +20 -4
- package/src/shared/components/screen-container/layers/backdrop.tsx +3 -1
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +14 -4
- package/src/shared/components/screen-lifecycle/hooks/use-transition-start-controller.ts +2 -0
- package/src/shared/providers/helpers/measured-bounds-writes.ts +1 -0
- package/src/shared/providers/screen/gestures/gestures.provider.tsx +2 -10
- package/src/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.ts +1 -0
- package/src/shared/providers/screen/gestures/pinch/activation/use-pinch-activation.ts +74 -3
- package/src/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +1 -0
- package/src/shared/providers/screen/gestures/pinch/behavior/pinch-release.ts +2 -4
- package/src/shared/providers/screen/gestures/types.ts +0 -14
- package/src/shared/providers/screen/styles/helpers/transition-visual-state.ts +44 -0
- package/src/shared/providers/screen/styles/helpers/visibility-gate.ts +17 -7
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +30 -15
- package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +14 -13
- package/src/shared/stores/bounds/internals/links.ts +13 -2
- package/src/shared/stores/scroll.store.ts +23 -0
- package/src/shared/stores/system.store.ts +8 -0
- package/src/shared/utils/animation/animate-to-progress.ts +59 -28
- package/src/shared/utils/animation/animate.ts +18 -2
- package/src/shared/utils/animation/spring/spring.ts +36 -1
- package/src/shared/utils/animation/spring/springUtils.ts +130 -0
- package/src/shared/utils/animation/state.ts +8 -0
- package/src/shared/utils/bounds/navigation/reveal/math.ts +21 -5
- package/src/shared/utils/bounds/navigation/zoom/build.ts +77 -23
- package/src/shared/utils/bounds/navigation/zoom/drag.ts +3 -42
- package/src/shared/utils/bounds/navigation/zoom/helpers.ts +9 -23
- package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js +0 -32
- package/lib/commonjs/shared/components/boundary/hooks/use-register-target.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +0 -51
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +0 -220
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js +0 -29
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js +0 -25
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js +0 -64
- package/lib/commonjs/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +0 -21
- package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +0 -29
- package/lib/commonjs/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js +0 -38
- package/lib/commonjs/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js +0 -32
- package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-register-target.js +0 -27
- package/lib/module/shared/components/boundary/hooks/use-register-target.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js +0 -46
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/utils/ownership.js +0 -213
- package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js +0 -24
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js +0 -20
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js +0 -59
- package/lib/module/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js +0 -15
- package/lib/module/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js +0 -24
- package/lib/module/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js +0 -33
- package/lib/module/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js +0 -26
- package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts +0 -10
- package/lib/typescript/shared/components/boundary/hooks/use-register-target.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts +0 -13
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +0 -34
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts +0 -8
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts +0 -8
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts +0 -15
- package/lib/typescript/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts +0 -4
- package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts +0 -5
- package/lib/typescript/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts +0 -9
- package/lib/typescript/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts +0 -16
- package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts.map +0 -1
- package/src/shared/components/boundary/hooks/use-register-target.ts +0 -43
- package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-slot.tsx +0 -79
- package/src/shared/components/boundary/portal/utils/ownership.ts +0 -319
- package/src/shared/components/boundary/portal/utils/shallow-equal.ts +0 -25
- package/src/shared/components/boundary/portal/utils/visible-host.ts +0 -24
- package/src/shared/providers/screen/gestures/rotation/activation/use-rotation-activation.ts +0 -88
- package/src/shared/providers/screen/gestures/rotation/behavior/rotation-lifecycle.ts +0 -19
- package/src/shared/providers/screen/gestures/rotation/behavior/use-rotation-behavior.ts +0 -47
- package/src/shared/providers/screen/gestures/rotation/use-build-rotation-gesture.ts +0 -50
- package/src/shared/providers/screen/styles/helpers/opening-phase.ts +0 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getClampedScrollAxisDelta","getPortalHostBounds","resolvePortalOffsetStyle","bounds","hostKey","placement","
|
|
1
|
+
{"version":3,"names":["getClampedScrollAxisDelta","getPortalHostBounds","resolvePortalOffsetStyle","bounds","hostKey","placement","hostBounds","boundsScrollSnapshot","scroll","hostBoundsScrollSnapshot","alignHostToBoundsScroll","hostSnapshotDeltaX","hostSnapshotDeltaY","adjustedHostPageX","pageX","adjustedHostPageY","pageY","transform","translateY","translateX"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts"],"mappings":";;AACA,SAASA,yBAAyB,QAAQ,uCAAuC;AAEjF,SAASC,mBAAmB,QAAQ,6BAA6B;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,OAAO,MAAMC,wBAAwB,GAAGA,CAAC;EACxCC,MAAM;EACNC,OAAO;EACPC;AAC+B,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAGL,mBAAmB,CAACG,OAAO,CAAC;EAC/C,MAAMG,oBAAoB,GAAGJ,MAAM,CAACK,MAAM,IAAI,IAAI;EAClD,MAAMC,wBAAwB,GAAGH,UAAU,EAAEE,MAAM,IAAI,IAAI;;EAE3D;EACA;EACA;EACA,MAAME,uBAAuB,GAAGL,SAAS,KAAK,aAAa;EAE3D,MAAMM,kBAAkB,GAAGD,uBAAuB,GAC/CV,yBAAyB,CACzBO,oBAAoB,EACpBE,wBAAwB,EACxB,YACD,CAAC,GACA,CAAC;EACJ,MAAMG,kBAAkB,GAAGF,uBAAuB,GAC/CV,yBAAyB,CACzBO,oBAAoB,EACpBE,wBAAwB,EACxB,UACD,CAAC,GACA,CAAC;;EAEJ;EACA;EACA,MAAMI,iBAAiB,GAAGP,UAAU,GACjCA,UAAU,CAACQ,KAAK,GAAGH,kBAAkB,GACrC,CAAC;EACJ,MAAMI,iBAAiB,GAAGT,UAAU,GACjCA,UAAU,CAACU,KAAK,GAAGJ,kBAAkB,GACrC,CAAC;EAEJ,OAAO;IACNK,SAAS,EAAE,CACV;MAAEC,UAAU,EAAEf,MAAM,CAACa,KAAK,GAAGD;IAAkB,CAAC,EAChD;MAAEI,UAAU,EAAEhB,MAAM,CAACW,KAAK,GAAGD;IAAkB,CAAC;EAElD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,158 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useLayoutEffect } from "react";
|
|
4
|
+
import { useAnimatedProps, useSharedValue } from "react-native-reanimated";
|
|
5
5
|
import { useDescriptorsStore } from "../../../../../../providers/screen/descriptors";
|
|
6
6
|
import { useScreenSlots } from "../../../../../../providers/screen/styles";
|
|
7
|
+
import { hasCloseTransitionFinished } from "../../../../../../providers/screen/styles/helpers/transition-visual-state";
|
|
8
|
+
import { AnimationStore } from "../../../../../../stores/animation.store";
|
|
9
|
+
import { getLinkKeyFromTag } from "../../../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
7
10
|
import { pairs } from "../../../../../../stores/bounds/internals/state";
|
|
11
|
+
import { SystemStore } from "../../../../../../stores/system.store";
|
|
8
12
|
import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
|
|
9
|
-
import {
|
|
10
|
-
import { shallowEqual } from "../../../utils/shallow-equal";
|
|
11
|
-
import { shouldAttachBoundaryPortal } from "../../../utils/teleport-control";
|
|
12
|
-
import { resolveNextVisiblePortalHostName } from "../../../utils/visible-host";
|
|
13
|
+
import { isTeleportEnabled } from "../../../utils/teleport-control";
|
|
13
14
|
import { createBoundaryPortalHostName } from "../helpers/host-name";
|
|
14
15
|
import { useActiveHostKey } from "../stores/host-registry.store";
|
|
15
|
-
import {
|
|
16
|
+
import { mountPortalBoundaryHost, unmountPortalBoundaryHostByName } from "../stores/portal-boundary-host.store";
|
|
16
17
|
export const useBoundaryPortalAttachment = ({
|
|
17
|
-
boundaryId
|
|
18
|
-
enabled
|
|
18
|
+
boundaryId
|
|
19
19
|
}) => {
|
|
20
20
|
const sourcePairKey = useDescriptorsStore(s => s.derivations.sourcePairKey);
|
|
21
21
|
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
22
|
+
const nextScreenKey = useDescriptorsStore(s => s.derivations.nextScreenKey);
|
|
23
|
+
const destinationScreenKey = nextScreenKey ?? currentScreenKey;
|
|
24
|
+
const destinationAnimationProgress = SystemStore.getValue(destinationScreenKey, "animationProgress");
|
|
25
|
+
const destinationClosing = AnimationStore.getValue(destinationScreenKey, "closing");
|
|
22
26
|
const {
|
|
23
27
|
localStylesMaps,
|
|
24
|
-
nextInterpolatorReady,
|
|
25
28
|
slotsMap
|
|
26
29
|
} = useScreenSlots();
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const escapeHostKey = useActiveHostKey(enabled ? currentScreenKey : null);
|
|
32
|
-
const updatePortalOwnership = useCallback((hostScreenKey, ownerPairKey, ownerScreenKey) => {
|
|
33
|
-
if (hostScreenKey && ownerPairKey && ownerScreenKey) {
|
|
34
|
-
setOwnership(current => {
|
|
35
|
-
if (current?.hostScreenKey === hostScreenKey && current.ownerPairKey === ownerPairKey && current.ownerScreenKey === ownerScreenKey) {
|
|
36
|
-
return current;
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
hostScreenKey,
|
|
40
|
-
ownerPairKey,
|
|
41
|
-
ownerScreenKey,
|
|
42
|
-
status: "complete"
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
setOwnership(current => current ? null : current);
|
|
48
|
-
}, []);
|
|
49
|
-
const unmountOwnedPortalBoundaryHosts = useCallback(() => {
|
|
50
|
-
for (const portalHostName of mountedPortalBoundaryHostNamesRef.current) {
|
|
51
|
-
unmountPortalBoundaryHostByName(portalHostName);
|
|
52
|
-
}
|
|
53
|
-
mountedPortalBoundaryHostNamesRef.current.clear();
|
|
54
|
-
}, []);
|
|
30
|
+
const portalHostName = useSharedValue(null);
|
|
31
|
+
const portalHostReady = useSharedValue(false);
|
|
32
|
+
const attachedDestination = useSharedValue(null);
|
|
33
|
+
const escapeHostKey = useActiveHostKey(currentScreenKey);
|
|
55
34
|
useLayoutEffect(() => {
|
|
56
|
-
if (!
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
unmountOwnedPortalBoundaryHosts();
|
|
35
|
+
if (!sourcePairKey || !escapeHostKey) {
|
|
36
|
+
portalHostName.set(null);
|
|
37
|
+
portalHostReady.set(false);
|
|
60
38
|
return;
|
|
61
39
|
}
|
|
62
|
-
const
|
|
40
|
+
const nextPortalHostName = createBoundaryPortalHostName(escapeHostKey, boundaryId, sourcePairKey);
|
|
63
41
|
mountPortalBoundaryHost({
|
|
64
42
|
boundaryId,
|
|
65
|
-
escapeClipping: true,
|
|
66
43
|
hostKey: escapeHostKey,
|
|
67
44
|
localStylesMaps,
|
|
68
|
-
pairKey:
|
|
69
|
-
portalHostName,
|
|
45
|
+
pairKey: sourcePairKey,
|
|
46
|
+
portalHostName: nextPortalHostName,
|
|
47
|
+
portalHostReady,
|
|
70
48
|
screenKey: currentScreenKey,
|
|
71
49
|
slotsMap
|
|
72
50
|
});
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
// Request the new receiver immediately, but keep the currently visible
|
|
76
|
-
// receiver until the new interpolator is ready. This avoids a no-host gap
|
|
77
|
-
// during rapid close/open retargets.
|
|
78
|
-
requestedPortalHostName.set(portalHostName);
|
|
79
|
-
}, [boundaryId, currentScreenKey, enabled, escapeHostKey, localStylesMaps, ownership, requestedPortalHostName, slotsMap, unmountOwnedPortalBoundaryHosts, visiblePortalHostName]);
|
|
80
|
-
useLayoutEffect(() => {
|
|
51
|
+
portalHostName.set(nextPortalHostName);
|
|
81
52
|
return () => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
53
|
+
portalHostName.set(null);
|
|
54
|
+
portalHostReady.set(false);
|
|
55
|
+
unmountPortalBoundaryHostByName(nextPortalHostName);
|
|
85
56
|
};
|
|
86
|
-
}, [
|
|
87
|
-
useAnimatedReaction(() => {
|
|
88
|
-
"worklet";
|
|
89
|
-
|
|
90
|
-
if (!enabled || !sourcePairKey) {
|
|
91
|
-
return {
|
|
92
|
-
hostScreenKey: null,
|
|
93
|
-
ownerPairKey: sourcePairKey,
|
|
94
|
-
ownerScreenKey: null,
|
|
95
|
-
status: "clear"
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
return resolveBoundaryPortalOwnership({
|
|
99
|
-
boundaryId,
|
|
100
|
-
currentScreenKey,
|
|
101
|
-
handoff: false,
|
|
102
|
-
pairsState: pairs.get(),
|
|
103
|
-
sourcePairKey
|
|
104
|
-
});
|
|
105
|
-
}, (signal, previousSignal) => {
|
|
106
|
-
"worklet";
|
|
107
|
-
|
|
108
|
-
if (shallowEqual(previousSignal, signal)) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
runOnJS(updatePortalOwnership)(signal.hostScreenKey, signal.ownerPairKey, signal.ownerScreenKey ?? undefined);
|
|
112
|
-
});
|
|
113
|
-
useAnimatedReaction(() => {
|
|
114
|
-
"worklet";
|
|
115
|
-
|
|
116
|
-
const slot = slotsMap.get()[boundaryId];
|
|
117
|
-
const teleport = slot?.props?.teleport;
|
|
118
|
-
const shouldTeleport = shouldAttachBoundaryPortal({
|
|
119
|
-
enabled,
|
|
120
|
-
teleport
|
|
121
|
-
});
|
|
122
|
-
const requestedName = requestedPortalHostName.get();
|
|
123
|
-
const visibleName = visiblePortalHostName.get();
|
|
124
|
-
const isInterpolatorReady = nextInterpolatorReady.get();
|
|
125
|
-
const nextVisibleName = resolveNextVisiblePortalHostName({
|
|
126
|
-
isInterpolatorReady: isInterpolatorReady === 1,
|
|
127
|
-
requestedName,
|
|
128
|
-
shouldTeleport,
|
|
129
|
-
visibleName
|
|
130
|
-
});
|
|
131
|
-
return {
|
|
132
|
-
isInterpolatorReady,
|
|
133
|
-
nextVisibleName,
|
|
134
|
-
requestedName,
|
|
135
|
-
shouldTeleport,
|
|
136
|
-
teleport,
|
|
137
|
-
visibleName
|
|
138
|
-
};
|
|
139
|
-
}, (state, previousState) => {
|
|
140
|
-
"worklet";
|
|
141
|
-
|
|
142
|
-
if (shallowEqual(previousState, state)) {
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
if (state.nextVisibleName !== state.visibleName) {
|
|
146
|
-
visiblePortalHostName.set(state.nextVisibleName);
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
if (state.visibleName && state.visibleName === state.requestedName) {
|
|
150
|
-
runOnJS(dropStalePortalBoundaryHosts)({
|
|
151
|
-
boundaryId,
|
|
152
|
-
keepPortalHostName: state.visibleName
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
});
|
|
57
|
+
}, [boundaryId, currentScreenKey, escapeHostKey, localStylesMaps, portalHostName, portalHostReady, sourcePairKey, slotsMap]);
|
|
156
58
|
const teleportProps = useAnimatedProps(() => {
|
|
157
59
|
"worklet";
|
|
158
60
|
|
|
@@ -162,19 +64,33 @@ export const useBoundaryPortalAttachment = ({
|
|
|
162
64
|
teleport,
|
|
163
65
|
...slotProps
|
|
164
66
|
} = slot?.props ?? {};
|
|
165
|
-
const shouldTeleport =
|
|
166
|
-
|
|
167
|
-
|
|
67
|
+
const shouldTeleport = isTeleportEnabled(teleport);
|
|
68
|
+
const hostName = portalHostName.get();
|
|
69
|
+
const pair = sourcePairKey ? pairs.get()[sourcePairKey] : undefined;
|
|
70
|
+
const linkKey = getLinkKeyFromTag(boundaryId);
|
|
71
|
+
const link = pair?.links[linkKey];
|
|
72
|
+
const hasActiveLink = link?.source !== null && link !== undefined && (!link.group || pair?.groups[link.group]?.activeId === linkKey);
|
|
73
|
+
const hasAttachableHost = shouldTeleport && hasActiveLink && portalHostReady.get() && hostName;
|
|
74
|
+
if (hasAttachableHost) {
|
|
75
|
+
attachedDestination.set({
|
|
76
|
+
animationProgress: destinationAnimationProgress,
|
|
77
|
+
closing: destinationClosing
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const attached = attachedDestination.get();
|
|
81
|
+
const hasAttachedCloseFinished = attached !== null && hasCloseTransitionFinished({
|
|
82
|
+
animationProgress: attached.animationProgress.get(),
|
|
83
|
+
closing: attached.closing.get()
|
|
168
84
|
});
|
|
169
|
-
const
|
|
85
|
+
const canAttach = hasAttachableHost && !hasAttachedCloseFinished;
|
|
86
|
+
const targetHostName = canAttach ? hostName : PORTAL_HOST_NAME_RESET_VALUE;
|
|
170
87
|
return {
|
|
171
88
|
...slotProps,
|
|
172
|
-
hostName:
|
|
89
|
+
hostName: targetHostName
|
|
173
90
|
};
|
|
174
91
|
});
|
|
175
92
|
return {
|
|
176
|
-
teleportProps
|
|
177
|
-
visiblePortalHostName
|
|
93
|
+
teleportProps
|
|
178
94
|
};
|
|
179
95
|
};
|
|
180
96
|
//# sourceMappingURL=use-boundary-portal-attachment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","useAnimatedProps","useSharedValue","useDescriptorsStore","useScreenSlots","hasCloseTransitionFinished","AnimationStore","getLinkKeyFromTag","pairs","SystemStore","PORTAL_HOST_NAME_RESET_VALUE","isTeleportEnabled","createBoundaryPortalHostName","useActiveHostKey","mountPortalBoundaryHost","unmountPortalBoundaryHostByName","useBoundaryPortalAttachment","boundaryId","sourcePairKey","s","derivations","currentScreenKey","nextScreenKey","destinationScreenKey","destinationAnimationProgress","getValue","destinationClosing","localStylesMaps","slotsMap","portalHostName","portalHostReady","attachedDestination","escapeHostKey","set","nextPortalHostName","hostKey","pairKey","screenKey","teleportProps","slot","get","pointerEvents","_pointerEvents","teleport","slotProps","props","shouldTeleport","hostName","pair","undefined","linkKey","link","links","hasActiveLink","source","group","groups","activeId","hasAttachableHost","animationProgress","closing","attached","hasAttachedCloseFinished","canAttach","targetHostName"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AACvC,SAECC,gBAAgB,EAChBC,cAAc,QACR,yBAAyB;AAChC,SAASC,mBAAmB,QAAQ,gDAAgD;AACpF,SAASC,cAAc,QAAQ,2CAA2C;AAC1E,SAASC,0BAA0B,QAAQ,2EAA2E;AACtH,SAASC,cAAc,QAAQ,0CAA0C;AACzE,SAASC,iBAAiB,QAAQ,4DAA4D;AAC9F,SAASC,KAAK,QAAQ,iDAAiD;AACvE,SAASC,WAAW,QAAQ,uCAAuC;AACnE,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SAASC,iBAAiB,QAAQ,iCAAiC;AACnE,SAASC,4BAA4B,QAAQ,sBAAsB;AACnE,SAASC,gBAAgB,QAAQ,+BAA+B;AAChE,SACCC,uBAAuB,EACvBC,+BAA+B,QACzB,sCAAsC;AAW7C,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC3CC;AACkC,CAAC,KAAK;EACxC,MAAMC,aAAa,GAAGf,mBAAmB,CAAEgB,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,aAAa,CAAC;EAC7E,MAAMG,gBAAgB,GAAGlB,mBAAmB,CAC1CgB,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,gBACtB,CAAC;EACD,MAAMC,aAAa,GAAGnB,mBAAmB,CAAEgB,CAAC,IAAKA,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MsB,wBAAwB,GAC7BD,QAAQ,KAAK,IAAI,IACjBxD,0BAA0B,CAAC;MAC1BsD,iBAAiB,EAAEE,QAAQ,CAACF,iBAAiB,CAACnB,GAAG,CAAC,CAAC;MACnDoB,OAAO,EAAEC,QAAQ,CAACD,OAAO,CAACpB,GAAG,CAAC;IAC/B,CAAC,CAAC;IACH,MAAMuB,SAAS,GAAGL,iBAAiB,IAAI,CAACI,wBAAwB;IAChE,MAAME,cAAc,GAAGD,SAAS,GAAGhB,QAAQ,GAAGrC,4BAA4B;IAE1E,OAAO;MACN,GAAGkC,SAAS;MACZG,QAAQ,EAAEiB;IACX,CAAC;EACF,CAAC,CAAC;EAEF,OAAO;IAAE1B;EAAc,CAAC;AACzB,CAAC","ignoreList":[]}
|
|
@@ -1,27 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { memo } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import Animated, { runOnUI } from "react-native-reanimated";
|
|
5
|
+
import { logger } from "../../../../../utils/logger";
|
|
6
|
+
import { isTeleportAvailable, PORTAL_POINTER_EVENTS, NativePortal as TeleportPortal } from "../../teleport";
|
|
5
7
|
import { useBoundaryPortalAttachment } from "./hooks/use-boundary-portal-attachment";
|
|
8
|
+
import { usePlaceholderStyles } from "./hooks/use-placeholder-styles";
|
|
6
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
const AnimatedNativePortal = TeleportPortal ? Animated.createAnimatedComponent(TeleportPortal) : null;
|
|
11
|
+
const EnabledNativePortal = AnimatedNativePortal;
|
|
7
12
|
export const BoundaryPortal = /*#__PURE__*/memo(function BoundaryPortal({
|
|
8
13
|
boundaryId,
|
|
9
14
|
children,
|
|
10
15
|
enabled,
|
|
11
16
|
placeholderRef
|
|
12
17
|
}) {
|
|
18
|
+
if (!enabled || !isTeleportAvailable || !AnimatedNativePortal) {
|
|
19
|
+
return children;
|
|
20
|
+
}
|
|
21
|
+
return /*#__PURE__*/_jsx(EnabledBoundaryPortal, {
|
|
22
|
+
boundaryId: boundaryId,
|
|
23
|
+
placeholderRef: placeholderRef,
|
|
24
|
+
children: children
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
const EnabledBoundaryPortal = /*#__PURE__*/memo(function EnabledBoundaryPortal({
|
|
28
|
+
boundaryId,
|
|
29
|
+
children,
|
|
30
|
+
placeholderRef
|
|
31
|
+
}) {
|
|
32
|
+
if (__DEV__ && !boundaryId) {
|
|
33
|
+
logger.warnOnce("portal:missing-id", "A boundary portal was rendered without an id; rendering inline.");
|
|
34
|
+
}
|
|
13
35
|
const {
|
|
14
36
|
teleportProps
|
|
15
37
|
} = useBoundaryPortalAttachment({
|
|
16
|
-
boundaryId
|
|
17
|
-
enabled
|
|
38
|
+
boundaryId
|
|
18
39
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
40
|
+
const {
|
|
41
|
+
handleOnLayout,
|
|
42
|
+
placeholderStyle
|
|
43
|
+
} = usePlaceholderStyles();
|
|
44
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
45
|
+
ref: placeholderRef,
|
|
46
|
+
onLayout: ({
|
|
47
|
+
nativeEvent: {
|
|
48
|
+
layout
|
|
49
|
+
}
|
|
50
|
+
}) => runOnUI(handleOnLayout)(layout),
|
|
51
|
+
style: placeholderStyle,
|
|
52
|
+
pointerEvents: PORTAL_POINTER_EVENTS,
|
|
53
|
+
collapsable: false,
|
|
54
|
+
children: /*#__PURE__*/_jsx(EnabledNativePortal, {
|
|
55
|
+
animatedProps: teleportProps,
|
|
56
|
+
name: boundaryId,
|
|
57
|
+
pointerEvents: PORTAL_POINTER_EVENTS,
|
|
58
|
+
children: children
|
|
59
|
+
})
|
|
25
60
|
});
|
|
26
61
|
});
|
|
27
62
|
//# sourceMappingURL=index.js.map
|
package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","
|
|
1
|
+
{"version":3,"names":["memo","Animated","runOnUI","logger","isTeleportAvailable","PORTAL_POINTER_EVENTS","NativePortal","TeleportPortal","useBoundaryPortalAttachment","usePlaceholderStyles","jsx","_jsx","AnimatedNativePortal","createAnimatedComponent","EnabledNativePortal","BoundaryPortal","boundaryId","children","enabled","placeholderRef","EnabledBoundaryPortal","__DEV__","warnOnce","teleportProps","handleOnLayout","placeholderStyle","View","ref","onLayout","nativeEvent","layout","style","pointerEvents","collapsable","animatedProps","name"],"sourceRoot":"../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/index.tsx"],"mappings":";;AAAA,SAGCA,IAAI,QAEE,OAAO;AAEd,OAAOC,QAAQ,IAAsBC,OAAO,QAAQ,yBAAyB;AAC7E,SAASC,MAAM,QAAQ,6BAA6B;AACpD,SACCC,mBAAmB,EACnBC,qBAAqB,EACrBC,YAAY,IAAIC,cAAc,QACxB,gBAAgB;AACvB,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,oBAAoB,QAAQ,gCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAStE,MAAMC,oBAAoB,GAAGL,cAAc,GACxCN,QAAQ,CAACY,uBAAuB,CAChCN,cACD,CAAC,GACA,IAAI;AACP,MAAMO,mBAAmB,GAAGF,oBAE3B;AASD,OAAO,MAAMG,cAAc,gBAAGf,IAAI,CAAC,SAASe,cAAcA,CAAC;EAC1DC,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC;AACoB,CAAC,EAAE;EACvB,IAAI,CAACD,OAAO,IAAI,CAACd,mBAAmB,IAAI,CAACQ,oBAAoB,EAAE;IAC9D,OAAOK,QAAQ;EAChB;EAEA,oBACCN,IAAA,CAACS,qBAAqB;IACrBJ,UAAU,EAAEA,UAAW;IACvBG,cAAc,EAAEA,cAAe;IAAAF,QAAA,EAE9BA;EAAQ,CACa,CAAC;AAE1B,CAAC,CAAC;AAEF,MAAMG,qBAAqB,gBAAGpB,IAAI,CAAC,SAASoB,qBAAqBA,CAAC;EACjEJ,UAAU;EACVC,QAAQ;EACRE;AACqC,CAAC,EAAE;EACxC,IAAIE,OAAO,IAAI,CAACL,UAAU,EAAE;IAC3Bb,MAAM,CAACmB,QAAQ,CACd,mBAAmB,EACnB,iEACD,CAAC;EACF;EAEA,MAAM;IAAEC;EAAc,CAAC,GAAGf,2BAA2B,CAAC;IAAEQ;EAAW,CAAC,CAAC;EACrE,MAAM;IAAEQ,cAAc;IAAEC;EAAiB,CAAC,GAAGhB,oBAAoB,CAAC,CAAC;EAEnE,oBACCE,IAAA,CAACV,QAAQ,CAACyB,IAAI;IACbC,GAAG,EAAER,cAAe;IACpBS,QAAQ,EAAEA,CAAC;MAAEC,WAAW,EAAE;QAAEC;MAAO;IAAE,CAAC,KACrC5B,OAAO,CAACsB,cAAc,CAAC,CAACM,MAAM,CAC9B;IACDC,KAAK,EAAEN,gBAAiB;IACxBO,aAAa,EAAE3B,qBAAsB;IACrC4B,WAAW,EAAE,KAAM;IAAAhB,QAAA,eAEnBN,IAAA,CAACG,mBAAmB;MACnBoB,aAAa,EAAEX,aAAc;MAC7BY,IAAI,EAAEnB,UAAW;MACjBgB,aAAa,EAAE3B,qBAAsB;MAAAY,QAAA,EAEpCA;IAAQ,CACW;EAAC,CACR,CAAC;AAElB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useSyncExternalStore","EMPTY_SNAPSHOT","listeners","Set","hostStacks","Map","snapshot","getActiveHostFromStack","screenKey","stack","length","index","host","fallback","hostKey","buildSnapshot","nextSnapshot","emit","listener","subscribe","add","delete","registerHost","registration","get","previousActiveHostKey","nextStack","filter","unshift","push","set","unregisterHost","getActiveHostKey","useActiveHostKey","undefined","resetHostRegistry","clear"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;
|
|
1
|
+
{"version":3,"names":["useSyncExternalStore","EMPTY_SNAPSHOT","listeners","Set","hostStacks","Map","snapshot","getActiveHostFromStack","screenKey","stack","length","index","host","fallback","hostKey","buildSnapshot","nextSnapshot","emit","listener","subscribe","add","delete","registerHost","registration","get","previousActiveHostKey","nextStack","filter","unshift","push","set","unregisterHost","getActiveHostKey","useActiveHostKey","undefined","resetHostRegistry","clear"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/stores/host-registry.store.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAU5C,MAAMC,cAAoC,GAAG,CAAC,CAAC;AAE/C,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAA6B,CAAC;AAExD,IAAIC,QAA8B,GAAGL,cAAc;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,sBAAsB,GAAGA,CAC9BC,SAAiB,EACjBC,KAAqC,KACjC;EACJ,IAAI,CAACA,KAAK,IAAIA,KAAK,CAACC,MAAM,KAAK,CAAC,EAAE;IACjC,OAAOF,SAAS;EACjB;EAEA,KAAK,IAAIG,KAAK,GAAGF,KAAK,CAACC,MAAM,GAAG,CAAC,EAAEC,KAAK,IAAI,CAAC,EAAEA,KAAK,EAAE,EAAE;IACvD,MAAMC,IAAI,GAAGH,KAAK,CAACE,KAAK,CAAC;IACzB,IAAI,CAACC,IAAI,CAACC,QAAQ,EAAE;MACnB,OAAOD,IAAI,CAACE,OAAO;IACpB;EACD;EAEA,OAAOL,KAAK,CAAC,CAAC,CAAC,EAAEK,OAAO,IAAIN,SAAS;AACtC,CAAC;AAED,MAAMO,aAAa,GAAGA,CAAA,KAA4B;EACjD,MAAMC,YAAkC,GAAG,CAAC,CAAC;EAE7C,KAAK,MAAM,CAACR,SAAS,EAAEC,KAAK,CAAC,IAAIL,UAAU,EAAE;IAC5CY,YAA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GL,UAAU,CAACoB,GAAG,CAAChB,SAAS,CAAC;EACvC,IAAI,CAACC,KAAK,EAAE;IACX;EACD;EAEA,MAAMgB,qBAAqB,GAAGlB,sBAAsB,CAACC,SAAS,EAAEC,KAAK,CAAC;EACtE,MAAMiB,SAAS,GAAGjB,KAAK,CAACkB,MAAM,CAAEf,IAAI,IAAKA,IAAI,CAACE,OAAO,KAAKA,OAAO,CAAC;EAElE,IAAIY,SAAS,CAAChB,MAAM,KAAK,CAAC,EAAE;IAC3BN,UAAU,CAACiB,MAAM,CAACb,SAAS,CAAC;EAC7B,CAAC,MAAM;IACNJ,UAAU,CAAC0B,GAAG,CAACtB,SAAS,EAAEkB,SAAS,CAAC;EACrC;EAEA,IAAID,qBAAqB,KAAKlB,sBAAsB,CAACC,SAAS,EAAEkB,SAAS,CAAC,EAAE;IAC3E;EACD;EAEAT,IAAI,CAAC,CAAC;AACP,CAAC;AAED,OAAO,MAAMe,gBAAgB,GAAIxB,SAAiB,IAAK;EACtD,OAAOF,QAAQ,CAACE,SAAS,CAAC,IAAIA,SAAS;AACxC,CAAC;AAED,OAAO,MAAMyB,gBAAgB,GAAIzB,SAAyB,IAAK;EAC9D,OAAOR,oBAAoB,CAC1BmB,SAAS,EACT,MAAOX,SAAS,GAAGwB,gBAAgB,CAACxB,SAAS,CAAC,GAAG0B,SAAU,EAC3D,MAAMA,SACP,CAAC;AACF,CAAC;AAED,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EACtC/B,UAAU,CAACgC,KAAK,CAAC,CAAC;EAClB9B,QAAQ,GAAGL,cAAc;EACzBgB,IAAI,CAAC,CAAC;AACP,CAAC","ignoreList":[]}
|
|
@@ -25,7 +25,7 @@ const emit = () => {
|
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
const isSameHost = (a, b) => {
|
|
28
|
-
return a.boundaryId === b.boundaryId && a.
|
|
28
|
+
return a.boundaryId === b.boundaryId && a.hostKey === b.hostKey && a.localStylesMaps === b.localStylesMaps && a.pairKey === b.pairKey && a.portalHostName === b.portalHostName && a.portalHostReady === b.portalHostReady && a.screenKey === b.screenKey && a.slotsMap === b.slotsMap;
|
|
29
29
|
};
|
|
30
30
|
export const mountPortalBoundaryHost = host => {
|
|
31
31
|
const previous = activeBoundaryHosts.get(host.portalHostName);
|
|
@@ -41,32 +41,6 @@ export const unmountPortalBoundaryHostByName = portalHostName => {
|
|
|
41
41
|
}
|
|
42
42
|
emit();
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Post-handoff GC: drop every receiver for this boundary except the one now
|
|
47
|
-
* visible (`keepPortalHostName`). Called once the new host is confirmed on
|
|
48
|
-
* screen so the superseded receivers stop rendering.
|
|
49
|
-
*/
|
|
50
|
-
export const dropStalePortalBoundaryHosts = ({
|
|
51
|
-
boundaryId,
|
|
52
|
-
keepPortalHostName
|
|
53
|
-
}) => {
|
|
54
|
-
if (!activeBoundaryHosts.has(keepPortalHostName)) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
let didDelete = false;
|
|
58
|
-
for (const [hostEntryKey, host] of activeBoundaryHosts) {
|
|
59
|
-
if (host.boundaryId !== boundaryId || host.portalHostName === keepPortalHostName) {
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
activeBoundaryHosts.delete(hostEntryKey);
|
|
63
|
-
didDelete = true;
|
|
64
|
-
}
|
|
65
|
-
if (!didDelete) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
emit();
|
|
69
|
-
};
|
|
70
44
|
const subscribe = listener => {
|
|
71
45
|
listeners.add(listener);
|
|
72
46
|
return () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useSyncExternalStore","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","
|
|
1
|
+
{"version":3,"names":["useSyncExternalStore","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","localStylesMaps","pairKey","portalHostName","portalHostReady","screenKey","slotsMap","mountPortalBoundaryHost","previous","get","set","unmountPortalBoundaryHostByName","delete","subscribe","add","useActivePortalBoundaryHosts"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAoB5C,MAAMC,WAAuC,GAAG,EAAE;AAElD,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,mBAAmB,GAAG,IAAIC,GAAG,CAAmC,CAAC;AAEvE,IAAIC,QAAwB,GAAG;EAC9BC,YAAY,EAAE,CAAC;AAChB,CAAC;AAED,MAAMC,aAAa,GAAGA,CAAA,KAAsB;EAC3C,MAAMD,YAAwD,GAAG,CAAC,CAAC;EAEnE,KAAK,MAAME,IAAI,IAAIL,mBAAmB,CAACM,MAAM,CAAC,CAAC,EAAE;IAChD,MAAMC,KAAK,GAAGJ,YAAY,CAACE,IAAI,CAACG,OAAO,CAAC,IAAI,EAAE;IAC9CD,KAAK,CAACE,IAAI,CAACJ,IAAI,CAAC;IAChBF,YAAY,CAACE,IAAI,CAACG,OAAO,CAAC,GAAGD,KAAK;EACnC;EAEA,OAAO;IACNJ;EACD,CAAC;AACF,CAAC;AAED,MAAMO,IAAI,GAAGA,CAAA,KAAM;EAClBR,QAAQ,GAAGE,aAAa,CAAC,CAAC;EAE1B,KAAK,MAAMO,QAAQ,IAAIb,SAAS,EAAE;IACjCa,QAAQ,CAAC,CAAC;EACX;AACD,CAAC;AAED,MAAMC,UAAU,GAAGA,CAClBC,CAA2B,EAC3BC,CAA2B,KACvB;EACJ,OACCD,CAAC,CAACE,UAAU,KAAKD,CAAC,CAACC,UAAU,IAC7BF,CAAC,CAACL,OAAO,KAAK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|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { getLinkKeyFromTag } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
4
|
+
/** Resolve only the immediate A -> B entering handoff. */
|
|
5
|
+
export const resolveEnteringHandoffTarget = ({
|
|
6
|
+
animationProgress,
|
|
7
|
+
boundaryId,
|
|
8
|
+
currentScreenKey,
|
|
9
|
+
pairsState,
|
|
10
|
+
sourcePairKey
|
|
11
|
+
}) => {
|
|
12
|
+
"worklet";
|
|
13
|
+
|
|
14
|
+
if (!sourcePairKey || animationProgress <= 0) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
const pair = pairsState[sourcePairKey];
|
|
18
|
+
const linkKey = getLinkKeyFromTag(boundaryId);
|
|
19
|
+
const link = pair?.links[linkKey];
|
|
20
|
+
if (link?.status !== "complete" || link.source.screenKey !== currentScreenKey || !link.source.handoff || !link.destination.handoff) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
if (link.group && pair.groups[link.group]?.activeId !== linkKey) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return link.destination.screenKey;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=handoff-target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getLinkKeyFromTag","resolveEnteringHandoffTarget","animationProgress","boundaryId","currentScreenKey","pairsState","sourcePairKey","pair","linkKey","link","links","status","source","screenKey","handoff","destination","group","groups","activeId"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/handoff-target.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,sDAAsD;AAexF;AACA,OAAO,MAAMC,4BAA4B,GAAGA,CAAC;EAC5CC,iBAAiB;EACjBC,UAAU;EACVC,gBAAgB;EAChBC,UAAU;EACVC;AACmC,CAAC,KAAuB;EAC3D,SAAS;;EAET,IAAI,CAACA,aAAa,IAAIJ,iBAAiB,IAAI,CAAC,EAAE;IAC7C,OAAO,IAAI;EACZ;EAEA,MAAMK,IAAI,GAAGF,UAAU,CAACC,aAAa,CAAC;EACtC,MAAME,OAAO,GAAGR,iBAAiB,CAACG,UAAU,CAAC;EAC7C,MAAMM,IAAI,GAAGF,IAAI,EAAEG,KAAK,CAACF,OAAO,CAAC;EAEjC,IACCC,IAAI,EAAEE,MAAM,KAAK,UAAU,IAC3BF,IAAI,CAACG,MAAM,CAACC,SAAS,KAAKT,gBAAgB,IAC1C,CAACK,IAAI,CAACG,MAAM,CAACE,OAAO,IACpB,CAACL,IAAI,CAACM,WAAW,CAACD,OAAO,EACxB;IACD,OAAO,IAAI;EACZ;EAEA,IAAIL,IAAI,CAACO,KAAK,IAAIT,IAAI,CAACU,MAAM,CAACR,IAAI,CAACO,KAAK,CAAC,EAAEE,QAAQ,KAAKV,OAAO,EAAE;IAChE,OAAO,IAAI;EACZ;EAEA,OAAOC,IAAI,CAACM,WAAW,CAACF,SAAS;AAClC,CAAC","ignoreList":[]}
|
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
import { logger } from "../../../../utils/logger";
|
|
4
4
|
import { isTeleportAvailable } from "../teleport";
|
|
5
|
+
const DISABLED_RUNTIME = {
|
|
6
|
+
handoff: false,
|
|
7
|
+
escapeClipping: false
|
|
8
|
+
};
|
|
9
|
+
const HANDOFF_RUNTIME = {
|
|
10
|
+
handoff: true,
|
|
11
|
+
escapeClipping: false
|
|
12
|
+
};
|
|
13
|
+
const ESCAPE_CLIPPING_RUNTIME = {
|
|
14
|
+
handoff: false,
|
|
15
|
+
escapeClipping: true
|
|
16
|
+
};
|
|
17
|
+
const HANDOFF_ESCAPE_CLIPPING_RUNTIME = {
|
|
18
|
+
handoff: true,
|
|
19
|
+
escapeClipping: true
|
|
20
|
+
};
|
|
5
21
|
export const resolveBoundaryPortal = ({
|
|
6
22
|
handoff,
|
|
7
23
|
escapeClipping
|
|
@@ -10,24 +26,12 @@ export const resolveBoundaryPortal = ({
|
|
|
10
26
|
const resolvedEscapeClipping = escapeClipping ?? false;
|
|
11
27
|
const enabled = resolvedHandoff || resolvedEscapeClipping;
|
|
12
28
|
if (!enabled) {
|
|
13
|
-
return
|
|
14
|
-
handoff: false,
|
|
15
|
-
escapeClipping: false,
|
|
16
|
-
enabled: false
|
|
17
|
-
};
|
|
29
|
+
return DISABLED_RUNTIME;
|
|
18
30
|
}
|
|
19
31
|
if (!isTeleportAvailable) {
|
|
20
32
|
logger.warnOnce("boundary:teleport-missing", "react-native-teleport is not installed; handoff and escapeClipping boundaries will render inline.");
|
|
21
|
-
return
|
|
22
|
-
handoff: false,
|
|
23
|
-
escapeClipping: false,
|
|
24
|
-
enabled: false
|
|
25
|
-
};
|
|
33
|
+
return DISABLED_RUNTIME;
|
|
26
34
|
}
|
|
27
|
-
return
|
|
28
|
-
handoff: resolvedHandoff,
|
|
29
|
-
escapeClipping: resolvedEscapeClipping,
|
|
30
|
-
enabled
|
|
31
|
-
};
|
|
35
|
+
return resolvedHandoff ? resolvedEscapeClipping ? HANDOFF_ESCAPE_CLIPPING_RUNTIME : HANDOFF_RUNTIME : ESCAPE_CLIPPING_RUNTIME;
|
|
32
36
|
};
|
|
33
37
|
//# sourceMappingURL=resolve-portal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["logger","isTeleportAvailable","
|
|
1
|
+
{"version":3,"names":["logger","isTeleportAvailable","DISABLED_RUNTIME","handoff","escapeClipping","HANDOFF_RUNTIME","ESCAPE_CLIPPING_RUNTIME","HANDOFF_ESCAPE_CLIPPING_RUNTIME","resolveBoundaryPortal","resolvedHandoff","resolvedEscapeClipping","enabled","warnOnce"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/resolve-portal.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,0BAA0B;AACjD,SAASC,mBAAmB,QAAQ,aAAa;AAYjD,MAAMC,gBAAuC,GAAG;EAC/CC,OAAO,EAAE,KAAK;EACdC,cAAc,EAAE;AACjB,CAAC;AACD,MAAMC,eAAsC,GAAG;EAC9CF,OAAO,EAAE,IAAI;EACbC,cAAc,EAAE;AACjB,CAAC;AACD,MAAME,uBAA8C,GAAG;EACtDH,OAAO,EAAE,KAAK;EACdC,cAAc,EAAE;AACjB,CAAC;AACD,MAAMG,+BAAsD,GAAG;EAC9DJ,OAAO,EAAE,IAAI;EACbC,cAAc,EAAE;AACjB,CAAC;AAED,OAAO,MAAMI,qBAAqB,GAAGA,CAAC;EACrCL,OAAO;EACPC;AAC4B,CAAC,KAA4B;EACzD,MAAMK,eAAe,GAAGN,OAAO,IAAI,KAAK;EACxC,MAAMO,sBAAsB,GAAGN,cAAc,IAAI,KAAK;EAEtD,MAAMO,OAAO,GAAGF,eAAe,IAAIC,sBAAsB;EAEzD,IAAI,CAACC,OAAO,EAAE;IACb,OAAOT,gBAAgB;EACxB;EAEA,IAAI,CAACD,mBAAmB,EAAE;IACzBD,MAAM,CAACY,QAAQ,CACd,2BAA2B,EAC3B,mGACD,CAAC;IAED,OAAOV,gBAAgB;EACxB;EAEA,OAAOO,eAAe,GACnBC,sBAAsB,GACrBH,+BAA+B,GAC/BF,eAAe,GAChBC,uBAAuB;AAC3B,CAAC","ignoreList":[]}
|
|
@@ -8,12 +8,4 @@ export const isTeleportEnabled = teleport => {
|
|
|
8
8
|
}
|
|
9
9
|
return teleport?.enabled !== false;
|
|
10
10
|
};
|
|
11
|
-
export const shouldAttachBoundaryPortal = ({
|
|
12
|
-
enabled,
|
|
13
|
-
teleport
|
|
14
|
-
}) => {
|
|
15
|
-
"worklet";
|
|
16
|
-
|
|
17
|
-
return enabled && isTeleportEnabled(teleport);
|
|
18
|
-
};
|
|
19
11
|
//# sourceMappingURL=teleport-control.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isTeleportEnabled","teleport","enabled"
|
|
1
|
+
{"version":3,"names":["isTeleportEnabled","teleport","enabled"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/teleport-control.ts"],"mappings":";;AAEA,OAAO,MAAMA,iBAAiB,GAC7BC,QAA6C,IACzC;EACJ,SAAS;;EAET,IAAI,OAAOA,QAAQ,KAAK,SAAS,EAAE;IAClC,OAAOA,QAAQ;EAChB;EAEA,OAAOA,QAAQ,EAAEC,OAAO,KAAK,KAAK;AACnC,CAAC","ignoreList":[]}
|