react-native-screen-transitions 3.9.0-alpha.1 → 3.9.0-alpha.3
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/components/boundary/components/boundary-target.js +21 -16
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js +88 -114
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/{use-boundary-presence.js → lifecycles/use-boundary-presence.js} +14 -7
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +51 -24
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +7 -10
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +10 -7
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +82 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +10 -13
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/index.js +27 -30
- package/lib/commonjs/shared/components/boundary/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js +58 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/host.js +20 -4
- package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js +53 -32
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js +206 -96
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js +14 -2
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js +5 -44
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js +37 -5
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/teleport.js +15 -2
- package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js +18 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +10 -3
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js +28 -49
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +254 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js +38 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js +29 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +10 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js +25 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +65 -0
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +12 -2
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +0 -21
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js +4 -9
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +1 -1
- package/lib/commonjs/shared/components/create-transition-aware-component.js +2 -20
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +1 -1
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +2 -14
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +4 -16
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +4 -15
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +4 -16
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -1
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +6 -3
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +143 -24
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/screen-composer.js +1 -1
- package/lib/commonjs/shared/providers/screen/screen-composer.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js +95 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
- package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js +32 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +16 -11
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js +1 -20
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js +1 -11
- package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js +96 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +36 -36
- 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 +1 -19
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +8 -3
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/index.js +38 -7
- package/lib/commonjs/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/{styles.provider.js → slot.provider.js} +34 -21
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +53 -0
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +37 -2
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/entries.js +11 -4
- package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +134 -51
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +1 -3
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/system.store.js +5 -0
- package/lib/commonjs/shared/stores/system.store.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +10 -69
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js +59 -0
- package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +8 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js +59 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/commonjs/shared/utils/logger.js +11 -0
- package/lib/commonjs/shared/utils/logger.js.map +1 -1
- package/lib/module/shared/components/boundary/components/boundary-target.js +19 -14
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/shared/components/boundary/create-boundary-component.js +93 -119
- package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js +30 -0
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +51 -24
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +7 -10
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +10 -7
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +77 -0
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/use-measurer.js +10 -13
- package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/boundary/index.js +27 -30
- package/lib/module/shared/components/boundary/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js +53 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/host.js +21 -5
- package/lib/module/shared/components/boundary/portal/components/host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js +53 -32
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/portal.js +213 -103
- package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js +15 -3
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js +4 -41
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js +35 -4
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/teleport.js +16 -2
- package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js +13 -0
- package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/naming.js +8 -2
- package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js +29 -49
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/ownership.js +246 -0
- package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js +33 -0
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js +24 -0
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +8 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js +20 -0
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +57 -0
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -0
- package/lib/module/shared/components/boundary/utils/destination-signals.js +12 -2
- package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/refresh-signals.js +0 -21
- package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/source-signals.js +4 -9
- package/lib/module/shared/components/boundary/utils/source-signals.js.map +1 -1
- package/lib/module/shared/components/create-transition-aware-component.js +4 -22
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/float-overlay.js +2 -2
- package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js +4 -16
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +4 -16
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +5 -16
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/surface-container.js +4 -16
- package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +6 -3
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +144 -25
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/screen-composer.js +2 -2
- package/lib/module/shared/providers/screen/screen-composer.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js +89 -0
- package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
- package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js +26 -0
- package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +16 -11
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js +0 -18
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js +0 -9
- package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js +87 -0
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +36 -36
- 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 +1 -19
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +9 -4
- package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/index.js +2 -1
- package/lib/module/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/slot.provider.js +66 -0
- package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +47 -0
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +33 -1
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/entries.js +11 -4
- package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +135 -53
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +1 -3
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/system.store.js +5 -0
- package/lib/module/shared/stores/system.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js +10 -69
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js +52 -0
- package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +9 -2
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js +58 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/module/shared/utils/logger.js +11 -0
- package/lib/module/shared/utils/logger.js.map +1 -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 +0 -1
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts +11 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +10 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts +10 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +28 -0
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +5 -6
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/index.d.ts +36 -229
- package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +4 -3
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts +0 -7
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts +16 -1
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts +3 -0
- package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +2 -1
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts +16 -32
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +35 -0
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +4 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +37 -0
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/types.d.ts +9 -36
- package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts +1 -0
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts +0 -1
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.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/content.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-container/layers/surface-container.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +3 -215
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +3 -3
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts +4 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts +16 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts +3 -4
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.d.ts +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts +11 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +4 -6
- 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 +0 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/index.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +18 -0
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts +6 -0
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +8 -1
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +4 -3
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +22 -20
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/stores/system.store.d.ts +1 -0
- package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +7 -1
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts +6 -0
- package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts +9 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/utils/logger.d.ts +6 -0
- package/lib/typescript/shared/utils/logger.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/components/boundary/components/boundary-target.tsx +30 -16
- package/src/shared/components/boundary/create-boundary-component.tsx +132 -164
- package/src/shared/components/boundary/hooks/lifecycles/use-boundary-presence.ts +41 -0
- package/src/shared/components/boundary/hooks/{use-initial-destination-measurement.ts → lifecycles/use-initial-destination-measurement.ts} +65 -22
- package/src/shared/components/boundary/hooks/{use-initial-source-measurement.ts → lifecycles/use-initial-source-measurement.ts} +10 -12
- package/src/shared/components/boundary/hooks/{use-refresh-boundary.ts → lifecycles/use-refresh-boundary.ts} +10 -10
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +97 -0
- package/src/shared/components/boundary/hooks/use-measurer.ts +16 -24
- package/src/shared/components/boundary/index.tsx +56 -30
- package/src/shared/components/boundary/portal/components/boundary-local-portal-host.tsx +66 -0
- package/src/shared/components/boundary/portal/components/host.tsx +20 -5
- package/src/shared/components/boundary/portal/components/portal-boundary-host.tsx +67 -52
- package/src/shared/components/boundary/portal/components/portal.tsx +281 -120
- package/src/shared/components/boundary/portal/hooks/use-host-measurement.ts +23 -2
- package/src/shared/components/boundary/portal/stores/host-registry.store.ts +4 -51
- package/src/shared/components/boundary/portal/stores/portal-boundary-host.store.ts +59 -6
- package/src/shared/components/boundary/portal/teleport.ts +28 -3
- package/src/shared/components/boundary/portal/utils/has-local-slot.ts +16 -0
- package/src/shared/components/boundary/portal/utils/naming.ts +11 -1
- package/src/shared/components/boundary/portal/utils/offset-style.ts +37 -139
- package/src/shared/components/boundary/portal/utils/ownership.ts +371 -0
- package/src/shared/components/boundary/portal/utils/resolve-portal.ts +50 -0
- package/src/shared/components/boundary/portal/utils/shallow-equal.ts +25 -0
- package/src/shared/components/boundary/portal/utils/teleport-control.ts +12 -0
- package/src/shared/components/boundary/portal/utils/visible-host.ts +24 -0
- package/src/shared/components/boundary/providers/{boundary-owner.provider.tsx → boundary-root.provider.tsx} +33 -47
- package/src/shared/components/boundary/types.ts +9 -39
- package/src/shared/components/boundary/utils/destination-signals.ts +22 -2
- package/src/shared/components/boundary/utils/refresh-signals.ts +0 -41
- package/src/shared/components/boundary/utils/source-signals.ts +5 -17
- package/src/shared/components/create-transition-aware-component.tsx +3 -25
- package/src/shared/components/overlay/variations/float-overlay.tsx +3 -3
- package/src/shared/components/screen-container/layers/backdrop.tsx +4 -17
- package/src/shared/components/screen-container/layers/content.tsx +4 -16
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +8 -18
- package/src/shared/components/screen-container/layers/surface-container.tsx +4 -17
- package/src/shared/index.ts +0 -5
- package/src/shared/providers/helpers/measured-bounds-writes.ts +6 -11
- package/src/shared/providers/screen/animation/helpers/derivations.ts +3 -0
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +251 -68
- package/src/shared/providers/screen/screen-composer.tsx +3 -3
- package/src/shared/providers/screen/styles/helpers/compose-slot-style.ts +129 -0
- package/src/shared/providers/screen/styles/helpers/normalize-slots.ts +45 -8
- package/src/shared/providers/screen/styles/helpers/opening-phase.ts +25 -0
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +22 -12
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts +3 -1
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.ts +0 -24
- package/src/shared/providers/screen/styles/helpers/visibility-gate.ts +0 -12
- package/src/shared/providers/screen/styles/hooks/slot-resolvers.tsx +111 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +48 -38
- package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +0 -18
- package/src/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.tsx +17 -4
- package/src/shared/providers/screen/styles/index.tsx +13 -4
- package/src/shared/providers/screen/styles/slot.provider.tsx +93 -0
- package/src/shared/providers/screen/styles/stores/slot-references.store.ts +71 -0
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +41 -1
- package/src/shared/stores/bounds/internals/entries.ts +13 -5
- package/src/shared/stores/bounds/internals/links.ts +167 -85
- package/src/shared/stores/bounds/internals/resolver.ts +0 -2
- package/src/shared/stores/bounds/types.ts +24 -22
- package/src/shared/stores/system.store.ts +6 -0
- package/src/shared/types/animation.types.ts +8 -1
- package/src/shared/utils/bounds/helpers/styles/compute.ts +22 -124
- package/src/shared/utils/bounds/helpers/styles/local-transform.ts +86 -0
- package/src/shared/utils/bounds/navigation/zoom/build.ts +9 -1
- package/src/shared/utils/bounds/navigation/zoom/helpers.ts +96 -0
- package/src/shared/utils/logger.ts +12 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js +0 -40
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/providers/boundary-owner.provider.js +0 -68
- package/lib/commonjs/shared/components/boundary/providers/boundary-owner.provider.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/preserve-animated-props-only.js +0 -26
- package/lib/commonjs/shared/providers/screen/styles/helpers/preserve-animated-props-only.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js +0 -23
- package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/utils/attachment.js +0 -35
- package/lib/module/shared/components/boundary/portal/utils/attachment.js.map +0 -1
- package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js +0 -60
- package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/helpers/preserve-animated-props-only.js +0 -21
- package/lib/module/shared/providers/screen/styles/helpers/preserve-animated-props-only.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/styles.provider.js +0 -53
- package/lib/module/shared/providers/screen/styles/styles.provider.js.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts +0 -8
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts +0 -10
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts +0 -21
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/providers/boundary-owner.provider.d.ts +0 -44
- package/lib/typescript/shared/components/boundary/providers/boundary-owner.provider.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/preserve-animated-props-only.d.ts +0 -3
- package/lib/typescript/shared/providers/screen/styles/helpers/preserve-animated-props-only.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts +0 -14
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts.map +0 -1
- package/src/shared/components/boundary/hooks/use-boundary-presence.ts +0 -28
- package/src/shared/components/boundary/portal/utils/attachment.ts +0 -48
- package/src/shared/providers/screen/styles/helpers/preserve-animated-props-only.ts +0 -22
- package/src/shared/providers/screen/styles/styles.provider.tsx +0 -60
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useLayoutEffect","useState","measure","runOnJS","runOnUI","useAnimatedReaction","useAnimatedRef","useSharedValue","useOriginContext","ScrollStore","adjustedMeasuredBoundsForOverscrollDeltas","normalizeMeasuredBoundsToOrigin","clearPortalHostBounds","setPortalHostBounds","useHostMeasurement","capturesScroll","enabled","hostKey","screenKey","hostRef","scrollMetadata","getValue","canRenderHosts","setCanRenderHosts","originRef","hasMeasuredHost","get","hasAlreadyMeasured","measured","measuredOrigin","set","currentScroll","overscrollNormalized","normalizedMeasured","x","y","width","height","pageX","pageY","scroll"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/hooks/use-host-measurement.ts"],"mappings":";;AAAA,SAASA,eAAe,EAAEC,QAAQ,QAAQ,OAAO;AAEjD,SACCC,OAAO,EACPC,OAAO,EACPC,OAAO,EACPC,mBAAmB,EACnBC,cAAc,EACdC,cAAc,
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","useState","cancelAnimation","measure","runOnJS","runOnUI","useAnimatedReaction","useAnimatedRef","useSharedValue","withDelay","withTiming","useOriginContext","ScrollStore","adjustedMeasuredBoundsForOverscrollDeltas","normalizeMeasuredBoundsToOrigin","clearPortalHostBounds","setPortalHostBounds","HOST_MEASUREMENT_RETRY_DELAY_MS","useHostMeasurement","capturesScroll","enabled","hostKey","screenKey","hostRef","scrollMetadata","getValue","canRenderHosts","setCanRenderHosts","originRef","hasMeasuredHost","retryToken","get","state","hasAlreadyMeasured","measured","measuredOrigin","set","duration","currentScroll","overscrollNormalized","normalizedMeasured","x","y","width","height","pageX","pageY","scroll"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/hooks/use-host-measurement.ts"],"mappings":";;AAAA,SAASA,eAAe,EAAEC,QAAQ,QAAQ,OAAO;AAEjD,SACCC,eAAe,EACfC,OAAO,EACPC,OAAO,EACPC,OAAO,EACPC,mBAAmB,EACnBC,cAAc,EACdC,cAAc,EACdC,SAAS,EACTC,UAAU,QACJ,yBAAyB;AAChC,SAASC,gBAAgB,QAAQ,8CAA8C;AAC/E,SAASC,WAAW,QAAQ,iCAAiC;AAC7D,SACCC,yCAAyC,EACzCC,+BAA+B,QACzB,6BAA6B;AACpC,SACCC,qBAAqB,EACrBC,mBAAmB,QACb,6BAA6B;AAEpC,MAAMC,+BAA+B,GAAG,EAAE;AAS1C,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC,cAAc;EACdC,OAAO;EACPC,OAAO;EACPC;AACyB,CAAC,KAAK;EAC/B,MAAMC,OAAO,GAAGhB,cAAc,CAAO,CAAC;EACtC,MAAMiB,cAAc,GAAGZ,WAAW,CAACa,QAAQ,CAACH,SAAS,EAAE,UAAU,CAAC;EAClE,MAAM,CAACI,cAAc,EAAEC,iBAAiB,CAAC,GAAG1B,QAAQ,CAAU,KAAK,CAAC;EACpE,MAAM;IAAE2B;EAAU,CAAC,GAAGjB,gBAAgB,CAAC,CAAC;EACxC,MAAMkB,eAAe,GAAGrB,cAAc,CAAC,KAAK,CAAC;EAC7C,MAAMsB,UAAU,GAAGtB,cAAc,CAAC,CAAC,CAAC;EAEpCF,mB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AEH,kBAAkB,CAACG,KAAK;MAC/BC,MAAM,EAAEJ,kBAAkB,CAACI,MAAM;MACjCC,KAAK,EAAEL,kBAAkB,CAACK,KAAK;MAC/BC,KAAK,EAAEN,kBAAkB,CAACM,KAAK;MAC/BC,MAAM,EAAE5B,cAAc,GAAGmB,aAAa,GAAG;IAC1C,CAAC,CAAC;IAEFlC,OAAO,CAACuB,iBAAiB,CAAC,CAAC,IAAI,CAAC;EACjC,CACD,CAAC;EAED3B,eAAe,CAAC,MAAM;IACrB,OAAO,MAAM;MACZK,OAAO,CAACU,qBAAqB,CAAC,CAACM,OAAO,CAAC;IACxC,CAAC;EACF,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,OAAO;IACNK,cAAc;IACdH;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useSyncExternalStore } from "react";
|
|
4
|
-
import { makeMutable } from "react-native-reanimated";
|
|
5
4
|
const EMPTY_SNAPSHOT = {};
|
|
6
5
|
const listeners = new Set();
|
|
7
6
|
const hostStacks = new Map();
|
|
8
7
|
let snapshot = EMPTY_SNAPSHOT;
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* The active host for a screen. Stack ordering is the load-bearing invariant:
|
|
11
|
+
* `registerHost` unshifts fallback hosts to the front and pushes real hosts to
|
|
12
|
+
* the back, so the active host is the last real (non-fallback) host, falling
|
|
13
|
+
* back to the first entry and finally to the screen's own key.
|
|
15
14
|
*/
|
|
16
|
-
const activeScrollHosts = makeMutable({});
|
|
17
15
|
const getActiveHostFromStack = (screenKey, stack) => {
|
|
18
16
|
if (!stack || stack.length === 0) {
|
|
19
17
|
return screenKey;
|
|
@@ -33,23 +31,8 @@ const buildSnapshot = () => {
|
|
|
33
31
|
}
|
|
34
32
|
return nextSnapshot;
|
|
35
33
|
};
|
|
36
|
-
const buildScrollHostSnapshot = () => {
|
|
37
|
-
const nextSnapshot = {};
|
|
38
|
-
for (const [screenKey, stack] of hostStacks) {
|
|
39
|
-
const activeHostKey = getActiveHostFromStack(screenKey, stack);
|
|
40
|
-
const activeHost = stack.find(host => host.hostKey === activeHostKey);
|
|
41
|
-
if (activeHost?.capturesScroll) {
|
|
42
|
-
nextSnapshot[screenKey] = {
|
|
43
|
-
hostKey: activeHost.hostKey,
|
|
44
|
-
capturesScroll: true
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return nextSnapshot;
|
|
49
|
-
};
|
|
50
34
|
const emit = () => {
|
|
51
35
|
snapshot = buildSnapshot();
|
|
52
|
-
activeScrollHosts.set(buildScrollHostSnapshot());
|
|
53
36
|
for (const listener of listeners) {
|
|
54
37
|
listener();
|
|
55
38
|
}
|
|
@@ -95,32 +78,12 @@ export const unregisterHost = (screenKey, hostKey) => {
|
|
|
95
78
|
export const getActiveHostKey = screenKey => {
|
|
96
79
|
return snapshot[screenKey] ?? screenKey;
|
|
97
80
|
};
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* The screen's active host, if it captures scroll. Worklet-safe: measurement
|
|
101
|
-
* code calls this on the UI thread while writing source bounds.
|
|
102
|
-
*/
|
|
103
|
-
export const getActiveScrollHost = screenKey => {
|
|
104
|
-
"worklet";
|
|
105
|
-
|
|
106
|
-
return activeScrollHosts.get()[screenKey] ?? null;
|
|
107
|
-
};
|
|
108
|
-
export const getHostCapturesScroll = hostKey => {
|
|
109
|
-
for (const stack of hostStacks.values()) {
|
|
110
|
-
const host = stack.find(registration => registration.hostKey === hostKey);
|
|
111
|
-
if (host) {
|
|
112
|
-
return host.capturesScroll;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
return false;
|
|
116
|
-
};
|
|
117
81
|
export const useActiveHostKey = screenKey => {
|
|
118
82
|
return useSyncExternalStore(subscribe, () => screenKey ? getActiveHostKey(screenKey) : undefined, () => undefined);
|
|
119
83
|
};
|
|
120
84
|
export const resetHostRegistry = () => {
|
|
121
85
|
hostStacks.clear();
|
|
122
86
|
snapshot = EMPTY_SNAPSHOT;
|
|
123
|
-
activeScrollHosts.set({});
|
|
124
87
|
emit();
|
|
125
88
|
};
|
|
126
89
|
//# sourceMappingURL=host-registry.store.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useSyncExternalStore","
|
|
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/stores/host-registry.store.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAW5C,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,C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L,cAAc;EACzBgB,IAAI,CAAC,CAAC;AACP,CAAC","ignoreList":[]}
|
|
@@ -25,18 +25,49 @@ 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.escapeClipping === b.escapeClipping && a.hostKey === b.hostKey && a.localStylesMaps === b.localStylesMaps && a.pairKey === b.pairKey && a.portalHostName === b.portalHostName && a.screenKey === b.screenKey && a.slotsMap === b.slotsMap;
|
|
29
29
|
};
|
|
30
30
|
export const mountPortalBoundaryHost = host => {
|
|
31
|
-
const previous = activeBoundaryHosts.get(host.
|
|
31
|
+
const previous = activeBoundaryHosts.get(host.portalHostName);
|
|
32
32
|
if (previous && isSameHost(previous, host)) {
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
activeBoundaryHosts.set(host.
|
|
35
|
+
activeBoundaryHosts.set(host.portalHostName, host);
|
|
36
36
|
emit();
|
|
37
37
|
};
|
|
38
38
|
export const unmountPortalBoundaryHost = boundaryId => {
|
|
39
|
-
|
|
39
|
+
let didDelete = false;
|
|
40
|
+
for (const [hostEntryKey, host] of activeBoundaryHosts) {
|
|
41
|
+
if (host.boundaryId !== boundaryId) {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
activeBoundaryHosts.delete(hostEntryKey);
|
|
45
|
+
didDelete = true;
|
|
46
|
+
}
|
|
47
|
+
if (!didDelete) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
emit();
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Post-handoff GC: drop every receiver for this boundary except the one now
|
|
55
|
+
* visible (`keepPortalHostName`). Called once the new host is confirmed on
|
|
56
|
+
* screen so the superseded receivers stop rendering.
|
|
57
|
+
*/
|
|
58
|
+
export const dropStalePortalBoundaryHosts = ({
|
|
59
|
+
boundaryId,
|
|
60
|
+
keepPortalHostName
|
|
61
|
+
}) => {
|
|
62
|
+
let didDelete = false;
|
|
63
|
+
for (const [hostEntryKey, host] of activeBoundaryHosts) {
|
|
64
|
+
if (host.boundaryId !== boundaryId || host.portalHostName === keepPortalHostName) {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
activeBoundaryHosts.delete(hostEntryKey);
|
|
68
|
+
didDelete = true;
|
|
69
|
+
}
|
|
70
|
+
if (!didDelete) {
|
|
40
71
|
return;
|
|
41
72
|
}
|
|
42
73
|
emit();
|
package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map
CHANGED
|
@@ -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","escapeClipping","localStylesMaps","pairKey","portalHostName","screenKey","slotsMap","mountPortalBoundaryHost","previous","get","set","unmountPortalBoundaryHost","didDelete","hostEntryKey","delete","dropStalePortalBoundaryHosts","keepPortalHostName","subscribe","add","useActivePortalBoundaryHosts"],"sourceRoot":"../../../../../../../src","sources":["shared/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,YAAw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AAW,EACnD,MAAMA,WACP,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { createElement } from "react";
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* `react-native-teleport` is an optional peer dependency. The require sits in a
|
|
5
7
|
* try/catch so Metro treats it as an optional dependency — an absent module no
|
|
@@ -9,11 +11,23 @@
|
|
|
9
11
|
* rendering; everything else keeps working.
|
|
10
12
|
*/
|
|
11
13
|
let mod = null;
|
|
14
|
+
let managerMod = null;
|
|
15
|
+
let providerViewMod = null;
|
|
12
16
|
try {
|
|
13
17
|
mod = require("react-native-teleport");
|
|
18
|
+
managerMod = require("react-native-teleport/lib/module/contexts/PortalManager");
|
|
19
|
+
providerViewMod = require("react-native-teleport/lib/module/views/PortalProvider");
|
|
14
20
|
} catch {}
|
|
15
|
-
|
|
21
|
+
const NativePortalProviderView = providerViewMod?.default ?? null;
|
|
22
|
+
const PortalManagerProvider = managerMod?.PortalManagerProvider ?? null;
|
|
23
|
+
const SafeNativePortalProvider = PortalManagerProvider ? ({
|
|
24
|
+
children
|
|
25
|
+
}) => {
|
|
26
|
+
const managedChildren = /*#__PURE__*/createElement(PortalManagerProvider, null, children);
|
|
27
|
+
return NativePortalProviderView ? /*#__PURE__*/createElement(NativePortalProviderView, null, managedChildren) : managedChildren;
|
|
28
|
+
} : null;
|
|
29
|
+
export const isTeleportAvailable = mod !== null && SafeNativePortalProvider !== null;
|
|
16
30
|
export const NativePortal = mod?.Portal ?? null;
|
|
17
|
-
export const NativePortalProvider =
|
|
31
|
+
export const NativePortalProvider = SafeNativePortalProvider;
|
|
18
32
|
export const NativePortalHost = mod?.PortalHost ?? null;
|
|
19
33
|
//# sourceMappingURL=teleport.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["mod","require","isTeleportAvailable","NativePortal","Portal","NativePortalProvider","
|
|
1
|
+
{"version":3,"names":["createElement","mod","managerMod","providerViewMod","require","NativePortalProviderView","default","PortalManagerProvider","SafeNativePortalProvider","children","managedChildren","isTeleportAvailable","NativePortal","Portal","NativePortalProvider","NativePortalHost","PortalHost"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/portal/teleport.ts"],"mappings":";;AAAA,SAA6BA,aAAa,QAAwB,OAAO;;AAEzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,GAAQ,GAAG,IAAI;AACnB,IAAIC,UAAe,GAAG,IAAI;AAC1B,IAAIC,eAAoB,GAAG,IAAI;AAC/B,IAAI;EACHF,GAAG,GAAGG,OAAO,CAAC,uBAAuB,CAAC;EACtCF,UAAU,GAAGE,OAAO,CAAC,yDAAyD,CAAC;EAC/ED,eAAe,GAAGC,OAAO,CAAC,uDAAuD,CAAC;AACnF,CAAC,CAAC,MAAM,CAAC;AAET,MAAMC,wBAAuE,GAC5EF,eAAe,EAAEG,OAAO,IAAI,IAAI;AACjC,MAAMC,qBAAoE,GACzEL,UAAU,EAAEK,qBAAqB,IAAI,IAAI;AAE1C,MAAMC,wBAAuE,GAC5ED,qBAAqB,GAClB,CAAC;EAAEE;AAAkC,CAAC,KAAK;EAC3C,MAAMC,eAAe,gBAAGV,aAAa,CACpCO,qBAAqB,EACrB,IAAI,EACJE,QACD,CAAC;EAED,OAAOJ,wBAAwB,gBAC5BL,aAAa,CAACK,wBAAwB,EAAE,IAAI,EAAEK,eAAe,CAAC,GAC9DA,eAAe;AACnB,CAAC,GACA,IAAI;AAER,OAAO,MAAMC,mBAAmB,GAC/BV,GAAG,KAAK,IAAI,IAAIO,wBAAwB,KAAK,IAAI;AAClD,OAAO,MAAMI,YAAuC,GAAGX,GAAG,EAAEY,MAAM,IAAI,IAAI;AAC1E,OAAO,MAAMC,oBAA+C,GAC3DN,wBAAwB;AACzB,OAAO,MAAMO,gBAA2C,GACvDd,GAAG,EAAEe,UAAU,IAAI,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const hasLocalSlot = (localStylesMaps, slotId) => {
|
|
4
|
+
"worklet";
|
|
5
|
+
|
|
6
|
+
for (let index = 0; index < localStylesMaps.length; index++) {
|
|
7
|
+
if (localStylesMaps[index]?.[slotId] !== undefined) {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return false;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=has-local-slot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["hasLocalSlot","localStylesMaps","slotId","index","length","undefined"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/has-local-slot.ts"],"mappings":";;AAEA,OAAO,MAAMA,YAAY,GAAGA,CAC3BC,eAAiC,EACjCC,MAAc,KACV;EACJ,SAAS;;EAET,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,eAAe,CAACG,MAAM,EAAED,KAAK,EAAE,EAAE;IAC5D,IAAIF,eAAe,CAACE,KAAK,CAAC,GAAGD,MAAM,CAAC,KAAKG,SAAS,EAAE;MACnD,OAAO,IAAI;IACZ;EACD;EAEA,OAAO,KAAK;AACb,CAAC","ignoreList":[]}
|
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
export const PORTAL_HOST_NAME_RESET_VALUE = null;
|
|
4
4
|
const PORTAL_HOST_NAME_SUFFIX = "-portal-host";
|
|
5
|
-
|
|
5
|
+
const BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX = "-boundary-local-portal-host";
|
|
6
|
+
export const createPortalBoundaryHostName = (hostKey, boundaryId, pairKey) => {
|
|
6
7
|
"worklet";
|
|
7
8
|
|
|
8
|
-
return `${hostKey}-${boundaryId}${PORTAL_HOST_NAME_SUFFIX}`;
|
|
9
|
+
return `${hostKey}-${pairKey ? `${pairKey}-` : ""}${boundaryId}${PORTAL_HOST_NAME_SUFFIX}`;
|
|
10
|
+
};
|
|
11
|
+
export const createBoundaryLocalPortalHostName = (screenKey, boundaryId) => {
|
|
12
|
+
"worklet";
|
|
13
|
+
|
|
14
|
+
return `${screenKey}-${boundaryId}${BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX}`;
|
|
9
15
|
};
|
|
10
16
|
//# sourceMappingURL=naming.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","PORTAL_HOST_NAME_SUFFIX","createPortalBoundaryHostName","hostKey","boundaryId"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/naming.ts"],"mappings":";;AAAA,OAAO,MAAMA,4BAA4B,GAAG,IAAI;AAChD,MAAMC,uBAAuB,GAAG,cAAc;
|
|
1
|
+
{"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","PORTAL_HOST_NAME_SUFFIX","BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX","createPortalBoundaryHostName","hostKey","boundaryId","pairKey","createBoundaryLocalPortalHostName","screenKey"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/naming.ts"],"mappings":";;AAAA,OAAO,MAAMA,4BAA4B,GAAG,IAAI;AAChD,MAAMC,uBAAuB,GAAG,cAAc;AAC9C,MAAMC,sCAAsC,GAAG,6BAA6B;AAE5E,OAAO,MAAMC,4BAA4B,GAAGA,CAC3CC,OAAe,EACfC,UAAkB,EAClBC,OAAuB,KACnB;EACJ,SAAS;;EACT,OAAO,GAAGF,OAAO,IAAIE,OAAO,GAAG,GAAGA,OAAO,GAAG,GAAG,EAAE,GAAGD,UAAU,GAAGJ,uBAAuB,EAAE;AAC3F,CAAC;AAED,OAAO,MAAMM,iCAAiC,GAAGA,CAChDC,SAAiB,EACjBH,UAAkB,KACd;EACJ,SAAS;;EACT,OAAO,GAAGG,SAAS,IAAIH,UAAU,GAAGH,sCAAsC,EAAE;AAC7E,CAAC","ignoreList":[]}
|
|
@@ -1,66 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { interpolate } from "react-native-reanimated";
|
|
4
3
|
import { getClampedScrollAxisDelta } from "../../../../stores/scroll.store";
|
|
5
4
|
import { getPortalHostBounds } from "../stores/host-bounds.store";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The two portal coordinate cases we support:
|
|
8
|
+
*
|
|
9
|
+
* - same-screen: source and host live on the same screen; re-base the stored
|
|
10
|
+
* host frame onto the source measurement's scroll snapshot.
|
|
11
|
+
* - cross-screen: source and host live on different screens; the host is the
|
|
12
|
+
* replacement coordinate space, so destination scroll is inherited naturally
|
|
13
|
+
* from host placement instead of manually propagated.
|
|
14
|
+
*/
|
|
15
|
+
|
|
6
16
|
export const resolvePortalOffsetStyle = ({
|
|
7
|
-
alignHostToBoundsScroll = false,
|
|
8
17
|
bounds,
|
|
9
|
-
boundsCurrentScroll,
|
|
10
|
-
compensateSourceScroll = false,
|
|
11
|
-
currentScroll,
|
|
12
|
-
hostCurrentScroll,
|
|
13
18
|
hostKey,
|
|
14
|
-
|
|
15
|
-
includeScrollOffsets = true,
|
|
16
|
-
placement,
|
|
17
|
-
position = "relative",
|
|
18
|
-
sourceCurrentScroll,
|
|
19
|
-
trackSourceScroll = false
|
|
19
|
+
placement
|
|
20
20
|
}) => {
|
|
21
21
|
"worklet";
|
|
22
22
|
|
|
23
23
|
const hostBounds = getPortalHostBounds(hostKey);
|
|
24
|
-
const shouldAlignHostToBoundsScroll = placement ? placement === "same-screen" : alignHostToBoundsScroll;
|
|
25
|
-
const shouldCompensateSourceScroll = trackSourceScroll || compensateSourceScroll;
|
|
26
|
-
const shouldIncludeHostScrollOffsets = placement ? placement === "cross-screen-close" : includeScrollOffsets;
|
|
27
24
|
const boundsScrollSnapshot = bounds.scroll ?? null;
|
|
28
|
-
const sourceScrollSnapshot = shouldCompensateSourceScroll ? boundsScrollSnapshot : null;
|
|
29
|
-
const sourceScrollDeltaX = shouldCompensateSourceScroll ? getClampedScrollAxisDelta(sourceCurrentScroll ?? null, sourceScrollSnapshot, "horizontal") : 0;
|
|
30
|
-
const sourceScrollDeltaY = shouldCompensateSourceScroll ? getClampedScrollAxisDelta(sourceCurrentScroll ?? null, sourceScrollSnapshot, "vertical") : 0;
|
|
31
|
-
const sourcePageX = bounds.pageX - sourceScrollDeltaX;
|
|
32
|
-
const sourcePageY = bounds.pageY - sourceScrollDeltaY;
|
|
33
|
-
const boundsScroll = shouldIncludeHostScrollOffsets ? boundsScrollSnapshot ?? boundsCurrentScroll ?? currentScroll ?? null : null;
|
|
34
25
|
const hostBoundsScrollSnapshot = hostBounds?.scroll ?? null;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const offsetX = hostBounds ? sourcePageX - adjustedHostPageX : sourcePageX - boundsScrollDeltaX;
|
|
48
|
-
const offsetY = hostBounds ? sourcePageY - adjustedHostPageY : sourcePageY - boundsScrollDeltaY;
|
|
49
|
-
const transform = [{
|
|
50
|
-
translateY: offsetY
|
|
51
|
-
}, {
|
|
52
|
-
translateX: offsetX
|
|
53
|
-
}];
|
|
54
|
-
if (position === "absolute") {
|
|
55
|
-
return {
|
|
56
|
-
left: 0,
|
|
57
|
-
position: "absolute",
|
|
58
|
-
top: 0,
|
|
59
|
-
transform
|
|
60
|
-
};
|
|
61
|
-
}
|
|
26
|
+
|
|
27
|
+
// same-screen re-bases the static host frame onto the source scroll snapshot.
|
|
28
|
+
// Cross-screen hosts are the chosen replacement coordinate space, so their
|
|
29
|
+
// destination scroll is represented by where the host itself is mounted.
|
|
30
|
+
const alignHostToBoundsScroll = placement === "same-screen";
|
|
31
|
+
const hostSnapshotDeltaX = alignHostToBoundsScroll ? getClampedScrollAxisDelta(boundsScrollSnapshot, hostBoundsScrollSnapshot, "horizontal") : 0;
|
|
32
|
+
const hostSnapshotDeltaY = alignHostToBoundsScroll ? getClampedScrollAxisDelta(boundsScrollSnapshot, hostBoundsScrollSnapshot, "vertical") : 0;
|
|
33
|
+
|
|
34
|
+
// Without registered host bounds the host frame is the origin, so the source
|
|
35
|
+
// page position becomes the offset directly.
|
|
36
|
+
const adjustedHostPageX = hostBounds ? hostBounds.pageX - hostSnapshotDeltaX : 0;
|
|
37
|
+
const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY : 0;
|
|
62
38
|
return {
|
|
63
|
-
transform
|
|
39
|
+
transform: [{
|
|
40
|
+
translateY: bounds.pageY - adjustedHostPageY
|
|
41
|
+
}, {
|
|
42
|
+
translateX: bounds.pageX - adjustedHostPageX
|
|
43
|
+
}]
|
|
64
44
|
};
|
|
65
45
|
};
|
|
66
46
|
//# sourceMappingURL=offset-style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
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/utils/offset-style.ts"],"mappings":";;AACA,SAASA,yBAAyB,QAAQ,iCAAiC;AAE3E,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":[]}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { getDestinationScreenKeyFromPairKey, getLinkKeyFromTag, getLink as getPairLink, getSourceScreenKeyFromPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
4
|
+
const hasSeenScreenKey = (screenKeys, screenKey) => {
|
|
5
|
+
"worklet";
|
|
6
|
+
|
|
7
|
+
for (let index = 0; index < screenKeys.length; index++) {
|
|
8
|
+
if (screenKeys[index] === screenKey) {
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return false;
|
|
13
|
+
};
|
|
14
|
+
export const usesEscapeClippingHost = link => {
|
|
15
|
+
"worklet";
|
|
16
|
+
|
|
17
|
+
return link?.source?.handoff === true && link.source.escapeClipping === true;
|
|
18
|
+
};
|
|
19
|
+
const isReturningToPreviousSourceHost = ({
|
|
20
|
+
hostScreenKey,
|
|
21
|
+
ownerPairKey,
|
|
22
|
+
previousOwnerPairKey
|
|
23
|
+
}) => {
|
|
24
|
+
"worklet";
|
|
25
|
+
|
|
26
|
+
const previousSourceScreenKey = getSourceScreenKeyFromPairKey(previousOwnerPairKey);
|
|
27
|
+
const previousDestinationScreenKey = getDestinationScreenKeyFromPairKey(previousOwnerPairKey);
|
|
28
|
+
const ownerDestinationScreenKey = getDestinationScreenKeyFromPairKey(ownerPairKey);
|
|
29
|
+
return previousDestinationScreenKey !== "" && ownerDestinationScreenKey !== "" && previousDestinationScreenKey !== previousSourceScreenKey && ownerDestinationScreenKey === previousSourceScreenKey && hostScreenKey === previousSourceScreenKey;
|
|
30
|
+
};
|
|
31
|
+
export const canSwitchBoundaryLocalHandoffImmediately = ({
|
|
32
|
+
hostScreenKey,
|
|
33
|
+
ownerPairKey,
|
|
34
|
+
previousOwnerPairKey
|
|
35
|
+
}) => {
|
|
36
|
+
"worklet";
|
|
37
|
+
|
|
38
|
+
if (!hostScreenKey || !ownerPairKey) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
if (hostScreenKey === getSourceScreenKeyFromPairKey(ownerPairKey)) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
if (!previousOwnerPairKey) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
return isReturningToPreviousSourceHost({
|
|
48
|
+
hostScreenKey,
|
|
49
|
+
ownerPairKey,
|
|
50
|
+
previousOwnerPairKey
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
const isActiveHandoffLink = ({
|
|
54
|
+
link,
|
|
55
|
+
linkKey,
|
|
56
|
+
pairKey,
|
|
57
|
+
pairsState
|
|
58
|
+
}) => {
|
|
59
|
+
"worklet";
|
|
60
|
+
|
|
61
|
+
if (!link.group) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
const activeId = pairsState[pairKey]?.groups?.[link.group]?.activeId;
|
|
65
|
+
return !activeId || activeId === linkKey;
|
|
66
|
+
};
|
|
67
|
+
const resolveBoundaryLocalStyleOwnerScreenKey = ({
|
|
68
|
+
hostScreenKey,
|
|
69
|
+
isSettledHostReady,
|
|
70
|
+
settledHostScreenKey,
|
|
71
|
+
sourceScreenKey
|
|
72
|
+
}) => {
|
|
73
|
+
"worklet";
|
|
74
|
+
|
|
75
|
+
if (settledHostScreenKey === hostScreenKey && isSettledHostReady) {
|
|
76
|
+
return hostScreenKey;
|
|
77
|
+
}
|
|
78
|
+
return sourceScreenKey;
|
|
79
|
+
};
|
|
80
|
+
const pendingSignal = sourcePairKey => {
|
|
81
|
+
"worklet";
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
hostScreenKey: null,
|
|
85
|
+
ownerPairKey: sourcePairKey,
|
|
86
|
+
ownerScreenKey: null,
|
|
87
|
+
status: "pending"
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
const clearSignal = sourcePairKey => {
|
|
91
|
+
"worklet";
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
hostScreenKey: null,
|
|
95
|
+
ownerPairKey: sourcePairKey,
|
|
96
|
+
ownerScreenKey: null,
|
|
97
|
+
status: "clear"
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
export const resolveBoundaryPortalOwnership = ({
|
|
101
|
+
boundaryId,
|
|
102
|
+
currentScreenKey,
|
|
103
|
+
escapeClipping,
|
|
104
|
+
handoff,
|
|
105
|
+
isSettledHostClosingComplete = false,
|
|
106
|
+
isSettledHostReady = false,
|
|
107
|
+
pairsState,
|
|
108
|
+
settledHostScreenKey = null,
|
|
109
|
+
sourcePairKey
|
|
110
|
+
}) => {
|
|
111
|
+
"worklet";
|
|
112
|
+
|
|
113
|
+
const linkKey = getLinkKeyFromTag(boundaryId);
|
|
114
|
+
const link = getPairLink(pairsState, sourcePairKey, linkKey);
|
|
115
|
+
if (link?.status !== "complete") {
|
|
116
|
+
return pendingSignal(sourcePairKey);
|
|
117
|
+
}
|
|
118
|
+
if (!isActiveHandoffLink({
|
|
119
|
+
link,
|
|
120
|
+
linkKey,
|
|
121
|
+
pairKey: sourcePairKey,
|
|
122
|
+
pairsState
|
|
123
|
+
})) {
|
|
124
|
+
return clearSignal(sourcePairKey);
|
|
125
|
+
}
|
|
126
|
+
if (!handoff) {
|
|
127
|
+
return {
|
|
128
|
+
hostScreenKey: currentScreenKey,
|
|
129
|
+
ownerPairKey: sourcePairKey,
|
|
130
|
+
ownerScreenKey: currentScreenKey,
|
|
131
|
+
status: "complete"
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
let hostScreenKey = link.destination.screenKey;
|
|
135
|
+
let ownerPairKey = sourcePairKey;
|
|
136
|
+
let previousOwnerPairKey = null;
|
|
137
|
+
const seenScreenKeys = [getSourceScreenKeyFromPairKey(sourcePairKey), hostScreenKey];
|
|
138
|
+
const pairKeys = Object.keys(pairsState);
|
|
139
|
+
for (let hop = 0; hop < pairKeys.length; hop++) {
|
|
140
|
+
let didAdvance = false;
|
|
141
|
+
let hasPendingNextHop = false;
|
|
142
|
+
let didHitVisitedScreen = false;
|
|
143
|
+
for (let index = 0; index < pairKeys.length; index++) {
|
|
144
|
+
const candidatePairKey = pairKeys[index];
|
|
145
|
+
if (!candidatePairKey || candidatePairKey === ownerPairKey) {
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
const candidate = getPairLink(pairsState, candidatePairKey, linkKey);
|
|
149
|
+
if (!candidate?.source || candidate.source.screenKey !== hostScreenKey) {
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
if (!candidate.source.handoff) {
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
if (!isActiveHandoffLink({
|
|
156
|
+
link: candidate,
|
|
157
|
+
linkKey,
|
|
158
|
+
pairKey: candidatePairKey,
|
|
159
|
+
pairsState
|
|
160
|
+
})) {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
if (candidate.status !== "complete") {
|
|
164
|
+
hasPendingNextHop = true;
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
const nextHostScreenKey = candidate.destination.screenKey;
|
|
168
|
+
previousOwnerPairKey = ownerPairKey;
|
|
169
|
+
ownerPairKey = candidatePairKey;
|
|
170
|
+
hostScreenKey = nextHostScreenKey;
|
|
171
|
+
if (hasSeenScreenKey(seenScreenKeys, nextHostScreenKey)) {
|
|
172
|
+
didHitVisitedScreen = true;
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
seenScreenKeys.push(nextHostScreenKey);
|
|
176
|
+
didAdvance = true;
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
if (didHitVisitedScreen) {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
if (didAdvance) {
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
if (hasPendingNextHop) {
|
|
186
|
+
return pendingSignal(ownerPairKey);
|
|
187
|
+
}
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
const ownerLink = getPairLink(pairsState, ownerPairKey, linkKey);
|
|
191
|
+
const ownerUsesEscapeClipping = ownerLink?.source?.escapeClipping ?? escapeClipping;
|
|
192
|
+
if (!ownerUsesEscapeClipping && isSettledHostClosingComplete && settledHostScreenKey === hostScreenKey && previousOwnerPairKey) {
|
|
193
|
+
hostScreenKey = getSourceScreenKeyFromPairKey(ownerPairKey);
|
|
194
|
+
}
|
|
195
|
+
const ownerScreenKey = ownerUsesEscapeClipping ? getSourceScreenKeyFromPairKey(ownerPairKey) : resolveBoundaryLocalStyleOwnerScreenKey({
|
|
196
|
+
hostScreenKey,
|
|
197
|
+
isSettledHostReady,
|
|
198
|
+
settledHostScreenKey,
|
|
199
|
+
sourceScreenKey: getSourceScreenKeyFromPairKey(ownerPairKey)
|
|
200
|
+
});
|
|
201
|
+
return {
|
|
202
|
+
hostScreenKey,
|
|
203
|
+
ownerPairKey,
|
|
204
|
+
ownerScreenKey,
|
|
205
|
+
status: "complete"
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
export const hasHandoffEscapeContinuation = ({
|
|
209
|
+
linkKey,
|
|
210
|
+
linkState,
|
|
211
|
+
sourceScreenKey
|
|
212
|
+
}) => {
|
|
213
|
+
"worklet";
|
|
214
|
+
|
|
215
|
+
const pairKeys = Object.keys(linkState);
|
|
216
|
+
const visitedScreenKeys = [];
|
|
217
|
+
let cursorScreenKey = sourceScreenKey;
|
|
218
|
+
for (let hop = 0; hop < pairKeys.length; hop++) {
|
|
219
|
+
if (hasSeenScreenKey(visitedScreenKeys, cursorScreenKey)) {
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
visitedScreenKeys.push(cursorScreenKey);
|
|
223
|
+
let previousScreenKey = null;
|
|
224
|
+
for (let index = 0; index < pairKeys.length; index++) {
|
|
225
|
+
const candidatePairKey = pairKeys[index];
|
|
226
|
+
const link = candidatePairKey ? linkState[candidatePairKey]?.links?.[linkKey] : null;
|
|
227
|
+
if (!link?.source || !link.destination || link.destination.screenKey !== cursorScreenKey) {
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
if (usesEscapeClippingHost(link)) {
|
|
231
|
+
return true;
|
|
232
|
+
}
|
|
233
|
+
if (!link.source.handoff) {
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
previousScreenKey = link.source.screenKey;
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
if (!previousScreenKey) {
|
|
240
|
+
return false;
|
|
241
|
+
}
|
|
242
|
+
cursorScreenKey = previousScreenKey;
|
|
243
|
+
}
|
|
244
|
+
return false;
|
|
245
|
+
};
|
|
246
|
+
//# sourceMappingURL=ownership.js.map
|