react-native-screen-transitions 3.9.0-alpha.2 → 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 +14 -9
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js +66 -28
- 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} +8 -4
- 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} +27 -10
- 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} +5 -7
- 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} +4 -4
- 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 +14 -35
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +5 -6
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/index.js +26 -29
- 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 +6 -7
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +1 -22
- 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/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 +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.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/resolve-slot-styles/index.js +9 -3
- 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/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 +16 -3
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/index.js +16 -3
- package/lib/commonjs/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +22 -51
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
- 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 +22 -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/module/shared/components/boundary/components/boundary-target.js +12 -7
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/shared/components/boundary/create-boundary-component.js +67 -29
- package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/{use-boundary-presence.js → lifecycles/use-boundary-presence.js} +8 -4
- 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} +27 -10
- 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} +5 -7
- 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} +4 -4
- 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 +15 -36
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-measurer.js +5 -6
- package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/boundary/index.js +26 -29
- 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 +212 -102
- 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 +6 -7
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/destination-signals.js +2 -23
- 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/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 +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.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/resolve-slot-styles/index.js +9 -3
- 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/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 +16 -3
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.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 +22 -47
- package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
- 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 +19 -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/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +1 -2
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/component-stack/components/component-screen.d.ts +1 -1
- package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +1 -2
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +1 -1
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.d.ts +1 -2
- package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts +2 -2
- package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts.map +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-container.d.ts +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +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/{use-initial-destination-measurement.d.ts → lifecycles/use-initial-destination-measurement.d.ts} +2 -2
- 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/{use-refresh-boundary.d.ts → lifecycles/use-refresh-boundary.d.ts} +2 -2
- 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 +5 -9
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +4 -3
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/index.d.ts +35 -24
- 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 +2 -2
- 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 +2 -2
- 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-provider.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-provider.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 +7 -12
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
- 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.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 +6 -5
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/masked-view.d.ts +1 -1
- package/lib/typescript/shared/components/masked-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/index.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +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 +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 +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 +1 -1
- package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +711 -667
- 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/descriptors/descriptors.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.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/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/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 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +2 -2
- 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 +5 -10
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
- 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 +2 -0
- 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 +9 -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/package.json +1 -1
- package/src/shared/components/boundary/components/boundary-target.tsx +21 -7
- package/src/shared/components/boundary/create-boundary-component.tsx +92 -28
- package/src/shared/components/boundary/hooks/{use-boundary-presence.ts → lifecycles/use-boundary-presence.ts} +16 -5
- package/src/shared/components/boundary/hooks/{use-initial-destination-measurement.ts → lifecycles/use-initial-destination-measurement.ts} +40 -13
- package/src/shared/components/boundary/hooks/{use-initial-source-measurement.ts → lifecycles/use-initial-source-measurement.ts} +7 -9
- package/src/shared/components/boundary/hooks/{use-refresh-boundary.ts → lifecycles/use-refresh-boundary.ts} +6 -6
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +15 -45
- package/src/shared/components/boundary/hooks/use-measurer.ts +9 -14
- package/src/shared/components/boundary/index.tsx +55 -29
- 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 +280 -119
- 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-root.provider.tsx +9 -18
- package/src/shared/components/boundary/types.ts +9 -39
- package/src/shared/components/boundary/utils/destination-signals.ts +1 -32
- 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/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 +1 -0
- 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/resolve-slot-styles/index.ts +14 -2
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts +3 -0
- package/src/shared/providers/screen/styles/hooks/slot-resolvers.tsx +111 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +21 -3
- package/src/shared/providers/screen/styles/index.tsx +8 -3
- package/src/shared/providers/screen/styles/slot.provider.tsx +36 -54
- package/src/shared/providers/screen/styles/stores/slot-references.store.ts +71 -0
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +24 -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 +10 -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/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/resolve-portal.js +0 -36
- package/lib/commonjs/shared/components/boundary/portal/resolve-portal.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/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/resolve-portal.js +0 -31
- package/lib/module/shared/components/boundary/portal/resolve-portal.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/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts +0 -9
- 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.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.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts +0 -14
- package/lib/typescript/shared/components/boundary/portal/resolve-portal.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/src/shared/components/boundary/portal/resolve-portal.ts +0 -40
- package/src/shared/components/boundary/portal/utils/attachment.ts +0 -48
|
@@ -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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IAAK;EAChE,OAAOZ,oBAAoB,CAC1BoC,SAAS,EACT,MAAM9B,QAAQ,CAACC,YAAY,CAACK,OAAO,CAAC,IAAIX,WAAW,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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getDestinationScreenKeyFromPairKey","getLinkKeyFromTag","getLink","getPairLink","getSourceScreenKeyFromPairKey","hasSeenScreenKey","screenKeys","screenKey","index","length","usesEscapeClippingHost","link","source","handoff","escapeClipping","isReturningToPreviousSourceHost","hostScreenKey","ownerPairKey","previousOwnerPairKey","previousSourceScreenKey","previousDestinationScreenKey","ownerDestinationScreenKey","canSwitchBoundaryLocalHandoffImmediately","isActiveHandoffLink","linkKey","pairKey","pairsState","group","activeId","groups","resolveBoundaryLocalStyleOwnerScreenKey","isSettledHostReady","settledHostScreenKey","sourceScreenKey","pendingSignal","sourcePairKey","ownerScreenKey","status","clearSignal","resolveBoundaryPortalOwnership","boundaryId","currentScreenKey","isSettledHostClosingComplete","destination","seenScreenKeys","pairKeys","Object","keys","hop","didAdvance","hasPendingNextHop","didHitVisitedScreen","candidatePairKey","candidate","nextHostScreenKey","push","ownerLink","ownerUsesEscapeClipping","hasHandoffEscapeContinuation","linkState","visitedScreenKeys","cursorScreenKey","previousScreenKey","links"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/ownership.ts"],"mappings":";;AAAA,SACCA,kCAAkC,EAClCC,iBAAiB,EACjBC,OAAO,IAAIC,WAAW,EACtBC,6BAA6B,QACvB,sDAAsD;AAuB7D,MAAMC,gBAAgB,GAAGA,CAACC,UAAuB,EAAEC,SAAoB,KAAK;EAC3E,SAAS;;EACT,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,UAAU,CAACG,MAAM,EAAED,KAAK,EAAE,EAAE;IACvD,IAAIF,UAAU,CAACE,KAAK,CAAC,KAAKD,SAAS,EAAE;MACpC,OAAO,IAAI;IACZ;EACD;EACA,OAAO,KAAK;AACb,CAAC;AAED,OAAO,MAAMG,sBAAsB,GAClCC,IAAgC,IACnB;EACb,SAAS;;EACT,OAAOA,IAAI,EAAEC,MAAM,EAAE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AO,KAAK;IACb;IAEAD,eAAe,GAAGC,iBAAiB;EACpC;EAEA,OAAO,KAAK;AACb,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { logger } from "../../../../utils/logger";
|
|
4
|
+
import { isTeleportAvailable } from "../teleport";
|
|
5
|
+
export const resolveBoundaryPortal = ({
|
|
6
|
+
handoff,
|
|
7
|
+
escapeClipping
|
|
8
|
+
}) => {
|
|
9
|
+
const resolvedHandoff = handoff ?? false;
|
|
10
|
+
const resolvedEscapeClipping = escapeClipping ?? false;
|
|
11
|
+
const enabled = resolvedHandoff || resolvedEscapeClipping;
|
|
12
|
+
if (!enabled) {
|
|
13
|
+
return {
|
|
14
|
+
handoff: false,
|
|
15
|
+
escapeClipping: false,
|
|
16
|
+
enabled: false
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
if (!isTeleportAvailable) {
|
|
20
|
+
logger.warnOnce("boundary:teleport-missing", "react-native-teleport is not installed; handoff and escapeClipping boundaries will render inline.");
|
|
21
|
+
return {
|
|
22
|
+
handoff: false,
|
|
23
|
+
escapeClipping: false,
|
|
24
|
+
enabled: false
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
handoff: resolvedHandoff,
|
|
29
|
+
escapeClipping: resolvedEscapeClipping,
|
|
30
|
+
enabled
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=resolve-portal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["logger","isTeleportAvailable","resolveBoundaryPortal","handoff","escapeClipping","resolvedHandoff","resolvedEscapeClipping","enabled","warnOnce"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/resolve-portal.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,0BAA0B;AACjD,SAASC,mBAAmB,QAAQ,aAAa;AAajD,OAAO,MAAMC,qBAAqB,GAAGA,CAAC;EACrCC,OAAO;EACPC;AAC4B,CAAC,KAA4B;EACzD,MAAMC,eAAe,GAAGF,OAAO,IAAI,KAAK;EACxC,MAAMG,sBAAsB,GAAGF,cAAc,IAAI,KAAK;EAEtD,MAAMG,OAAO,GAAGF,eAAe,IAAIC,sBAAsB;EAEzD,IAAI,CAACC,OAAO,EAAE;IACb,OAAO;MACNJ,OAAO,EAAE,KAAK;MACdC,cAAc,EAAE,KAAK;MACrBG,OAAO,EAAE;IACV,CAAC;EACF;EAEA,IAAI,CAACN,mBAAmB,EAAE;IACzBD,MAAM,CAACQ,QAAQ,CACd,2BAA2B,EAC3B,mGACD,CAAC;IAED,OAAO;MACNL,OAAO,EAAE,KAAK;MACdC,cAAc,EAAE,KAAK;MACrBG,OAAO,EAAE;IACV,CAAC;EACF;EAEA,OAAO;IACNJ,OAAO,EAAEE,eAAe;IACxBD,cAAc,EAAEE,sBAAsB;IACtCC;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shallow equality for the flat signal objects produced by the portal
|
|
5
|
+
* `useAnimatedReaction` blocks. Both sides always carry the same fixed key set,
|
|
6
|
+
* so iterating one side's keys is sufficient. A `null`/`undefined` operand
|
|
7
|
+
* (the first reaction run) is treated as not-equal so the reaction proceeds.
|
|
8
|
+
*/
|
|
9
|
+
export const shallowEqual = (a, b) => {
|
|
10
|
+
"worklet";
|
|
11
|
+
|
|
12
|
+
if (!a || !b) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
const keys = Object.keys(a);
|
|
16
|
+
for (let index = 0; index < keys.length; index++) {
|
|
17
|
+
const key = keys[index];
|
|
18
|
+
if (a[key] !== b[key]) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=shallow-equal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["shallowEqual","a","b","keys","Object","index","length","key"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/shallow-equal.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,YAAY,GAAGA,CAC3BC,CAA6C,EAC7CC,CAA6C,KACzC;EACJ,SAAS;;EACT,IAAI,CAACD,CAAC,IAAI,CAACC,CAAC,EAAE;IACb,OAAO,KAAK;EACb;EAEA,MAAMC,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACF,CAAC,CAAC;EAC3B,KAAK,IAAII,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,IAAI,CAACG,MAAM,EAAED,KAAK,EAAE,EAAE;IACjD,MAAME,GAAG,GAAGJ,IAAI,CAACE,KAAK,CAAC;IACvB,IAAIJ,CAAC,CAACM,GAAG,CAAC,KAAKL,CAAC,CAACK,GAAG,CAAC,EAAE;MACtB,OAAO,KAAK;IACb;EACD;EAEA,OAAO,IAAI;AACZ,CAAC","ignoreList":[]}
|
|
@@ -8,4 +8,12 @@ export const isTeleportEnabled = teleport => {
|
|
|
8
8
|
}
|
|
9
9
|
return teleport?.enabled !== false;
|
|
10
10
|
};
|
|
11
|
+
export const shouldAttachBoundaryPortal = ({
|
|
12
|
+
enabled,
|
|
13
|
+
teleport
|
|
14
|
+
}) => {
|
|
15
|
+
"worklet";
|
|
16
|
+
|
|
17
|
+
return enabled && isTeleportEnabled(teleport);
|
|
18
|
+
};
|
|
11
19
|
//# sourceMappingURL=teleport-control.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isTeleportEnabled","teleport","enabled"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/teleport-control.ts"],"mappings":";;AAEA,OAAO,MAAMA,iBAAiB,GAC7BC,QAA6C,IACzC;EACJ,SAAS;;EAET,IAAI,OAAOA,QAAQ,KAAK,SAAS,EAAE;IAClC,OAAOA,QAAQ;EAChB;EAEA,OAAOA,QAAQ,EAAEC,OAAO,KAAK,KAAK;AACnC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["isTeleportEnabled","teleport","enabled","shouldAttachBoundaryPortal"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/teleport-control.ts"],"mappings":";;AAEA,OAAO,MAAMA,iBAAiB,GAC7BC,QAA6C,IACzC;EACJ,SAAS;;EAET,IAAI,OAAOA,QAAQ,KAAK,SAAS,EAAE;IAClC,OAAOA,QAAQ;EAChB;EAEA,OAAOA,QAAQ,EAAEC,OAAO,KAAK,KAAK;AACnC,CAAC;AAED,OAAO,MAAMC,0BAA0B,GAAGA,CAAC;EAC1CD,OAAO;EACPD;AAID,CAAC,KAAK;EACL,SAAS;;EAET,OAAOC,OAAO,IAAIF,iBAAiB,CAACC,QAAQ,CAAC;AAC9C,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const resolveNextVisiblePortalHostName = ({
|
|
4
|
+
canSwitchImmediately,
|
|
5
|
+
isInterpolatorReady,
|
|
6
|
+
requestedName,
|
|
7
|
+
shouldTeleport,
|
|
8
|
+
visibleName
|
|
9
|
+
}) => {
|
|
10
|
+
"worklet";
|
|
11
|
+
|
|
12
|
+
if (!shouldTeleport) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
if (requestedName && (canSwitchImmediately || isInterpolatorReady)) {
|
|
16
|
+
return requestedName;
|
|
17
|
+
}
|
|
18
|
+
return visibleName;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=visible-host.js.map
|