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
|
@@ -19,7 +19,6 @@ export const useBoundaryMeasurement = ({
|
|
|
19
19
|
currentScreenKey,
|
|
20
20
|
measuredRef,
|
|
21
21
|
style,
|
|
22
|
-
targetPreparedStyles,
|
|
23
22
|
handoff,
|
|
24
23
|
escapeClipping,
|
|
25
24
|
config
|
|
@@ -36,8 +35,7 @@ export const useBoundaryMeasurement = ({
|
|
|
36
35
|
target,
|
|
37
36
|
method
|
|
38
37
|
}), [anchor, scaleMode, target, method]);
|
|
39
|
-
const
|
|
40
|
-
const preparedStyles = targetPreparedStyles ?? rootPreparedStyles;
|
|
38
|
+
const preparedStyles = useMemo(() => prepareStyleForBounds(style), [style]);
|
|
41
39
|
const measureBoundary = useMeasurer({
|
|
42
40
|
enabled,
|
|
43
41
|
boundTag,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","prepareStyleForBounds","useBoundaryPresence","useInitialDestinationMeasurement","useInitialSourceMeasurement","useRefreshBoundary","useMeasurer","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","
|
|
1
|
+
{"version":3,"names":["useMemo","prepareStyleForBounds","useBoundaryPresence","useInitialDestinationMeasurement","useInitialSourceMeasurement","useRefreshBoundary","useMeasurer","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","handoff","escapeClipping","config","anchor","scaleMode","target","method","boundaryConfig","preparedStyles","measureBoundary","measuredAnimatedRef"],"sourceRoot":"../../../../../src","sources":["components/boundary/hooks/use-boundary-measurement.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,OAAO;AAI/B,SAASC,qBAAqB,QAAQ,6CAA6C;AAEnF,SAASC,mBAAmB,QAAQ,oCAAoC;AACxE,SAASC,gCAAgC,QAAQ,kDAAkD;AACnG,SAASC,2BAA2B,QAAQ,6CAA6C;AACzF,SAASC,kBAAkB,QAAQ,mCAAmC;AACtE,SAASC,WAAW,QAAQ,gBAAgB;AAkB5C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGA,CAAC;EACtCC,QAAQ;EACRC,OAAO;EACPC,cAAc;EACdC,gBAAgB;EAChBC,WAAW;EACXC,KAAK;EACLC,OAAO;EACPC,cAAc;EACdC;AAC6B,CAAC,KAAK;EACnC,MAAM;IAAEC,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EACpD,MAAMK,cAAc,GAAGrB,OAAO,CAC7B,OAAO;IAAEiB,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,CAAC,EAC7C,CAACH,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,MAAM,CACnC,CAAC;EAED,MAAME,cAAc,GAAGtB,OAAO,CAAC,MAAMC,qBAAqB,CAACY,KAAK,CAAC,EAAE,CAACA,KAAK,CAAC,CAAC;EAE3E,MAAMU,eAAe,GAAGjB,WAAW,CAAC;IACnCG,OAAO;IACPD,QAAQ;IACRG,gBAAgB;IAChBW,cAAc;IACdE,mBAAmB,EAAEZ,WAAW;IAChCE,OAAO;IACPC;EACD,CAAC,CAAC;;EAEF;EACA;EACAb,mBAAmB,CAAC;IACnBO,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRG,gBAAgB;IAChBU,cAAc;IACdP,OAAO;IACPC;EACD,CAAC,CAAC;EAEFX,2BAA2B,CAAC;IAC3BK,OAAO,EAAEC,cAAc;IACvBa,eAAe;IACff;EACD,CAAC,CAAC;EAEFL,gCAAgC,CAAC;IAChCK,QAAQ;IACRC,OAAO,EAAEC,cAAc;IACvBK,cAAc;IACdQ;EACD,CAAC,CAAC;EAEFlB,kBAAkB,CAAC;IAClBI,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRe;EACD,CAAC,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { View } from "react-native";
|
|
5
|
+
import { Pressable } from "react-native-gesture-handler";
|
|
5
6
|
import { BoundaryTarget } from "./components/boundary-target";
|
|
6
7
|
import { createBoundaryComponent } from "./create-boundary-component";
|
|
7
8
|
import { Host } from "./portal";
|
|
@@ -38,7 +39,7 @@ Host.displayName = "Transition.Boundary.Host";
|
|
|
38
39
|
*
|
|
39
40
|
* Use:
|
|
40
41
|
* - `Boundary` for passive and pressable shared elements.
|
|
41
|
-
* - `Boundary.Target` to measure
|
|
42
|
+
* - `Boundary.Target` as a direct child to measure it instead of the root.
|
|
42
43
|
* - `Boundary.Host` to make clipping-escape host placement explicit.
|
|
43
44
|
*/
|
|
44
45
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","
|
|
1
|
+
{"version":3,"names":["forwardRef","View","Pressable","BoundaryTarget","createBoundaryComponent","Host","jsx","_jsx","BoundaryPrimitive","props","ref","Component","displayName","BoundaryRoot","BoundaryView","BoundaryTrigger","Boundary","Object","assign","Target","Trigger"],"sourceRoot":"../../../../src","sources":["components/boundary/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,SAAS,QAA6B,8BAA8B;AAC7E,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,uBAAuB,QAAQ,6BAA6B;AACrE,SAASC,IAAI,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGhC,SAASH,uBAAuB;AAOhC,MAAMI,iBAAiB,gBAAGR,UAAU,CACnC,CAACS,KAAK,EAAEC,GAAG,KAAK;EACf,MAAMC,SAAS,GAAG,SAAS,IAAIF,KAAK,GAAGP,SAAS,GAAGD,IAAI;EAEvD,oBAAOM,IAAA,CAACI,SAAS;IAAA,GAAMF,KAAK;IAAUC,GAAG,EAAEA;EAAW,CAAE,CAAC;AAC1D,CACD,CAAC;AAEDF,iBAAiB,CAACI,WAAW,GAAG,+BAA+B;AAE/D,MAAMC,YAAY,GAAGT,uBAAuB,CAACI,iBAAiB,CAAC;AAC/D,MAAMM,YAAY,GAAGV,uBAAuB,CAACH,IAAI,CAAC;AAClD,MAAMc,eAAe,GAAGX,uBAAuB,CAACF,SAAS,CAAC;AAC1DW,YAAY,CAACD,WAAW,GAAG,qBAAqB;AAChDE,YAAY,CAACF,WAAW,GAAG,0BAA0B;AACrDG,eAAe,CAACH,WAAW,GAAG,6BAA6B;AAC3DT,cAAc,CAACS,WAAW,GAAG,4BAA4B;AACzDP,IAAI,CAACO,WAAW,GAAG,0BAA0B;;AAI7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAsBA,OAAO,MAAMI,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAACL,YAAY,EAAE;EACnDM,MAAM,EAAEhB,cAAc;EACtBE,IAAI;EACJJ,IAAI,EAAEa,YAAY;EAClBM,OAAO,EAAEL;AACV,CAAC,CAAsB","ignoreList":[]}
|
package/lib/module/components/boundary/portal/components/boundary-content-portal/components/host.js
CHANGED
|
@@ -29,7 +29,11 @@ export const BoundaryContentPortalHost = /*#__PURE__*/memo(function BoundaryCont
|
|
|
29
29
|
});
|
|
30
30
|
const styles = StyleSheet.create({
|
|
31
31
|
host: {
|
|
32
|
-
|
|
32
|
+
position: "absolute",
|
|
33
|
+
top: 0,
|
|
34
|
+
right: 0,
|
|
35
|
+
bottom: 0,
|
|
36
|
+
left: 0,
|
|
33
37
|
overflow: "visible"
|
|
34
38
|
}
|
|
35
39
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","StyleSheet","Animated","NativePortalHost","PORTAL_POINTER_EVENTS","createBoundaryContentPortalHostName","Fragment","_Fragment","jsx","_jsx","jsxs","_jsxs","AnimatedPortalHost","createAnimatedComponent","BoundaryContentPortalHost","boundaryId","children","enabled","screenKey","portalHostName","name","pointerEvents","style","styles","host","create","
|
|
1
|
+
{"version":3,"names":["memo","StyleSheet","Animated","NativePortalHost","PORTAL_POINTER_EVENTS","createBoundaryContentPortalHostName","Fragment","_Fragment","jsx","_jsx","jsxs","_jsxs","AnimatedPortalHost","createAnimatedComponent","BoundaryContentPortalHost","boundaryId","children","enabled","screenKey","portalHostName","name","pointerEvents","style","styles","host","create","position","top","right","bottom","left","overflow"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/components/host.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAwB,OAAO;AAC5C,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,gBAAgB,EAAEC,qBAAqB,QAAQ,mBAAmB;AAC3E,SAASC,mCAAmC,QAAQ,sBAAsB;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3E,MAAMC,kBAAkB,GAAGT,gBAAgB,GACxCD,QAAQ,CAACW,uBAAuB,CAACV,gBAAgB,CAAC,GAClD,IAAI;AASP,OAAO,MAAMW,yBAAyB,gBAAGd,IAAI,CAC5C,SAASc,yBAAyBA,CAAC;EAClCC,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC;AAC+B,CAAC,EAAE;EAClC,IAAI,CAACD,OAAO,IAAI,CAACL,kBAAkB,EAAE;IACpC,oBAAOH,IAAA,CAAAF,SAAA;MAAAS,QAAA,EAAGA;IAAQ,CAAG,CAAC;EACvB;EAEA,MAAMG,cAAc,GAAGd,mCAAmC,CACzDa,SAAS,EACTH,UACD,CAAC;EAED,oBACCJ,KAAA,CAAAJ,SAAA;IAAAS,QAAA,GACEA,QAAQ,eACTP,IAAA,CAACG,kBAAkB;MAClBQ,IAAI,EAAED,cAAe;MACrBE,aAAa,EAAEjB,qBAAsB;MACrCkB,KAAK,EAAEC,MAAM,CAACC;IAAK,CACnB,CAAC;EAAA,CACD,CAAC;AAEL,CACD,CAAC;AAED,MAAMD,MAAM,GAAGtB,UAAU,CAACwB,MAAM,CAAC;EAChCD,IAAI,EAAE;IACLE,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACX;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,220 +1,79 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { useAnimatedProps, useAnimatedReaction, useSharedValue } from "react-native-reanimated";
|
|
5
|
-
import { scheduleOnRN } from "react-native-worklets";
|
|
3
|
+
import { useAnimatedProps, useSharedValue } from "react-native-reanimated";
|
|
6
4
|
import { useDescriptorsStore } from "../../../../../../providers/screen/descriptors";
|
|
7
5
|
import { useScreenSlots } from "../../../../../../providers/screen/styles";
|
|
8
|
-
import {
|
|
6
|
+
import { hasCloseTransitionFinished } from "../../../../../../providers/screen/styles/helpers/transition-visual-state";
|
|
9
7
|
import { AnimationStore } from "../../../../../../stores/animation.store";
|
|
10
|
-
import { getSourceScreenKeyFromPairKey } from "../../../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
11
8
|
import { pairs } from "../../../../../../stores/bounds/internals/state";
|
|
9
|
+
import { SystemStore } from "../../../../../../stores/system.store";
|
|
10
|
+
import { resolveEnteringHandoffTarget } from "../../../utils/handoff-target";
|
|
12
11
|
import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../utils/naming";
|
|
13
|
-
import {
|
|
14
|
-
import { shallowEqual } from "../../../utils/shallow-equal";
|
|
15
|
-
import { shouldAttachBoundaryPortal } from "../../../utils/teleport-control";
|
|
16
|
-
import { resolveNextVisiblePortalHostName } from "../../../utils/visible-host";
|
|
12
|
+
import { isTeleportEnabled } from "../../../utils/teleport-control";
|
|
17
13
|
import { createBoundaryContentPortalHostName } from "../helpers/host-name";
|
|
18
14
|
export const useBoundaryContentPortalAttachment = ({
|
|
19
|
-
boundaryId
|
|
20
|
-
enabled
|
|
15
|
+
boundaryId
|
|
21
16
|
}) => {
|
|
22
|
-
const
|
|
17
|
+
const {
|
|
18
|
+
slotsMap
|
|
19
|
+
} = useScreenSlots();
|
|
23
20
|
const sourcePairKey = useDescriptorsStore(s => s.derivations.sourcePairKey);
|
|
24
21
|
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const {
|
|
30
|
-
nextInterpolatorReady: activeNextInterpolatorReady,
|
|
31
|
-
slotsMap: activeSlotsMap
|
|
32
|
-
} = activeScreenSlots;
|
|
33
|
-
const requestedPortalHostName = useSharedValue(null);
|
|
34
|
-
const visiblePortalHostName = useSharedValue(null);
|
|
35
|
-
const canSwitchPortalHostImmediately = useSharedValue(0);
|
|
36
|
-
const targetScreenKey = ownership ? ownership.hostScreenKey : null;
|
|
37
|
-
const settledHostScreenKey = ownership?.hostScreenKey ?? null;
|
|
38
|
-
const settledHostProgress = AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "progressSettled");
|
|
39
|
-
const settledHostAnimating = AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "progressAnimating");
|
|
40
|
-
const settledHostWillAnimate = AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "willAnimate");
|
|
41
|
-
const settledHostClosing = AnimationStore.getValue(settledHostScreenKey ?? currentScreenKey, "closing");
|
|
42
|
-
const handoffHostName = targetScreenKey !== null ? createBoundaryContentPortalHostName(targetScreenKey, boundaryId) : null;
|
|
43
|
-
const updatePortalOwnership = useCallback((hostScreenKey, ownerPairKey, ownerScreenKey) => {
|
|
44
|
-
if (hostScreenKey && ownerPairKey && ownerScreenKey) {
|
|
45
|
-
setOwnership(current => {
|
|
46
|
-
if (current?.hostScreenKey === hostScreenKey && current.ownerPairKey === ownerPairKey && current.ownerScreenKey === ownerScreenKey) {
|
|
47
|
-
return current;
|
|
48
|
-
}
|
|
49
|
-
return {
|
|
50
|
-
hostScreenKey,
|
|
51
|
-
ownerPairKey,
|
|
52
|
-
ownerScreenKey,
|
|
53
|
-
status: "complete"
|
|
54
|
-
};
|
|
55
|
-
});
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
setOwnership(current => current ? null : current);
|
|
59
|
-
}, []);
|
|
60
|
-
useLayoutEffect(() => {
|
|
61
|
-
if (!enabled || !ownership || !handoffHostName) {
|
|
62
|
-
requestedPortalHostName.set(null);
|
|
63
|
-
visiblePortalHostName.set(null);
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
requestedPortalHostName.set(handoffHostName);
|
|
67
|
-
}, [enabled, handoffHostName, ownership, requestedPortalHostName, visiblePortalHostName]);
|
|
68
|
-
useLayoutEffect(() => {
|
|
69
|
-
return () => {
|
|
70
|
-
requestedPortalHostName.set(null);
|
|
71
|
-
visiblePortalHostName.set(null);
|
|
72
|
-
};
|
|
73
|
-
}, [requestedPortalHostName, visiblePortalHostName]);
|
|
74
|
-
useAnimatedReaction(() => {
|
|
75
|
-
"worklet";
|
|
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");
|
|
76
26
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
ownerScreenKey: null,
|
|
82
|
-
status: "clear"
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
const progressAnimating = settledHostAnimating.get();
|
|
86
|
-
const progressSettled = settledHostProgress.get();
|
|
87
|
-
const willAnimate = settledHostWillAnimate.get();
|
|
88
|
-
const closing = settledHostClosing.get();
|
|
89
|
-
const isOwnedHostClosing = !!closing && !!ownership && settledHostScreenKey === ownership.hostScreenKey;
|
|
90
|
-
if (isOwnedHostClosing && ownership) {
|
|
91
|
-
const isClosingComplete = isHandoffHostClosingComplete({
|
|
92
|
-
closing,
|
|
93
|
-
progressAnimating,
|
|
94
|
-
progressSettled,
|
|
95
|
-
willAnimate
|
|
96
|
-
});
|
|
97
|
-
if (!isClosingComplete) {
|
|
98
|
-
return ownership;
|
|
99
|
-
}
|
|
100
|
-
const sourceScreenKey = getSourceScreenKeyFromPairKey(ownership.ownerPairKey);
|
|
101
|
-
return {
|
|
102
|
-
hostScreenKey: sourceScreenKey,
|
|
103
|
-
ownerPairKey: ownership.ownerPairKey,
|
|
104
|
-
ownerScreenKey: sourceScreenKey,
|
|
105
|
-
status: "complete"
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
if (!sourcePairKey) {
|
|
109
|
-
return {
|
|
110
|
-
hostScreenKey: null,
|
|
111
|
-
ownerPairKey: sourcePairKey,
|
|
112
|
-
ownerScreenKey: null,
|
|
113
|
-
status: "clear"
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
return resolveBoundaryPortalOwnership({
|
|
117
|
-
boundaryId,
|
|
118
|
-
currentScreenKey,
|
|
119
|
-
handoff: true,
|
|
120
|
-
isSettledHostClosingComplete: isHandoffHostClosingComplete({
|
|
121
|
-
closing,
|
|
122
|
-
progressAnimating,
|
|
123
|
-
progressSettled,
|
|
124
|
-
willAnimate
|
|
125
|
-
}),
|
|
126
|
-
isSettledHostReady: progressSettled === 1 && progressAnimating === 0,
|
|
127
|
-
pairsState: pairs.get(),
|
|
128
|
-
settledHostScreenKey,
|
|
129
|
-
sourcePairKey
|
|
130
|
-
});
|
|
131
|
-
}, (signal, previousSignal) => {
|
|
132
|
-
"worklet";
|
|
133
|
-
|
|
134
|
-
if (shallowEqual(previousSignal, signal)) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
if (signal.status === "pending") {
|
|
138
|
-
canSwitchPortalHostImmediately.set(0);
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
const hostScreenKey = signal.status === "complete" ? signal.hostScreenKey : null;
|
|
142
|
-
let previousOwnerPairKey;
|
|
143
|
-
if (previousSignal?.status === "complete") {
|
|
144
|
-
previousOwnerPairKey = previousSignal.ownerPairKey ?? undefined;
|
|
145
|
-
}
|
|
146
|
-
const canSwitchImmediately = canSwitchHandoffHostImmediately({
|
|
147
|
-
hostScreenKey,
|
|
148
|
-
ownerPairKey: signal.status === "complete" ? signal.ownerPairKey : undefined,
|
|
149
|
-
previousOwnerPairKey
|
|
150
|
-
});
|
|
151
|
-
canSwitchPortalHostImmediately.set(canSwitchImmediately ? 1 : 0);
|
|
152
|
-
if (canSwitchImmediately && hostScreenKey) {
|
|
153
|
-
const hostName = createBoundaryContentPortalHostName(hostScreenKey, boundaryId);
|
|
154
|
-
requestedPortalHostName.set(hostName);
|
|
155
|
-
visiblePortalHostName.set(hostName);
|
|
156
|
-
}
|
|
157
|
-
scheduleOnRN(updatePortalOwnership, signal.hostScreenKey, signal.ownerPairKey, signal.ownerScreenKey ?? undefined);
|
|
158
|
-
});
|
|
159
|
-
useAnimatedReaction(() => {
|
|
160
|
-
"worklet";
|
|
161
|
-
|
|
162
|
-
const slot = activeSlotsMap.get()[boundaryId];
|
|
163
|
-
const teleport = slot?.props?.teleport;
|
|
164
|
-
const shouldTeleport = shouldAttachBoundaryPortal({
|
|
165
|
-
enabled,
|
|
166
|
-
teleport
|
|
167
|
-
});
|
|
168
|
-
const requestedName = requestedPortalHostName.get();
|
|
169
|
-
const visibleName = visiblePortalHostName.get();
|
|
170
|
-
const isInterpolatorReady = activeNextInterpolatorReady.get();
|
|
171
|
-
const nextVisibleName = resolveNextVisiblePortalHostName({
|
|
172
|
-
canSwitchImmediately: canSwitchPortalHostImmediately.get() === 1,
|
|
173
|
-
isInterpolatorReady: isInterpolatorReady === 1,
|
|
174
|
-
requestedName,
|
|
175
|
-
shouldTeleport,
|
|
176
|
-
visibleName
|
|
177
|
-
});
|
|
178
|
-
return {
|
|
179
|
-
isInterpolatorReady,
|
|
180
|
-
nextVisibleName,
|
|
181
|
-
requestedName,
|
|
182
|
-
shouldTeleport,
|
|
183
|
-
teleport,
|
|
184
|
-
visibleName
|
|
185
|
-
};
|
|
186
|
-
}, (state, previousState) => {
|
|
187
|
-
"worklet";
|
|
188
|
-
|
|
189
|
-
if (shallowEqual(previousState, state)) {
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
if (state.nextVisibleName !== state.visibleName) {
|
|
193
|
-
visiblePortalHostName.set(state.nextVisibleName);
|
|
194
|
-
}
|
|
195
|
-
});
|
|
27
|
+
// `nextScreenKey` can change while the previously attached destination is
|
|
28
|
+
// still closing. Retain that destination's lifecycle shared values so this
|
|
29
|
+
// payload follows the screen that actually hosts it, not the newest route.
|
|
30
|
+
const attachedDestination = useSharedValue(null);
|
|
196
31
|
const teleportProps = useAnimatedProps(() => {
|
|
197
32
|
"worklet";
|
|
198
33
|
|
|
199
|
-
const slot =
|
|
34
|
+
const slot = slotsMap.get()[boundaryId];
|
|
200
35
|
const {
|
|
201
36
|
pointerEvents: _pointerEvents,
|
|
202
37
|
teleport,
|
|
203
38
|
...slotProps
|
|
204
39
|
} = slot?.props ?? {};
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
|
|
40
|
+
const animationProgress = destinationAnimationProgress.get();
|
|
41
|
+
const shouldTeleport = isTeleportEnabled(teleport);
|
|
42
|
+
const pairsState = pairs.get();
|
|
43
|
+
const enteringTargetScreenKey = shouldTeleport ? resolveEnteringHandoffTarget({
|
|
44
|
+
animationProgress,
|
|
45
|
+
boundaryId,
|
|
46
|
+
currentScreenKey,
|
|
47
|
+
pairsState,
|
|
48
|
+
sourcePairKey
|
|
49
|
+
}) : null;
|
|
50
|
+
if (enteringTargetScreenKey) {
|
|
51
|
+
// A valid entering pair is the only event that replaces the current
|
|
52
|
+
// attachment and its lifecycle owner.
|
|
53
|
+
attachedDestination.set({
|
|
54
|
+
animationProgress: destinationAnimationProgress,
|
|
55
|
+
closing: destinationClosing,
|
|
56
|
+
screenKey: enteringTargetScreenKey
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
const attached = attachedDestination.get();
|
|
60
|
+
const hasAttachedCloseFinished = attached !== null && hasCloseTransitionFinished({
|
|
61
|
+
animationProgress: attached.animationProgress.get(),
|
|
62
|
+
closing: attached.closing.get()
|
|
208
63
|
});
|
|
209
|
-
|
|
64
|
+
|
|
65
|
+
// Missing or changing pairs do not imply a return: keep the current host
|
|
66
|
+
// until its own screen visually closes. At that point, target the source
|
|
67
|
+
// host explicitly instead of `null` so Teleport restores source dimensions.
|
|
68
|
+
const targetScreenKey = enteringTargetScreenKey ? enteringTargetScreenKey : shouldTeleport ? hasAttachedCloseFinished ? currentScreenKey : attached?.screenKey ?? null : null;
|
|
69
|
+
const targetHostName = targetScreenKey ? createBoundaryContentPortalHostName(targetScreenKey, boundaryId) : PORTAL_HOST_NAME_RESET_VALUE;
|
|
210
70
|
return {
|
|
211
71
|
...slotProps,
|
|
212
|
-
hostName:
|
|
72
|
+
hostName: targetHostName
|
|
213
73
|
};
|
|
214
74
|
});
|
|
215
75
|
return {
|
|
216
|
-
teleportProps
|
|
217
|
-
visiblePortalHostName
|
|
76
|
+
teleportProps
|
|
218
77
|
};
|
|
219
78
|
};
|
|
220
79
|
//# sourceMappingURL=use-boundary-content-portal-attachment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useAnimatedProps","useSharedValue","useDescriptorsStore","useScreenSlots","hasCloseTransitionFinished","AnimationStore","pairs","SystemStore","resolveEnteringHandoffTarget","PORTAL_HOST_NAME_RESET_VALUE","isTeleportEnabled","createBoundaryContentPortalHostName","useBoundaryContentPortalAttachment","boundaryId","slotsMap","sourcePairKey","s","derivations","currentScreenKey","nextScreenKey","destinationScreenKey","destinationAnimationProgress","getValue","destinationClosing","attachedDestination","teleportProps","slot","get","pointerEvents","_pointerEvents","teleport","slotProps","props","animationProgress","shouldTeleport","pairsState","enteringTargetScreenKey","set","closing","screenKey","attached","hasAttachedCloseFinished","targetScreenKey","targetHostName","hostName"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts"],"mappings":";;AAAA,SAECA,gBAAgB,EAChBC,cAA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C,CAAC;EAEF,OAAO;IAAElB;EAAc,CAAC;AACzB,CAAC","ignoreList":[]}
|
|
@@ -8,27 +8,35 @@ import { useBoundaryContentPortalAttachment } from "./hooks/use-boundary-content
|
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export { BoundaryContentPortalHost } from "./components/host";
|
|
10
10
|
const AnimatedNativePortal = NativePortal ? Animated.createAnimatedComponent(NativePortal) : null;
|
|
11
|
+
const EnabledNativePortal = AnimatedNativePortal;
|
|
11
12
|
export const BoundaryContentPortal = /*#__PURE__*/memo(function BoundaryContentPortal({
|
|
12
13
|
boundaryId,
|
|
13
14
|
children,
|
|
14
15
|
enabled
|
|
15
16
|
}) {
|
|
16
|
-
|
|
17
|
+
if (!enabled || boundaryId === undefined || !isTeleportAvailable || !AnimatedNativePortal) {
|
|
18
|
+
return children;
|
|
19
|
+
}
|
|
20
|
+
return /*#__PURE__*/_jsx(EnabledBoundaryContentPortal, {
|
|
21
|
+
boundaryId: boundaryId,
|
|
22
|
+
children: children
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
const EnabledBoundaryContentPortal = /*#__PURE__*/memo(function EnabledBoundaryContentPortal({
|
|
26
|
+
boundaryId,
|
|
27
|
+
children
|
|
28
|
+
}) {
|
|
17
29
|
const {
|
|
18
30
|
teleportProps
|
|
19
31
|
} = useBoundaryContentPortalAttachment({
|
|
20
|
-
boundaryId
|
|
21
|
-
|
|
32
|
+
boundaryId
|
|
33
|
+
});
|
|
34
|
+
return /*#__PURE__*/_jsx(EnabledNativePortal, {
|
|
35
|
+
animatedProps: teleportProps,
|
|
36
|
+
name: boundaryId,
|
|
37
|
+
pointerEvents: PORTAL_POINTER_EVENTS,
|
|
38
|
+
style: StyleSheet.absoluteFill,
|
|
39
|
+
children: children
|
|
22
40
|
});
|
|
23
|
-
if (shouldEnablePortal && isTeleportAvailable && AnimatedNativePortal) {
|
|
24
|
-
return /*#__PURE__*/_jsx(AnimatedNativePortal, {
|
|
25
|
-
animatedProps: teleportProps,
|
|
26
|
-
name: boundaryId,
|
|
27
|
-
pointerEvents: PORTAL_POINTER_EVENTS,
|
|
28
|
-
style: StyleSheet.absoluteFill,
|
|
29
|
-
children: children
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
return children;
|
|
33
41
|
});
|
|
34
42
|
//# sourceMappingURL=index.js.map
|
package/lib/module/components/boundary/portal/components/boundary-content-portal/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","StyleSheet","Animated","isTeleportAvailable","NativePortal","PORTAL_POINTER_EVENTS","useBoundaryContentPortalAttachment","jsx","_jsx","BoundaryContentPortalHost","AnimatedNativePortal","createAnimatedComponent","BoundaryContentPortal","boundaryId","children","enabled","
|
|
1
|
+
{"version":3,"names":["memo","StyleSheet","Animated","isTeleportAvailable","NativePortal","PORTAL_POINTER_EVENTS","useBoundaryContentPortalAttachment","jsx","_jsx","BoundaryContentPortalHost","AnimatedNativePortal","createAnimatedComponent","EnabledNativePortal","BoundaryContentPortal","boundaryId","children","enabled","undefined","EnabledBoundaryContentPortal","teleportProps","animatedProps","name","pointerEvents","style","absoluteFill"],"sourceRoot":"../../../../../../../src","sources":["components/boundary/portal/components/boundary-content-portal/index.tsx"],"mappings":";;AAAA,SAGCA,IAAI,QAEE,OAAO;AACd,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SACCC,mBAAmB,EACnBC,YAAY,EACZC,qBAAqB,QACf,gBAAgB;AACvB,SAASC,kCAAkC,QAAQ,gDAAgD;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEpG,SAASC,yBAAyB,QAAQ,mBAAmB;AAe7D,MAAMC,oBAAoB,GAAGN,YAAY,GACtCF,QAAQ,CAACS,uBAAuB,CAChCP,YACD,CAAC,GACA,IAAI;AACP,MAAMQ,mBAAmB,GAAGF,oBAE3B;AAED,OAAO,MAAMG,qBAAqB,gBAAGb,IAAI,CAAC,SAASa,qBAAqBA,CAAC;EACxEC,UAAU;EACVC,QAAQ;EACRC;AAC2B,CAAC,EAAE;EAC9B,IACC,CAACA,OAAO,IACRF,UAAU,KAAKG,SAAS,IACxB,CAACd,mBAAmB,IACpB,CAACO,oBAAoB,EACpB;IACD,OAAOK,QAAQ;EAChB;EAEA,oBACCP,IAAA,CAACU,4BAA4B;IAACJ,UAAU,EAAEA,UAAW;IAAAC,QAAA,EACnDA;EAAQ,CACoB,CAAC;AAEjC,CAAC,CAAC;AAEF,MAAMG,4BAA4B,gBAAGlB,IAAI,CACxC,SAASkB,4BAA4BA,CAAC;EACrCJ,UAAU;EACVC;AACqE,CAAC,EAAE;EACxE,MAAM;IAAEI;EAAc,CAAC,GAAGb,kCAAkC,CAAC;IAC5DQ;EACD,CAAC,CAAC;EAEF,oBACCN,IAAA,CAACI,mBAAmB;IACnBQ,aAAa,EAAED,aAAc;IAC7BE,IAAI,EAAEP,UAAW;IACjBQ,aAAa,EAAEjB,qBAAsB;IACrCkB,KAAK,EAAEtB,UAAU,CAACuB,YAAa;IAAAT,QAAA,EAE9BA;EAAQ,CACW,CAAC;AAExB,CACD,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { memo,
|
|
3
|
+
import { memo, useLayoutEffect, useRef } from "react";
|
|
4
4
|
import { StyleSheet, useWindowDimensions, View } from "react-native";
|
|
5
5
|
import Animated from "react-native-reanimated";
|
|
6
6
|
import { useDescriptorsStore } from "../../../../../../providers/screen/descriptors";
|
|
7
7
|
import { useScreenSlots } from "../../../../../../providers/screen/styles";
|
|
8
|
-
import { SystemStore } from "../../../../../../stores/system.store";
|
|
9
8
|
import { PORTAL_POINTER_EVENTS } from "../../../teleport";
|
|
10
9
|
import { useHostMeasurement } from "../hooks/use-host-measurement";
|
|
11
10
|
import { registerHost, unregisterHost } from "../stores/host-registry.store";
|
|
@@ -18,9 +17,6 @@ function HostImpl({
|
|
|
18
17
|
style
|
|
19
18
|
}) {
|
|
20
19
|
const screenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
21
|
-
const {
|
|
22
|
-
unblockLifecycleStart
|
|
23
|
-
} = SystemStore.getBag(screenKey).actions;
|
|
24
20
|
const generatedHostKeyRef = useRef(null);
|
|
25
21
|
if (generatedHostKeyRef.current === null) {
|
|
26
22
|
generatedHostKeyRef.current = `${screenKey}-host-${nextHostId++}`;
|
|
@@ -46,7 +42,6 @@ function HostImpl({
|
|
|
46
42
|
});
|
|
47
43
|
useLayoutEffect(() => {
|
|
48
44
|
registerHost({
|
|
49
|
-
capturesScroll,
|
|
50
45
|
fallback,
|
|
51
46
|
hostKey,
|
|
52
47
|
screenKey
|
|
@@ -54,19 +49,13 @@ function HostImpl({
|
|
|
54
49
|
return () => {
|
|
55
50
|
unregisterHost(screenKey, hostKey);
|
|
56
51
|
};
|
|
57
|
-
}, [
|
|
58
|
-
const handleUnblocking = useCallback(() => {
|
|
59
|
-
// Each destination boundary contributes one lifecycle start block. Release
|
|
60
|
-
// only this host's block so unrelated boundary and user blocks stay intact.
|
|
61
|
-
unblockLifecycleStart();
|
|
62
|
-
}, [unblockLifecycleStart]);
|
|
52
|
+
}, [fallback, hostKey, screenKey]);
|
|
63
53
|
const boundaryHosts = measurement.canRenderHosts ? activeBoundaryHosts.map(host => /*#__PURE__*/_jsx(View, {
|
|
64
54
|
pointerEvents: PORTAL_POINTER_EVENTS,
|
|
65
55
|
style: [styles.boundaryHostViewport, {
|
|
66
56
|
width: viewportWidth,
|
|
67
57
|
height: viewportHeight
|
|
68
58
|
}],
|
|
69
|
-
onLayout: handleUnblocking,
|
|
70
59
|
children: /*#__PURE__*/_jsx(PortalBoundaryHost, {
|
|
71
60
|
host: host,
|
|
72
61
|
style: StyleSheet.absoluteFill
|
package/lib/module/components/boundary/portal/components/boundary-portal/components/host.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","
|
|
1
|
+
{"version":3,"names":["memo","useLayoutEffect","useRef","StyleSheet","useWindowDimensions","View","Animated","useDescriptorsStore","useScreenSlots","PORTAL_POINTER_EVENTS","useHostMeasurement","registerHost","unregisterHost","useActivePortalBoundaryHosts","PortalBoundaryHost","jsx","_jsx","nextHostId","HostImpl","fallback","style","screenKey","s","derivations","currentScreenKey","generatedHostKeyRef","current","hostKey","capturesScroll","activeBoundaryHosts","visibilityBlocked","height","viewportHeight","width","viewportWidth","measurement","enabled","length","boundaryHosts","canRenderHosts","map","host","pointerEvents","styles","boundaryHostViewport","children","absoluteFill","portalHostName","ref","hostRef","collapsable","Host","props","ScreenFallbackHost","create","elevation","left","overflow","position","top","zIndex"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/components/host.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,eAAe,EAAEC,MAAM,QAAQ,OAAO;AACrD,SAECC,UAAU,EACVC,mBAAmB,EACnBC,IAAI,QAEE,cAAc;AACrB,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,mBAAmB,QAAQ,gDAAgD;AACpF,SAASC,cAAc,QAAQ,2CAA2C;AAC1E,SAASC,qBAAqB,QAAQ,mBAAmB;AACzD,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,SAASC,YAAY,EAAEC,cAAc,QAAQ,+BAA+B;AAC5E,SAASC,4BAA4B,QAAQ,sCAAsC;AACnF,SAASC,kBAAkB,QAAQ,wBAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5D,IAAIC,UAAU,GAAG,CAAC;AAUlB,SAASC,QAAQA,CAAC;EAAEC,QAAQ,GAAG,KAAK;EAAEC;AAAqB,CAAC,EAAE;EAC7D,MAAMC,SAAS,GAAGd,mBAAmB,CAAEe,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,gBAAgB,CAAC;EAC5E,MAAMC,mBAAmB,GAAGvB,MAAM,CAAgB,IAAI,CAAC;EAEvD,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