react-native-screen-transitions 3.9.0-alpha.2 → 3.9.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/shared/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 +78 -27
- 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 +195 -121
- 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/hooks/use-placeholder-styles.js +57 -0
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +1 -0
- 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 -48
- 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/components/masked-view.js +5 -0
- package/lib/commonjs/shared/components/masked-view.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +18 -8
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +34 -16
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/render-component.js +10 -0
- package/lib/commonjs/shared/components/screen-container/layers/render-component.js.map +1 -0
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +5 -3
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -1
- package/lib/commonjs/shared/index.js +4 -0
- 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/register-bounds.provider.js +6 -0
- package/lib/commonjs/shared/providers/register-bounds.provider.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 +79 -28
- 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 +201 -127
- 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/hooks/use-placeholder-styles.js +52 -0
- package/lib/module/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +1 -0
- 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 -48
- 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/components/masked-view.js +5 -0
- package/lib/module/shared/components/masked-view.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js +19 -9
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +35 -17
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/render-component.js +6 -0
- package/lib/module/shared/components/screen-container/layers/render-component.js.map +1 -0
- package/lib/module/shared/components/screen-container/layers/surface-container.js +5 -3
- package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
- package/lib/module/shared/index.js +4 -0
- 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/register-bounds.provider.js +6 -0
- package/lib/module/shared/providers/register-bounds.provider.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/component-stack/types.d.ts +26 -0
- package/lib/typescript/component-stack/types.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/hooks/use-placeholder-styles.d.ts +17 -0
- package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts.map +1 -0
- 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 +23 -30
- 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 +5 -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/render-component.d.ts +3 -0
- package/lib/typescript/shared/components/screen-container/layers/render-component.d.ts.map +1 -0
- 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 +731 -683
- 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/register-bounds.provider.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 +3 -3
- 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/types/index.d.ts +1 -1
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +99 -4
- package/lib/typescript/shared/types/screen.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/types/options.d.ts +2 -0
- package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/component-stack/types.ts +26 -0
- 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 +112 -46
- package/src/shared/components/boundary/portal/components/portal.tsx +263 -134
- package/src/shared/components/boundary/portal/hooks/use-host-measurement.ts +23 -2
- package/src/shared/components/boundary/portal/hooks/use-placeholder-styles.ts +55 -0
- 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 +42 -137
- 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/components/masked-view.tsx +4 -0
- package/src/shared/components/screen-container/layers/backdrop.tsx +31 -10
- package/src/shared/components/screen-container/layers/content.tsx +61 -22
- package/src/shared/components/screen-container/layers/render-component.ts +9 -0
- package/src/shared/components/screen-container/layers/surface-container.tsx +5 -4
- package/src/shared/index.ts +9 -5
- package/src/shared/providers/helpers/measured-bounds-writes.ts +6 -11
- package/src/shared/providers/register-bounds.provider.tsx +5 -0
- 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/types/index.ts +5 -0
- package/src/shared/types/screen.types.ts +111 -4
- 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/types/options.ts +2 -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
|
@@ -3,21 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useActiveHostKey = exports.unregisterHost = exports.resetHostRegistry = exports.registerHost = exports.
|
|
6
|
+
exports.useActiveHostKey = exports.unregisterHost = exports.resetHostRegistry = exports.registerHost = exports.getActiveHostKey = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
8
|
const EMPTY_SNAPSHOT = {};
|
|
10
9
|
const listeners = new Set();
|
|
11
10
|
const hostStacks = new Map();
|
|
12
11
|
let snapshot = EMPTY_SNAPSHOT;
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
14
|
+
* The active host for a screen. Stack ordering is the load-bearing invariant:
|
|
15
|
+
* `registerHost` unshifts fallback hosts to the front and pushes real hosts to
|
|
16
|
+
* the back, so the active host is the last real (non-fallback) host, falling
|
|
17
|
+
* back to the first entry and finally to the screen's own key.
|
|
19
18
|
*/
|
|
20
|
-
const activeScrollHosts = (0, _reactNativeReanimated.makeMutable)({});
|
|
21
19
|
const getActiveHostFromStack = (screenKey, stack) => {
|
|
22
20
|
if (!stack || stack.length === 0) {
|
|
23
21
|
return screenKey;
|
|
@@ -37,23 +35,8 @@ const buildSnapshot = () => {
|
|
|
37
35
|
}
|
|
38
36
|
return nextSnapshot;
|
|
39
37
|
};
|
|
40
|
-
const buildScrollHostSnapshot = () => {
|
|
41
|
-
const nextSnapshot = {};
|
|
42
|
-
for (const [screenKey, stack] of hostStacks) {
|
|
43
|
-
const activeHostKey = getActiveHostFromStack(screenKey, stack);
|
|
44
|
-
const activeHost = stack.find(host => host.hostKey === activeHostKey);
|
|
45
|
-
if (activeHost?.capturesScroll) {
|
|
46
|
-
nextSnapshot[screenKey] = {
|
|
47
|
-
hostKey: activeHost.hostKey,
|
|
48
|
-
capturesScroll: true
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return nextSnapshot;
|
|
53
|
-
};
|
|
54
38
|
const emit = () => {
|
|
55
39
|
snapshot = buildSnapshot();
|
|
56
|
-
activeScrollHosts.set(buildScrollHostSnapshot());
|
|
57
40
|
for (const listener of listeners) {
|
|
58
41
|
listener();
|
|
59
42
|
}
|
|
@@ -101,28 +84,7 @@ exports.unregisterHost = unregisterHost;
|
|
|
101
84
|
const getActiveHostKey = screenKey => {
|
|
102
85
|
return snapshot[screenKey] ?? screenKey;
|
|
103
86
|
};
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* The screen's active host, if it captures scroll. Worklet-safe: measurement
|
|
107
|
-
* code calls this on the UI thread while writing source bounds.
|
|
108
|
-
*/
|
|
109
87
|
exports.getActiveHostKey = getActiveHostKey;
|
|
110
|
-
const getActiveScrollHost = screenKey => {
|
|
111
|
-
"worklet";
|
|
112
|
-
|
|
113
|
-
return activeScrollHosts.get()[screenKey] ?? null;
|
|
114
|
-
};
|
|
115
|
-
exports.getActiveScrollHost = getActiveScrollHost;
|
|
116
|
-
const getHostCapturesScroll = hostKey => {
|
|
117
|
-
for (const stack of hostStacks.values()) {
|
|
118
|
-
const host = stack.find(registration => registration.hostKey === hostKey);
|
|
119
|
-
if (host) {
|
|
120
|
-
return host.capturesScroll;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return false;
|
|
124
|
-
};
|
|
125
|
-
exports.getHostCapturesScroll = getHostCapturesScroll;
|
|
126
88
|
const useActiveHostKey = screenKey => {
|
|
127
89
|
return (0, _react.useSyncExternalStore)(subscribe, () => screenKey ? getActiveHostKey(screenKey) : undefined, () => undefined);
|
|
128
90
|
};
|
|
@@ -130,7 +92,6 @@ exports.useActiveHostKey = useActiveHostKey;
|
|
|
130
92
|
const resetHostRegistry = () => {
|
|
131
93
|
hostStacks.clear();
|
|
132
94
|
snapshot = EMPTY_SNAPSHOT;
|
|
133
|
-
activeScrollHosts.set({});
|
|
134
95
|
emit();
|
|
135
96
|
};
|
|
136
97
|
exports.resetHostRegistry = resetHostRegistry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","
|
|
1
|
+
{"version":3,"names":["_react","require","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","exports","unregisterHost","getActiveHostKey","useActiveHostKey","useSyncExternalStore","undefined","resetHostRegistry","clear"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/stores/host-registry.store.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAWA,MAAMC,cAAoC,GAAG,CAAC,CAAC;AAE/C,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAA6B,CAAC;AAExD,IAAIC,QAA8B,GAAGL,cAAc;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,sBAAsB,GAAGA,CAC9BC,SAAiB,EACjBC,KAAqC,KACjC;EACJ,IAAI,CAACA,KAAK,IAAIA,KAAK,CAACC,MAAM,KAAK,CAAC,EAAE;IACjC,OAAOF,SAAS;EACjB;EAEA,KAAK,IAAIG,KAAK,GAAGF,KAAK,CAACC,MAAM,GAAG,CAAC,EAAEC,KAAK,IAAI,CAAC,EAAEA,KAAK,EAAE,EAAE;IACvD,MAAMC,IAAI,GAAGH,KAAK,CAACE,KAAK,CAAC;IACzB,IAAI,CAACC,IAAI,CAACC,QAAQ,EAAE;MACnB,OAAOD,IAAI,CAACE,OAAO;IACpB;EACD;EAEA,OAAOL,KAAK,CAAC,CAAC,CAAC,EAAEK,OAAO,IAAIN,SAAS;AACtC,CAAC;AAED,MAAMO,aAAa,GAAGA,CAAA,KAA4B;EACjD,MAAMC,YAAkC,GAAG,CAAC,CAAC;EAE7C,KAAK,MAAM,CAACR,SAAS,EAAEC,KAAK,CAAC,IAAIL,UAAU,EAAE;IAC5CY,YAAY,CAACR,SAAS,CAAC,GAAGD,sBAAsB,CAACC,SAAS,EAAEC,KAAK,CAAC;EACnE;EAEA,OAAOO,YAAY;AACpB,CAAC;AAED,MAAMC,IAAI,GAAGA,CAAA,KAAM;EAClBX,QAAQ,GAAGS,aAAa,CAAC,CAAC;EAE1B,KAAK,MAAMG,QAAQ,IAAIhB,SAAS,EAAE;IACjCgB,QAAQ,CAAC,CAAC;EACX;AACD,CAAC;AAED,MAAMC,SAAS,GAAID,QAAoB,IAAK;EAC3ChB,SAAS,CAACkB,GAAG,CAACF,QAAQ,CAAC;EAEvB,OAAO,MAAM;IACZhB,SAAS,CAACmB,MAAM,CAACH,QAAQ,CAAC;EAC3B,CAAC;AACF,CAAC;AAEM,MAAMI,YAAY,GAAIC,YAA8B,IAAK;EAC/D,MAAMd,KAAK,GAAGL,UAAU,CAACoB,GAAG,CAACD,YAAY,CAACf,SAAS,CAAC,IAAI,EAAE;EAC1D,MAAMiB,qBAAqB,GAAGlB,sBAAsB,CACnDgB,YAAY,CAACf,SAAS,EACtBC,KACD,CAAC;EACD,MAAMiB,SAAS,GAAGjB,KAAK,CAACkB,MAAM,CAC5Bf,IAAI,IAAKA,IAAI,CAACE,OAAO,KAAKS,YAAY,CAACT,OACzC,CAAC;EAED,IAAIS,YAAY,CAACV,QAAQ,EAAE;IAC1Ba,SAAS,CAACE,OAAO,CAACL,YAAY,CAAC;EAChC,CAAC,MAAM;IACNG,SAAS,CAACG,IAAI,CAACN,YAAY,CAAC;EAC7B;EAEAnB,UAAU,CAAC0B,GAAG,CAACP,YAAY,CAACf,SAAS,EAAEkB,SAAS,CAAC;EAEjD,IACCD,qBAAqB,KACrBlB,sBAAsB,CAACgB,YAAY,CAACf,SAAS,EAAEkB,SAAS,CAAC,EACxD;IACD;EACD;EAEAT,IAAI,CAAC,CAAC;AACP,CAAC;AAACc,OAAA,CAAAT,YAAA,GAAAA,YAAA;AAEK,MAAMU,cAAc,GAAGA,CAACxB,SAAiB,EAAEM,OAAe,KAAK;EACrE,MAAML,KAAK,GAAGL,UAAU,CAACoB,GAAG,CAAChB,SAAS,CAAC;EACvC,IAAI,CAACC,KAAK,EAAE;IACX;EACD;EAEA,MAAMgB,qBAAqB,GAAGlB,sBAAsB,CAACC,SAAS,EAAEC,KAAK,CAAC;EACtE,MAAMiB,SAAS,GAAGjB,KAAK,CAACkB,MAAM,CAAEf,IAAI,IAAKA,IAAI,CAACE,OAAO,KAAKA,OAAO,CAAC;EAElE,IAAIY,SAAS,CAAChB,MAAM,KAAK,CAAC,EAAE;IAC3BN,UAAU,CAACiB,MAAM,CAACb,SAAS,CAAC;EAC7B,CAAC,MAAM;IACNJ,UAAU,CAAC0B,GAAG,CAACtB,SAAS,EAAEkB,SAAS,CAAC;EACrC;EAEA,IAAID,qBAAqB,KAAKlB,sBAAsB,CAACC,SAAS,EAAEkB,SAAS,CAAC,EAAE;IAC3E;EACD;EAEAT,IAAI,CAAC,CAAC;AACP,CAAC;AAACc,OAAA,CAAAC,cAAA,GAAAA,cAAA;AAEK,MAAMC,gBAAgB,GAAIzB,SAAiB,IAAK;EACtD,OAAOF,QAAQ,CAACE,SAAS,CAAC,IAAIA,SAAS;AACxC,CAAC;AAACuB,OAAA,CAAAE,gBAAA,GAAAA,gBAAA;AAEK,MAAMC,gBAAgB,GAAI1B,SAAyB,IAAK;EAC9D,OAAO,IAAA2B,2BAAoB,EAC1BhB,SAAS,EACT,MAAOX,SAAS,GAAGyB,gBAAgB,CAACzB,SAAS,CAAC,GAAG4B,SAAU,EAC3D,MAAMA,SACP,CAAC;AACF,CAAC;AAACL,OAAA,CAAAG,gBAAA,GAAAA,gBAAA;AAEK,MAAMG,iBAAiB,GAAGA,CAAA,KAAM;EACtCjC,UAAU,CAACkC,KAAK,CAAC,CAAC;EAClBhC,QAAQ,GAAGL,cAAc;EACzBgB,IAAI,CAAC,CAAC;AACP,CAAC;AAACc,OAAA,CAAAM,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useActivePortalBoundaryHosts = exports.unmountPortalBoundaryHost = exports.mountPortalBoundaryHost = void 0;
|
|
6
|
+
exports.useActivePortalBoundaryHosts = exports.unmountPortalBoundaryHost = exports.mountPortalBoundaryHost = exports.dropStalePortalBoundaryHosts = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
const EMPTY_HOSTS = [];
|
|
9
9
|
const listeners = new Set();
|
|
@@ -29,24 +29,56 @@ const emit = () => {
|
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
const isSameHost = (a, b) => {
|
|
32
|
-
return a.boundaryId === b.boundaryId && a.
|
|
32
|
+
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;
|
|
33
33
|
};
|
|
34
34
|
const mountPortalBoundaryHost = host => {
|
|
35
|
-
const previous = activeBoundaryHosts.get(host.
|
|
35
|
+
const previous = activeBoundaryHosts.get(host.portalHostName);
|
|
36
36
|
if (previous && isSameHost(previous, host)) {
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
activeBoundaryHosts.set(host.
|
|
39
|
+
activeBoundaryHosts.set(host.portalHostName, host);
|
|
40
40
|
emit();
|
|
41
41
|
};
|
|
42
42
|
exports.mountPortalBoundaryHost = mountPortalBoundaryHost;
|
|
43
43
|
const unmountPortalBoundaryHost = boundaryId => {
|
|
44
|
-
|
|
44
|
+
let didDelete = false;
|
|
45
|
+
for (const [hostEntryKey, host] of activeBoundaryHosts) {
|
|
46
|
+
if (host.boundaryId !== boundaryId) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
activeBoundaryHosts.delete(hostEntryKey);
|
|
50
|
+
didDelete = true;
|
|
51
|
+
}
|
|
52
|
+
if (!didDelete) {
|
|
45
53
|
return;
|
|
46
54
|
}
|
|
47
55
|
emit();
|
|
48
56
|
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Post-handoff GC: drop every receiver for this boundary except the one now
|
|
60
|
+
* visible (`keepPortalHostName`). Called once the new host is confirmed on
|
|
61
|
+
* screen so the superseded receivers stop rendering.
|
|
62
|
+
*/
|
|
49
63
|
exports.unmountPortalBoundaryHost = unmountPortalBoundaryHost;
|
|
64
|
+
const dropStalePortalBoundaryHosts = ({
|
|
65
|
+
boundaryId,
|
|
66
|
+
keepPortalHostName
|
|
67
|
+
}) => {
|
|
68
|
+
let didDelete = false;
|
|
69
|
+
for (const [hostEntryKey, host] of activeBoundaryHosts) {
|
|
70
|
+
if (host.boundaryId !== boundaryId || host.portalHostName === keepPortalHostName) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
activeBoundaryHosts.delete(hostEntryKey);
|
|
74
|
+
didDelete = true;
|
|
75
|
+
}
|
|
76
|
+
if (!didDelete) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
emit();
|
|
80
|
+
};
|
|
81
|
+
exports.dropStalePortalBoundaryHosts = dropStalePortalBoundaryHosts;
|
|
50
82
|
const subscribe = listener => {
|
|
51
83
|
listeners.add(listener);
|
|
52
84
|
return () => {
|
package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","
|
|
1
|
+
{"version":3,"names":["_react","require","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","exports","unmountPortalBoundaryHost","didDelete","hostEntryKey","delete","dropStalePortalBoundaryHosts","keepPortalHostName","subscribe","add","useActivePortalBoundaryHosts","useSyncExternalStore"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/stores/portal-boundary-host.store.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isTeleportAvailable = exports.NativePortalProvider = exports.NativePortalHost = exports.NativePortal = void 0;
|
|
7
|
+
var _react = require("react");
|
|
7
8
|
/**
|
|
8
9
|
* `react-native-teleport` is an optional peer dependency. The require sits in a
|
|
9
10
|
* try/catch so Metro treats it as an optional dependency — an absent module no
|
|
@@ -13,11 +14,23 @@ exports.isTeleportAvailable = exports.NativePortalProvider = exports.NativePorta
|
|
|
13
14
|
* rendering; everything else keeps working.
|
|
14
15
|
*/
|
|
15
16
|
let mod = null;
|
|
17
|
+
let managerMod = null;
|
|
18
|
+
let providerViewMod = null;
|
|
16
19
|
try {
|
|
17
20
|
mod = require("react-native-teleport");
|
|
21
|
+
managerMod = require("react-native-teleport/lib/module/contexts/PortalManager");
|
|
22
|
+
providerViewMod = require("react-native-teleport/lib/module/views/PortalProvider");
|
|
18
23
|
} catch {}
|
|
19
|
-
const
|
|
24
|
+
const NativePortalProviderView = providerViewMod?.default ?? null;
|
|
25
|
+
const PortalManagerProvider = managerMod?.PortalManagerProvider ?? null;
|
|
26
|
+
const SafeNativePortalProvider = PortalManagerProvider ? ({
|
|
27
|
+
children
|
|
28
|
+
}) => {
|
|
29
|
+
const managedChildren = /*#__PURE__*/(0, _react.createElement)(PortalManagerProvider, null, children);
|
|
30
|
+
return NativePortalProviderView ? /*#__PURE__*/(0, _react.createElement)(NativePortalProviderView, null, managedChildren) : managedChildren;
|
|
31
|
+
} : null;
|
|
32
|
+
const isTeleportAvailable = exports.isTeleportAvailable = mod !== null && SafeNativePortalProvider !== null;
|
|
20
33
|
const NativePortal = exports.NativePortal = mod?.Portal ?? null;
|
|
21
|
-
const NativePortalProvider = exports.NativePortalProvider =
|
|
34
|
+
const NativePortalProvider = exports.NativePortalProvider = SafeNativePortalProvider;
|
|
22
35
|
const NativePortalHost = exports.NativePortalHost = mod?.PortalHost ?? null;
|
|
23
36
|
//# sourceMappingURL=teleport.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_react","require","mod","managerMod","providerViewMod","NativePortalProviderView","default","PortalManagerProvider","SafeNativePortalProvider","children","managedChildren","createElement","isTeleportAvailable","exports","NativePortal","Portal","NativePortalProvider","NativePortalHost","PortalHost"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/portal/teleport.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA;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,GAAGD,OAAO,CAAC,uBAAuB,CAAC;EACtCE,UAAU,GAAGF,OAAO,CAAC,yDAAyD,CAAC;EAC/EG,eAAe,GAAGH,OAAO,CAAC,uDAAuD,CAAC;AACnF,CAAC,CAAC,MAAM,CAAC;AAET,MAAMI,wBAAuE,GAC5ED,eAAe,EAAEE,OAAO,IAAI,IAAI;AACjC,MAAMC,qBAAoE,GACzEJ,UAAU,EAAEI,qBAAqB,IAAI,IAAI;AAE1C,MAAMC,wBAAuE,GAC5ED,qBAAqB,GAClB,CAAC;EAAEE;AAAkC,CAAC,KAAK;EAC3C,MAAMC,eAAe,gBAAG,IAAAC,oBAAa,EACpCJ,qBAAqB,EACrB,IAAI,EACJE,QACD,CAAC;EAED,OAAOJ,wBAAwB,gBAC5B,IAAAM,oBAAa,EAACN,wBAAwB,EAAE,IAAI,EAAEK,eAAe,CAAC,GAC9DA,eAAe;AACnB,CAAC,GACA,IAAI;AAED,MAAME,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAC/BV,GAAG,KAAK,IAAI,IAAIM,wBAAwB,KAAK,IAAI;AAC3C,MAAMM,YAAuC,GAAAD,OAAA,CAAAC,YAAA,GAAGZ,GAAG,EAAEa,MAAM,IAAI,IAAI;AACnE,MAAMC,oBAA+C,GAAAH,OAAA,CAAAG,oBAAA,GAC3DR,wBAAwB;AAClB,MAAMS,gBAA2C,GAAAJ,OAAA,CAAAI,gBAAA,GACvDf,GAAG,EAAEgB,UAAU,IAAI,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.hasLocalSlot = void 0;
|
|
7
|
+
const hasLocalSlot = (localStylesMaps, slotId) => {
|
|
8
|
+
"worklet";
|
|
9
|
+
|
|
10
|
+
for (let index = 0; index < localStylesMaps.length; index++) {
|
|
11
|
+
if (localStylesMaps[index]?.[slotId] !== undefined) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return false;
|
|
16
|
+
};
|
|
17
|
+
exports.hasLocalSlot = hasLocalSlot;
|
|
18
|
+
//# sourceMappingURL=has-local-slot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["hasLocalSlot","localStylesMaps","slotId","index","length","undefined","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/has-local-slot.ts"],"mappings":";;;;;;AAEO,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;AAACC,OAAA,CAAAN,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -3,13 +3,20 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.createPortalBoundaryHostName = exports.PORTAL_HOST_NAME_RESET_VALUE = void 0;
|
|
6
|
+
exports.createPortalBoundaryHostName = exports.createBoundaryLocalPortalHostName = exports.PORTAL_HOST_NAME_RESET_VALUE = void 0;
|
|
7
7
|
const PORTAL_HOST_NAME_RESET_VALUE = exports.PORTAL_HOST_NAME_RESET_VALUE = null;
|
|
8
8
|
const PORTAL_HOST_NAME_SUFFIX = "-portal-host";
|
|
9
|
-
const
|
|
9
|
+
const BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX = "-boundary-local-portal-host";
|
|
10
|
+
const createPortalBoundaryHostName = (hostKey, boundaryId, pairKey) => {
|
|
10
11
|
"worklet";
|
|
11
12
|
|
|
12
|
-
return `${hostKey}-${boundaryId}${PORTAL_HOST_NAME_SUFFIX}`;
|
|
13
|
+
return `${hostKey}-${pairKey ? `${pairKey}-` : ""}${boundaryId}${PORTAL_HOST_NAME_SUFFIX}`;
|
|
13
14
|
};
|
|
14
15
|
exports.createPortalBoundaryHostName = createPortalBoundaryHostName;
|
|
16
|
+
const createBoundaryLocalPortalHostName = (screenKey, boundaryId) => {
|
|
17
|
+
"worklet";
|
|
18
|
+
|
|
19
|
+
return `${screenKey}-${boundaryId}${BOUNDARY_LOCAL_PORTAL_HOST_NAME_SUFFIX}`;
|
|
20
|
+
};
|
|
21
|
+
exports.createBoundaryLocalPortalHostName = createBoundaryLocalPortalHostName;
|
|
15
22
|
//# sourceMappingURL=naming.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","exports","PORTAL_HOST_NAME_SUFFIX","createPortalBoundaryHostName","hostKey","boundaryId"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/naming.ts"],"mappings":";;;;;;AAAO,MAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,IAAI;AAChD,MAAME,uBAAuB,GAAG,cAAc;
|
|
1
|
+
{"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","exports","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":";;;;;;AAAO,MAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,IAAI;AAChD,MAAME,uBAAuB,GAAG,cAAc;AAC9C,MAAMC,sCAAsC,GAAG,6BAA6B;AAErE,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;AAACD,OAAA,CAAAG,4BAAA,GAAAA,4BAAA;AAEK,MAAMI,iCAAiC,GAAGA,CAChDC,SAAiB,EACjBH,UAAkB,KACd;EACJ,SAAS;;EACT,OAAO,GAAGG,SAAS,IAAIH,UAAU,GAAGH,sCAAsC,EAAE;AAC7E,CAAC;AAACF,OAAA,CAAAO,iCAAA,GAAAA,iCAAA","ignoreList":[]}
|
|
@@ -4,67 +4,47 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolvePortalOffsetStyle = void 0;
|
|
7
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
7
|
var _scroll = require("../../../../stores/scroll.store");
|
|
9
8
|
var _hostBounds = require("../stores/host-bounds.store");
|
|
9
|
+
/**
|
|
10
|
+
* The two portal coordinate cases we support:
|
|
11
|
+
*
|
|
12
|
+
* - same-screen: source and host live on the same screen; re-base the stored
|
|
13
|
+
* host frame onto the source measurement's scroll snapshot.
|
|
14
|
+
* - cross-screen: source and host live on different screens; the host is the
|
|
15
|
+
* replacement coordinate space, so destination scroll is inherited naturally
|
|
16
|
+
* from host placement instead of manually propagated.
|
|
17
|
+
*/
|
|
18
|
+
|
|
10
19
|
const resolvePortalOffsetStyle = ({
|
|
11
|
-
alignHostToBoundsScroll = false,
|
|
12
20
|
bounds,
|
|
13
|
-
boundsCurrentScroll,
|
|
14
|
-
compensateSourceScroll = false,
|
|
15
|
-
currentScroll,
|
|
16
|
-
hostCurrentScroll,
|
|
17
21
|
hostKey,
|
|
18
|
-
hostProgress = 0,
|
|
19
|
-
includeScrollOffsets = true,
|
|
20
22
|
placement,
|
|
21
|
-
|
|
22
|
-
sourceCurrentScroll,
|
|
23
|
-
trackSourceScroll = false
|
|
23
|
+
landingShift
|
|
24
24
|
}) => {
|
|
25
25
|
"worklet";
|
|
26
26
|
|
|
27
27
|
const hostBounds = (0, _hostBounds.getPortalHostBounds)(hostKey);
|
|
28
|
-
const shouldAlignHostToBoundsScroll = placement ? placement === "same-screen" : alignHostToBoundsScroll;
|
|
29
|
-
const shouldCompensateSourceScroll = trackSourceScroll || compensateSourceScroll;
|
|
30
|
-
const shouldIncludeHostScrollOffsets = placement ? placement === "cross-screen-close" : includeScrollOffsets;
|
|
31
28
|
const boundsScrollSnapshot = bounds.scroll ?? null;
|
|
32
|
-
const sourceScrollSnapshot = shouldCompensateSourceScroll ? boundsScrollSnapshot : null;
|
|
33
|
-
const sourceScrollDeltaX = shouldCompensateSourceScroll ? (0, _scroll.getClampedScrollAxisDelta)(sourceCurrentScroll ?? null, sourceScrollSnapshot, "horizontal") : 0;
|
|
34
|
-
const sourceScrollDeltaY = shouldCompensateSourceScroll ? (0, _scroll.getClampedScrollAxisDelta)(sourceCurrentScroll ?? null, sourceScrollSnapshot, "vertical") : 0;
|
|
35
|
-
const sourcePageX = bounds.pageX - sourceScrollDeltaX;
|
|
36
|
-
const sourcePageY = bounds.pageY - sourceScrollDeltaY;
|
|
37
|
-
const boundsScroll = shouldIncludeHostScrollOffsets ? boundsScrollSnapshot ?? boundsCurrentScroll ?? currentScroll ?? null : null;
|
|
38
29
|
const hostBoundsScrollSnapshot = hostBounds?.scroll ?? null;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const offsetX = hostBounds ? sourcePageX - adjustedHostPageX : sourcePageX - boundsScrollDeltaX;
|
|
52
|
-
const offsetY = hostBounds ? sourcePageY - adjustedHostPageY : sourcePageY - boundsScrollDeltaY;
|
|
53
|
-
const transform = [{
|
|
54
|
-
translateY: offsetY
|
|
55
|
-
}, {
|
|
56
|
-
translateX: offsetX
|
|
57
|
-
}];
|
|
58
|
-
if (position === "absolute") {
|
|
59
|
-
return {
|
|
60
|
-
left: 0,
|
|
61
|
-
position: "absolute",
|
|
62
|
-
top: 0,
|
|
63
|
-
transform
|
|
64
|
-
};
|
|
65
|
-
}
|
|
30
|
+
|
|
31
|
+
// same-screen re-bases the static host frame onto the source scroll snapshot.
|
|
32
|
+
// Cross-screen hosts are the chosen replacement coordinate space, so their
|
|
33
|
+
// destination scroll is represented by where the host itself is mounted.
|
|
34
|
+
const alignHostToBoundsScroll = placement === "same-screen";
|
|
35
|
+
const hostSnapshotDeltaX = alignHostToBoundsScroll ? (0, _scroll.getClampedScrollAxisDelta)(boundsScrollSnapshot, hostBoundsScrollSnapshot, "horizontal") : 0;
|
|
36
|
+
const hostSnapshotDeltaY = alignHostToBoundsScroll ? (0, _scroll.getClampedScrollAxisDelta)(boundsScrollSnapshot, hostBoundsScrollSnapshot, "vertical") : 0;
|
|
37
|
+
|
|
38
|
+
// Without registered host bounds the host frame is the origin, so the source
|
|
39
|
+
// page position becomes the offset directly.
|
|
40
|
+
const adjustedHostPageX = hostBounds ? hostBounds.pageX - hostSnapshotDeltaX : 0;
|
|
41
|
+
const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY : 0;
|
|
66
42
|
return {
|
|
67
|
-
transform
|
|
43
|
+
transform: [{
|
|
44
|
+
translateY: bounds.pageY - adjustedHostPageY + (landingShift?.y ?? 0)
|
|
45
|
+
}, {
|
|
46
|
+
translateX: bounds.pageX - adjustedHostPageX + (landingShift?.x ?? 0)
|
|
47
|
+
}]
|
|
68
48
|
};
|
|
69
49
|
};
|
|
70
50
|
exports.resolvePortalOffsetStyle = resolvePortalOffsetStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_scroll","require","_hostBounds","resolvePortalOffsetStyle","bounds","hostKey","placement","landingShift","hostBounds","getPortalHostBounds","boundsScrollSnapshot","scroll","hostBoundsScrollSnapshot","alignHostToBoundsScroll","hostSnapshotDeltaX","getClampedScrollAxisDelta","hostSnapshotDeltaY","adjustedHostPageX","pageX","adjustedHostPageY","pageY","transform","translateY","y","translateX","x","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/offset-style.ts"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBO,MAAME,wBAAwB,GAAGA,CAAC;EACxCC,MAAM;EACNC,OAAO;EACPC,SAAS;EACTC;AAC+B,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAG,IAAAC,+BAAmB,EAACJ,OAAO,CAAC;EAC/C,MAAMK,oBAAoB,GAAGN,MAAM,CAACO,MAAM,IAAI,IAAI;EAClD,MAAMC,wBAAwB,GAAGJ,UAAU,EAAEG,MAAM,IAAI,IAAI;;EAE3D;EACA;EACA;EACA,MAAME,uBAAuB,GAAGP,SAAS,KAAK,aAAa;EAE3D,MAAMQ,kBAAkB,GAAGD,uBAAuB,GAC/C,IAAAE,iCAAyB,EACzBL,oBAAoB,EACpBE,wBAAwB,EACxB,YACD,CAAC,GACA,CAAC;EACJ,MAAMI,kBAAkB,GAAGH,uBAAuB,GAC/C,IAAAE,iCAAyB,EACzBL,oBAAoB,EACpBE,wBAAwB,EACxB,UACD,CAAC,GACA,CAAC;;EAEJ;EACA;EACA,MAAMK,iBAAiB,GAAGT,UAAU,GACjCA,UAAU,CAACU,KAAK,GAAGJ,kBAAkB,GACrC,CAAC;EACJ,MAAMK,iBAAiB,GAAGX,UAAU,GACjCA,UAAU,CAACY,KAAK,GAAGJ,kBAAkB,GACrC,CAAC;EAEJ,OAAO;IACNK,SAAS,EAAE,CACV;MAAEC,UAAU,EAAElB,MAAM,CAACgB,KAAK,GAAGD,iBAAiB,IAAIZ,YAAY,EAAEgB,CAAC,IAAI,CAAC;IAAE,CAAC,EACzE;MAAEC,UAAU,EAAEpB,MAAM,CAACc,KAAK,GAAGD,iBAAiB,IAAIV,YAAY,EAAEkB,CAAC,IAAI,CAAC;IAAE,CAAC;EAE3E,CAAC;AACF,CAAC;AAACC,OAAA,CAAAvB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|