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
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.BoundaryTarget = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
9
|
-
var _styles = require("../../../
|
|
9
|
+
var _styles = require("../../../providers/screen/styles");
|
|
10
|
+
var _styles2 = require("../../../utils/bounds/helpers/styles/styles");
|
|
10
11
|
var _logger = require("../../../utils/logger");
|
|
11
12
|
var _portal = require("../portal/components/portal");
|
|
12
13
|
var _boundaryRoot = require("../providers/boundary-root.provider");
|
|
@@ -23,12 +24,15 @@ const BoundaryTarget = exports.BoundaryTarget = /*#__PURE__*/(0, _react.memo)(fu
|
|
|
23
24
|
const registerTargetRef = rootContext?.registerTargetRef;
|
|
24
25
|
const unregisterTargetRef = rootContext?.unregisterTargetRef;
|
|
25
26
|
const isActiveTarget = rootContext?.activeTargetRef === targetAnimatedRef;
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const
|
|
27
|
+
const portalRuntime = rootContext?.portalRuntime;
|
|
28
|
+
const shouldApplyAssociatedStyleInline = isActiveTarget && portalRuntime?.enabled !== true;
|
|
29
|
+
const shouldApplyPortalLayoutStyle = isActiveTarget && portalRuntime?.enabled === true;
|
|
30
|
+
const associatedTargetStyles = (0, _styles.useComposedSlotStyles)(rootContext?.boundTag.tag, style);
|
|
31
|
+
const portalLayoutStyle = (0, _styles.useSlotLayoutStyles)(rootContext?.boundTag.tag);
|
|
32
|
+
const preparedStyles = (0, _react.useMemo)(() => (0, _styles2.prepareStyleForBounds)(style), [style]);
|
|
33
|
+
// Teleported content can render outside its layout slot. The placeholder is
|
|
34
|
+
// the truthful measurement surface whenever runtime portal behavior is active.
|
|
35
|
+
const measurementRef = portalRuntime?.enabled ? placeholderAnimatedRef : targetAnimatedRef;
|
|
32
36
|
(0, _react.useLayoutEffect)(() => {
|
|
33
37
|
if (!registerTargetRef || !unregisterTargetRef) {
|
|
34
38
|
if (__DEV__) {
|
|
@@ -43,12 +47,13 @@ const BoundaryTarget = exports.BoundaryTarget = /*#__PURE__*/(0, _react.memo)(fu
|
|
|
43
47
|
}, [registerTargetRef, unregisterTargetRef, targetAnimatedRef, preparedStyles, measurementRef]);
|
|
44
48
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_portal.Portal, {
|
|
45
49
|
id: rootContext?.boundTag.tag,
|
|
46
|
-
|
|
50
|
+
handoff: portalRuntime?.handoff,
|
|
51
|
+
escapeClipping: portalRuntime?.escapeClipping,
|
|
47
52
|
placeholderRef: placeholderAnimatedRef,
|
|
48
53
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
49
54
|
...rest,
|
|
50
55
|
ref: targetAnimatedRef,
|
|
51
|
-
style: [style,
|
|
56
|
+
style: [style, shouldApplyAssociatedStyleInline ? associatedTargetStyles : undefined, shouldApplyPortalLayoutStyle ? portalLayoutStyle : undefined],
|
|
52
57
|
collapsable: false
|
|
53
58
|
})
|
|
54
59
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_styles","_logger","_portal","_boundaryRoot","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BoundaryTarget","exports","memo","props","style","rest","targetAnimatedRef","useAnimatedRef","placeholderAnimatedRef","rootContext","useBoundaryRootContext","registerTargetRef","unregisterTargetRef","isActiveTarget","activeTargetRef","preparedStyles","useMemo","prepareStyleForBounds","measurementRef","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_styles","_styles2","_logger","_portal","_boundaryRoot","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BoundaryTarget","exports","memo","props","style","rest","targetAnimatedRef","useAnimatedRef","placeholderAnimatedRef","rootContext","useBoundaryRootContext","registerTargetRef","unregisterTargetRef","isActiveTarget","activeTargetRef","portalRuntime","shouldApplyAssociatedStyleInline","enabled","shouldApplyPortalLayoutStyle","associatedTargetStyles","useComposedSlotStyles","boundTag","tag","portalLayoutStyle","useSlotLayoutStyles","preparedStyles","useMemo","prepareStyleForBounds","measurementRef","useLayoutEffect","__DEV__","logger","warn","TARGET_OUTSIDE_ROOT_WARNING","jsx","Portal","id","handoff","escapeClipping","placeholderRef","children","View","ref","undefined","collapsable"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/components/boundary-target.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAIA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,aAAA,GAAAP,OAAA;AAG6C,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAE,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA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AAE,CAACA,KAAK,CAAC,CAAC;EAC3E;EACA;EACA,MAAMwB,cAAc,GAAGb,aAAa,EAAEE,OAAO,GAC1CT,sBAAsB,GACtBF,iBAAiB;EAEpB,IAAAuB,sBAAe,EAAC,MAAM;IACrB,IAAI,CAAClB,iBAAiB,IAAI,CAACC,mBAAmB,EAAE;MAC/C,IAAIkB,OAAO,EAAE;QACZC,cAAM,CAACC,IAAI,CAACC,yCAA2B,CAAC;MACzC;MACA;IACD;IAEAtB,iBAAiB,CAACL,iBAAiB,EAAEmB,cAAc,EAAEG,cAAc,CAAC;IACpE,OAAO,MAAM;MACZhB,mBAAmB,CAACN,iBAAiB,CAAC;IACvC,CAAC;EACF,CAAC,EAAE,CACFK,iBAAiB,EACjBC,mBAAmB,EACnBN,iBAAiB,EACjBmB,cAAc,EACdG,cAAc,CACd,CAAC;EAEF,oBACC,IAAAhD,WAAA,CAAAsD,GAAA,EAACxD,OAAA,CAAAyD,MAAM;IACNC,EAAE,EAAE3B,WAAW,EAAEY,QAAQ,CAACC,GAAI;IAC9Be,OAAO,EAAEtB,aAAa,EAAEsB,OAAQ;IAChCC,cAAc,EAAEvB,aAAa,EAAEuB,cAAe;IAC9CC,cAAc,EAAE/B,sBAAuB;IAAAgC,QAAA,eAEvC,IAAA5D,WAAA,CAAAsD,GAAA,EAAC7D,sBAAA,CAAAkB,OAAQ,CAACkD,IAAI;MAAA,GACTpC,IAAI;MACRqC,GAAG,EAAEpC,iBAAkB;MACvBF,KAAK,EAAE,CACNA,KAAK,EACLY,gCAAgC,GAAGG,sBAAsB,GAAGwB,SAAS,EACrEzB,4BAA4B,GAAGK,iBAAiB,GAAGoB,SAAS,CAC3D;MACFC,WAAW,EAAE;IAAM,CACnB;EAAC,CACK,CAAC;AAEX,CAAC,CAAC","ignoreList":[]}
|
|
@@ -5,19 +5,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createBoundaryComponent = createBoundaryComponent;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var _reactNativeReanimated =
|
|
8
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
9
9
|
var _descriptors = require("../../providers/screen/descriptors");
|
|
10
10
|
var _styles = require("../../providers/screen/styles");
|
|
11
11
|
var _linkPairs = require("../../stores/bounds/helpers/link-pairs.helpers");
|
|
12
12
|
var _useBoundaryMeasurement = require("./hooks/use-boundary-measurement");
|
|
13
|
-
var
|
|
13
|
+
var _boundaryLocalPortalHost = require("./portal/components/boundary-local-portal-host");
|
|
14
|
+
var _portal = require("./portal/components/portal");
|
|
15
|
+
var _resolvePortal = require("./portal/utils/resolve-portal");
|
|
14
16
|
var _boundaryRoot = require("./providers/boundary-root.provider");
|
|
15
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
function
|
|
18
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
19
|
+
const hasRenderableChildren = children => {
|
|
20
|
+
if (children === null || children === undefined || typeof children === "boolean") {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
if (Array.isArray(children)) {
|
|
24
|
+
return children.some(hasRenderableChildren);
|
|
25
|
+
}
|
|
26
|
+
return true;
|
|
27
|
+
};
|
|
17
28
|
function createBoundaryComponent(Wrapped, options = {}) {
|
|
18
29
|
const {
|
|
19
|
-
alreadyAnimated = false
|
|
20
|
-
shouldAutoMeasure = false
|
|
30
|
+
alreadyAnimated = false
|
|
21
31
|
} = options;
|
|
22
32
|
const AnimatedComponent = alreadyAnimated ? Wrapped : _reactNativeReanimated.default.createAnimatedComponent(Wrapped);
|
|
23
33
|
const Inner = /*#__PURE__*/(0, _react.forwardRef)((props, forwardedRef) => {
|
|
@@ -31,19 +41,26 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
31
41
|
method,
|
|
32
42
|
style,
|
|
33
43
|
onPress,
|
|
34
|
-
|
|
44
|
+
handoff,
|
|
45
|
+
escapeClipping,
|
|
46
|
+
children,
|
|
35
47
|
...rest
|
|
36
48
|
} = props;
|
|
37
49
|
const boundTag = (0, _react.useMemo)(() => (0, _linkPairs.createBoundTag)(String(id), group), [id, group]);
|
|
38
|
-
const
|
|
50
|
+
const portalRuntime = (0, _resolvePortal.resolveBoundaryPortal)({
|
|
51
|
+
handoff,
|
|
52
|
+
escapeClipping
|
|
53
|
+
});
|
|
39
54
|
const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
|
|
40
55
|
const hasConfiguredInterpolator = (0, _descriptors.useDescriptorsStore)(s => s.derivations.hasConfiguredInterpolator);
|
|
41
56
|
const runtimeEnabled = enabled && hasConfiguredInterpolator;
|
|
42
57
|
// Associated slot styles attach whenever the boundary is enabled,
|
|
43
58
|
// independent of whether an interpolator is configured for this transition.
|
|
44
59
|
const shouldAttachAssociatedStyles = enabled;
|
|
45
|
-
const
|
|
60
|
+
const canPortalRoot = portalRuntime.enabled && hasRenderableChildren(children);
|
|
61
|
+
const associatedStyles = (0, _styles.useComposedSlotStyles)(boundTag.tag, style);
|
|
46
62
|
const associatedStackingStyles = (0, _styles.useSlotStackingStyles)(boundTag.tag);
|
|
63
|
+
const rootPlaceholderRef = (0, _reactNativeReanimated.useAnimatedRef)();
|
|
47
64
|
const {
|
|
48
65
|
ref,
|
|
49
66
|
contextValue,
|
|
@@ -52,12 +69,10 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
52
69
|
targetPreparedStyles
|
|
53
70
|
} = (0, _boundaryRoot.useBoundaryRootState)({
|
|
54
71
|
boundTag,
|
|
55
|
-
|
|
56
|
-
|
|
72
|
+
portalRuntime,
|
|
73
|
+
rootMeasurementRef: canPortalRoot ? rootPlaceholderRef : undefined
|
|
57
74
|
});
|
|
58
|
-
|
|
59
|
-
onPress: resolvedOnPress
|
|
60
|
-
} = (0, _useBoundaryMeasurement.useBoundaryMeasurement)({
|
|
75
|
+
(0, _useBoundaryMeasurement.useBoundaryMeasurement)({
|
|
61
76
|
boundTag,
|
|
62
77
|
enabled,
|
|
63
78
|
runtimeEnabled,
|
|
@@ -65,35 +80,58 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
65
80
|
measuredRef,
|
|
66
81
|
style,
|
|
67
82
|
targetPreparedStyles,
|
|
68
|
-
|
|
69
|
-
|
|
83
|
+
handoff: portalRuntime.handoff,
|
|
84
|
+
escapeClipping: portalRuntime.escapeClipping,
|
|
70
85
|
config: {
|
|
71
86
|
anchor,
|
|
72
87
|
scaleMode,
|
|
73
88
|
target,
|
|
74
89
|
method
|
|
75
|
-
}
|
|
76
|
-
onPress
|
|
90
|
+
}
|
|
77
91
|
});
|
|
78
92
|
(0, _react.useImperativeHandle)(forwardedRef, () => ref.current, [ref]);
|
|
79
|
-
|
|
93
|
+
const shouldPortalRoot = canPortalRoot && !hasActiveTarget;
|
|
80
94
|
// A nested active target takes the full associated style, so the root keeps
|
|
81
|
-
// only its stacking context
|
|
82
|
-
|
|
95
|
+
// only its stacking context. Without a nested target, a portal'd root is the
|
|
96
|
+
// target, so its associated style is applied through the portal host instead
|
|
97
|
+
// of inline on the teleported element.
|
|
98
|
+
// Host-only handoff receivers still need the associated style: their local
|
|
99
|
+
// portal host is absolute-filled inside this root, so the root is the visual
|
|
100
|
+
// frame that animates the received payload.
|
|
101
|
+
const attachedStyle = shouldAttachAssociatedStyles ? hasActiveTarget ? associatedStackingStyles : shouldPortalRoot ? undefined : associatedStyles : undefined;
|
|
102
|
+
const pressProps = typeof onPress === "function" ? {
|
|
103
|
+
onPress
|
|
104
|
+
} : undefined;
|
|
105
|
+
const localPortalHost = /*#__PURE__*/(0, _jsxRuntime.jsx)(_boundaryLocalPortalHost.BoundaryLocalPortalHost, {
|
|
106
|
+
boundaryId: boundTag.tag,
|
|
107
|
+
enabled: enabled && portalRuntime.handoff,
|
|
108
|
+
screenKey: currentScreenKey
|
|
109
|
+
});
|
|
110
|
+
const canInjectLocalPortalHost = typeof children !== "function";
|
|
111
|
+
const renderBoundaryRoot = extraChildren => /*#__PURE__*/(0, _jsxRuntime.jsxs)(AnimatedComponent, {
|
|
112
|
+
...rest,
|
|
113
|
+
...pressProps,
|
|
114
|
+
ref: ref,
|
|
115
|
+
style: [style, attachedStyle],
|
|
116
|
+
collapsable: false,
|
|
117
|
+
children: [children, canInjectLocalPortalHost ? extraChildren : null]
|
|
118
|
+
});
|
|
119
|
+
const boundaryRoot = renderBoundaryRoot(shouldPortalRoot ? undefined : localPortalHost);
|
|
83
120
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_boundaryRoot.BoundaryRootProvider, {
|
|
84
121
|
value: contextValue,
|
|
85
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
122
|
+
children: shouldPortalRoot ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_portal.Portal, {
|
|
123
|
+
id: boundTag.tag,
|
|
124
|
+
handoff: portalRuntime.handoff,
|
|
125
|
+
escapeClipping: portalRuntime.escapeClipping,
|
|
126
|
+
placeholderRef: rootPlaceholderRef,
|
|
127
|
+
placeholderChildren: portalRuntime.handoff ? localPortalHost : undefined,
|
|
128
|
+
children: boundaryRoot
|
|
129
|
+
}) : boundaryRoot
|
|
92
130
|
});
|
|
93
131
|
});
|
|
94
132
|
|
|
95
133
|
// The HOC's runtime identity (animated + memoized forwardRef) is not
|
|
96
134
|
// expressible against the public boundary props, so assert it here.
|
|
97
|
-
return /*#__PURE__*/(0, _react.memo)(
|
|
135
|
+
return /*#__PURE__*/(0, _react.memo)(Inner);
|
|
98
136
|
}
|
|
99
137
|
//# sourceMappingURL=create-boundary-component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_descriptors","_styles","_linkPairs","_useBoundaryMeasurement","_boundaryLocalPortalHost","_portal","_resolvePortal","_boundaryRoot","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","hasRenderableChildren","children","undefined","Array","isArray","some","createBoundaryComponent","Wrapped","options","alreadyAnimated","AnimatedComponent","Animated","createAnimatedComponent","Inner","forwardRef","props","forwardedRef","enabled","group","id","anchor","scaleMode","target","method","style","onPress","handoff","escapeClipping","rest","boundTag","useMemo","createBoundTag","String","portalRuntime","resolveBoundaryPortal","currentScreenKey","useDescriptorsStore","s","derivations","hasConfiguredInterpolator","runtimeEnabled","shouldAttachAssociatedStyles","canPortalRoot","associatedStyles","useComposedSlotStyles","tag","associatedStackingStyles","useSlotStackingStyles","rootPlaceholderRef","useAnimatedRef","ref","contextValue","measuredRef","hasActiveTarget","targetPreparedStyles","useBoundaryRootState","rootMeasurementRef","useBoundaryMeasurement","config","useImperativeHandle","current","shouldPortalRoot","attachedStyle","pressProps","localPortalHost","jsx","BoundaryLocalPortalHost","boundaryId","screenKey","canInjectLocalPortalHost","renderBoundaryRoot","extraChildren","jsxs","collapsable","boundaryRoot","BoundaryRootProvider","value","Portal","placeholderRef","placeholderChildren","memo"],"sourceRoot":"../../../../../src","sources":["shared/components/boundary/create-boundary-component.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YA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QAAAD,QAAA,EAEAyE;MAAY,CACN,CAAC,GAETA;IACA,CACoB,CAAC;EAEzB,CAAC,CAAC;;EAEF;EACA;EACA,oBAAO,IAAAM,WAAI,EAACnE,KAAK,CAAC;AAMnB","ignoreList":[]}
|
|
@@ -6,13 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useBoundaryPresence = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
-
var _entries = require("
|
|
9
|
+
var _entries = require("../../../../stores/bounds/internals/entries");
|
|
10
10
|
const useBoundaryPresence = params => {
|
|
11
11
|
const {
|
|
12
12
|
enabled,
|
|
13
13
|
boundTag,
|
|
14
14
|
currentScreenKey,
|
|
15
|
-
boundaryConfig
|
|
15
|
+
boundaryConfig,
|
|
16
|
+
handoff,
|
|
17
|
+
escapeClipping
|
|
16
18
|
} = params;
|
|
17
19
|
const {
|
|
18
20
|
tag
|
|
@@ -20,12 +22,14 @@ const useBoundaryPresence = params => {
|
|
|
20
22
|
(0, _react.useLayoutEffect)(() => {
|
|
21
23
|
if (!enabled) return;
|
|
22
24
|
(0, _reactNativeReanimated.runOnUI)(_entries.setEntry)(tag, currentScreenKey, {
|
|
23
|
-
boundaryConfig
|
|
25
|
+
boundaryConfig,
|
|
26
|
+
handoff: handoff ? true : null,
|
|
27
|
+
escapeClipping: escapeClipping ? true : null
|
|
24
28
|
});
|
|
25
29
|
return () => {
|
|
26
30
|
(0, _reactNativeReanimated.runOnUI)(_entries.removeEntry)(tag, currentScreenKey);
|
|
27
31
|
};
|
|
28
|
-
}, [enabled, tag, currentScreenKey, boundaryConfig]);
|
|
32
|
+
}, [enabled, tag, currentScreenKey, boundaryConfig, handoff, escapeClipping]);
|
|
29
33
|
};
|
|
30
34
|
exports.useBoundaryPresence = useBoundaryPresence;
|
|
31
35
|
//# sourceMappingURL=use-boundary-presence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_entries","useBoundaryPresence","params","enabled","boundTag","currentScreenKey","boundaryConfig","handoff","escapeClipping","tag","useLayoutEffect","runOnUI","setEntry","removeEntry","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-boundary-presence.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAOO,MAAMG,mBAAmB,GAAIC,MAOnC,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,QAAQ;IACRC,gBAAgB;IAChBC,cAAc;IACdC,OAAO;IACPC;EACD,CAAC,GAAGN,MAAM;EACV,MAAM;IAAEO;EAAI,CAAC,GAAGL,QAAQ;EAExB,IAAAM,sBAAe,EAAC,MAAM;IACrB,IAAI,CAACP,OAAO,EAAE;IAEd,IAAAQ,8BAAO,EAACC,iBAAQ,CAAC,CAACH,GAAG,EAAEJ,gBAAgB,EAAE;MACxCC,cAAc;MACdC,OAAO,EAAEA,OAAO,GAAG,IAAI,GAAG,IAAI;MAC9BC,cAAc,EAAEA,cAAc,GAAG,IAAI,GAAG;IACzC,CAAC,CAAC;IAEF,OAAO,MAAM;MACZ,IAAAG,8BAAO,EAACE,oBAAW,CAAC,CAACJ,GAAG,EAAEJ,gBAAgB,CAAC;IAC5C,CAAC;EACF,CAAC,EAAE,CAACF,OAAO,EAAEM,GAAG,EAAEJ,gBAAgB,EAAEC,cAAc,EAAEC,OAAO,EAAEC,cAAc,CAAC,CAAC;AAC9E,CAAC;AAACM,OAAA,CAAAb,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -5,13 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useInitialDestinationMeasurement = void 0;
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
var _descriptors = require("
|
|
9
|
-
var _animation = require("
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
8
|
+
var _descriptors = require("../../../../providers/screen/descriptors");
|
|
9
|
+
var _animation = require("../../../../stores/animation.store");
|
|
10
|
+
var _linkPairs = require("../../../../stores/bounds/helpers/link-pairs.helpers");
|
|
11
|
+
var _entries = require("../../../../stores/bounds/internals/entries");
|
|
12
|
+
var _links = require("../../../../stores/bounds/internals/links");
|
|
13
|
+
var _state = require("../../../../stores/bounds/internals/state");
|
|
14
|
+
var _system = require("../../../../stores/system.store");
|
|
15
|
+
var _logger = require("../../../../utils/logger");
|
|
16
|
+
var _ownership = require("../../portal/utils/ownership");
|
|
17
|
+
var _destinationSignals = require("../../utils/destination-signals");
|
|
15
18
|
const VIEWPORT_RETRY_DELAY_MS = 100;
|
|
16
19
|
/**
|
|
17
20
|
* A destination that keeps failing its measurement guards must not hold the
|
|
@@ -25,6 +28,7 @@ const useInitialDestinationMeasurement = ({
|
|
|
25
28
|
measureBoundary
|
|
26
29
|
}) => {
|
|
27
30
|
const {
|
|
31
|
+
tag,
|
|
28
32
|
linkKey,
|
|
29
33
|
group
|
|
30
34
|
} = boundTag;
|
|
@@ -77,9 +81,6 @@ const useInitialDestinationMeasurement = ({
|
|
|
77
81
|
"worklet";
|
|
78
82
|
|
|
79
83
|
if (!measurePairKey) {
|
|
80
|
-
releaseLifecycleStartBlock();
|
|
81
|
-
viewportRetries.set(0);
|
|
82
|
-
hasGivenUp.set(0);
|
|
83
84
|
return;
|
|
84
85
|
}
|
|
85
86
|
const previousMeasurePairKey = previous?.[0];
|
|
@@ -101,6 +102,22 @@ const useInitialDestinationMeasurement = ({
|
|
|
101
102
|
});
|
|
102
103
|
const destinationAttached = (0, _links.getDestination)(measurePairKey, linkKey) !== null;
|
|
103
104
|
if (destinationAttached) {
|
|
105
|
+
const linkState = _state.pairs.get();
|
|
106
|
+
const link = (0, _links.getLink)(measurePairKey, linkKey);
|
|
107
|
+
const sourceScreenKey = (0, _linkPairs.getSourceScreenKeyFromPairKey)(measurePairKey);
|
|
108
|
+
const sourceEntry = (0, _entries.getEntry)(tag, sourceScreenKey);
|
|
109
|
+
const sourceEntryUsesDestinationEscapeHost = sourceEntry?.handoff === true && sourceEntry.escapeClipping === true;
|
|
110
|
+
const shouldWaitForEscapeClippingHost = (0, _ownership.usesEscapeClippingHost)(link) || sourceEntryUsesDestinationEscapeHost || (0, _ownership.hasHandoffEscapeContinuation)({
|
|
111
|
+
linkKey,
|
|
112
|
+
linkState,
|
|
113
|
+
sourceScreenKey
|
|
114
|
+
});
|
|
115
|
+
if (shouldWaitForEscapeClippingHost) {
|
|
116
|
+
// Screen-level escape has a second readiness phase after destination
|
|
117
|
+
// measurement: the host must commit before the transition starts, or
|
|
118
|
+
// the payload can disappear for a frame.
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
104
121
|
releaseLifecycleStartBlock();
|
|
105
122
|
viewportRetries.set(0);
|
|
106
123
|
return;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_descriptors","_animation","_linkPairs","_entries","_links","_state","_system","_logger","_ownership","_destinationSignals","VIEWPORT_RETRY_DELAY_MS","MAX_VIEWPORT_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","measureBoundary","tag","linkKey","group","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","destinationPairKey","ancestorDestinationPairKey","destinationEnabled","progress","AnimationStore","getValue","pendingLifecycleRequestKind","actions","blockLifecycleStart","unblockLifecycleStart","SystemStore","getBag","isBlockingLifecycleStart","useSharedValue","retryToken","viewportRetries","hasGivenUp","releaseLifecycleStartBlock","cancelAnimation","get","set","useAnimatedReaction","retryTick","hasPendingOpenRequest","LifecycleTransitionRequestKind","Open","isWaitingForOpenToStart","measurePairKey","getInitialDestinationMeasurePairKey","linkId","linkState","pairs","undefined","previous","previousMeasurePairKey","previousRetryTick","shouldAttemptMeasure","type","pairKey","destinationAttached","getDestination","link","getLink","sourceScreenKey","getSourceScreenKeyFromPairKey","sourceEntry","getEntry","sourceEntryUsesDestinationEscapeHost","handoff","escapeClipping","shouldWaitForEscapeClippingHost","usesEscapeClippingHost","hasHandoffEscapeContinuation","logger","warn","withDelay","withTiming","duration","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAOA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAIA,IAAAM,MAAA,GAAAN,OAAA;AAEA,IAAAO,OAAA,GAAAP,OAAA;AAIA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AAKA,IAAAU,mBAAA,GAAAV,OAAA;AAEA,MAAMW,uBAAuB,GAAG,GAAG;AACnC;AACA;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAG,EAAE;AAQxB,MAAMC,gCAAgC,GAAGA,CAAC;EAChDC,QAAQ;EACRC,OAAO;EACPC;AACuC,CAAC,KAAK;EAC7C,MAAM;IAAEC,GAAG;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGL,QAAQ;EACxC,MAAMM,gBAAgB,GAAG,IAAAC,gCAAmB,EAC1CC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACH,gBACtB,CAAC;EACD,MAAMI,aAAa,GAAG,IAAAH,gCAAmB,EAAEC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,aAAa,CAAC;EAC7E,MAAMC,kBAAkB,GAAG,IAAAJ,gCAAmB,EAC5CC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACE,kBACtB,CAAC;EACD,MAAMC,0BAA0B,GAAG,IAAAL,gCAAmB,EACpDC,CAAC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WAAW,GAAG,IAAAC,iBAAQ,EAACtD,GAAG,EAAEmD,eAAe,CAAC;MAClD,MAAMI,oCAAoC,GACzCF,WAAW,EAAEG,OAAO,KAAK,IAAI,IAAIH,WAAW,CAACI,cAAc,KAAK,IAAI;MACrE,MAAMC,+BAA+B,GACpC,IAAAC,iCAAsB,EAACV,IAAI,CAAC,IAC5BM,oCAAoC,IACpC,IAAAK,uCAA4B,EAAC;QAC5B3D,OAAO;QACPqC,SAAS;QACTa;MACD,CAAC,CAAC;MAEH,IAAIO,+BAA+B,EAAE;QACpC;QACA;QACA;QACA;MACD;MACAjC,0BAA0B,CAAC,CAAC;MAC5BF,eAAe,CAACK,GAAG,CAAC,CAAC,CAAC;MACtB;IACD;IAEA,IAAIL,eAAe,CAACI,GAAG,CAAC,CAAC,IAAIhC,oBAAoB,EAAE;MAClD6B,UAAU,CAACI,GAAG,CAAC,CAAC,CAAC;MACjBH,0BAA0B,CAAC,CAAC;MAC5BoC,cAAM,CAACC,IAAI,CACV,yBAAyB7D,OAAO,8CAA8CN,oBAAoB,0JACnG,CAAC;MACD;IACD;;IAEA;IACA;IACA4B,eAAe,CAACK,GAAG,CAACL,eAAe,CAACI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAC9C,IAAAD,sCAAe,EAACJ,UAAU,CAAC;IAC3BA,UAAU,CAACM,GAAG,CACb,IAAAmC,gCAAS,EACRrE,uBAAuB,EACvB,IAAAsE,iCAAU,EAAC1C,UAAU,CAACK,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;MAAEsC,QAAQ,EAAE;IAAE,CAAC,CACjD,CACD,CAAC;EACF,CACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAAtE,gCAAA,GAAAA,gCAAA","ignoreList":[]}
|
|
@@ -5,15 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useInitialSourceMeasurement = void 0;
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
var _descriptors = require("
|
|
9
|
-
var _state = require("
|
|
10
|
-
var _sourceSignals = require("
|
|
8
|
+
var _descriptors = require("../../../../providers/screen/descriptors");
|
|
9
|
+
var _state = require("../../../../stores/bounds/internals/state");
|
|
10
|
+
var _sourceSignals = require("../../utils/source-signals");
|
|
11
11
|
const useInitialSourceMeasurement = params => {
|
|
12
12
|
const {
|
|
13
13
|
enabled,
|
|
14
14
|
measureBoundary,
|
|
15
|
-
boundTag
|
|
16
|
-
shouldAutoMeasure
|
|
15
|
+
boundTag
|
|
17
16
|
} = params;
|
|
18
17
|
const sourcePairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.sourcePairKey);
|
|
19
18
|
const lastSourceCaptureSignal = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
@@ -25,8 +24,7 @@ const useInitialSourceMeasurement = params => {
|
|
|
25
24
|
sourcePairKey,
|
|
26
25
|
linkId: boundTag.linkKey,
|
|
27
26
|
group: boundTag.group,
|
|
28
|
-
|
|
29
|
-
linkState: shouldAutoMeasure && sourcePairKey ? _state.pairs.get() : undefined
|
|
27
|
+
linkState: sourcePairKey ? _state.pairs.get() : undefined
|
|
30
28
|
});
|
|
31
29
|
}, captureSignal => {
|
|
32
30
|
"worklet";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_descriptors","_state","_sourceSignals","useInitialSourceMeasurement","params","enabled","measureBoundary","boundTag","sourcePairKey","useDescriptorsStore","s","derivations","lastSourceCaptureSignal","useSharedValue","useAnimatedReaction","getInitialSourceCaptureSignal","linkId","linkKey","group","linkState","pairs","get","undefined","captureSignal","set","signal","type","pairKey","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAGA,IAAAG,cAAA,GAAAH,OAAA;AAEO,MAAMI,2BAA2B,GAAIC,MAI3C,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,eAAe;IAAEC;EAAS,CAAC,GAAGH,MAAM;EACrD,MAAMI,aAAa,GAAG,IAAAC,gCAAmB,EAAEC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACH,aAAa,CAAC;EAC7E,MAAMI,uBAAuB,GAAG,IAAAC,qCAAc,EAAgB,IAAI,CAAC;EAEnE,IAAAC,0CAAmB,EAClB,MAAM;IACL,SAAS;;IACT,OAAO,IAAAC,4CAA6B,EAAC;MACpCV,OAAO;MACPG,aAAa;MACbQ,MAAM,EAAET,QAAQ,CAACU,OAAO;MACxBC,KAAK,EAAEX,QAAQ,CAACW,KAAK;MACrBC,SAAS,EAAEX,aAAa,GAAGY,YAAK,CAACC,GAAG,CAAC,CAAC,GAAGC;IAC1C,CAAC,CAAC;EACH,CAAC,EACAC,aAAa,IAAK;IAClB,SAAS;;IACT,IAAI,CAAClB,OAAO,IAAI,CAACkB,aAAa,EAAE;MAC/BX,uBAAuB,CAACY,GAAG,CAAC,IAAI,CAAC;MACjC;IACD;IAEA,IAAIZ,uBAAuB,CAACS,GAAG,CAAC,CAAC,KAAKE,aAAa,CAACE,MAAM,EAAE;MAC3D;IACD;IAEAb,uBAAuB,CAACY,GAAG,CAACD,aAAa,CAACE,MAAM,CAAC;IACjDnB,eAAe,CAAC;MACfoB,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAAzB,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useRefreshBoundary = void 0;
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
var _descriptors = require("
|
|
9
|
-
var _animation = require("
|
|
10
|
-
var _state = require("
|
|
11
|
-
var _refreshSignals = require("
|
|
8
|
+
var _descriptors = require("../../../../providers/screen/descriptors");
|
|
9
|
+
var _animation = require("../../../../stores/animation.store");
|
|
10
|
+
var _state = require("../../../../stores/bounds/internals/state");
|
|
11
|
+
var _refreshSignals = require("../../utils/refresh-signals");
|
|
12
12
|
const useRefreshBoundary = ({
|
|
13
13
|
enabled,
|
|
14
14
|
boundTag,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_descriptors","_animation","_state","_refreshSignals","useRefreshBoundary","enabled","boundTag","measureBoundary","linkKey","group","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","sourcePairKey","destinationPairKey","ancestorDestinationPairKey","refreshScreenKey","refreshWillAnimate","AnimationStore","getValue","refreshClosing","refreshEntering","refreshAnimating","refreshProgress","useAnimatedReaction","getRefreshBoundarySignal","linkId","shouldRefresh","get","closing","entering","animating","progress","linkState","pairs","refreshSignal","prevRefreshSignal","signal","type","pairKey","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAGA,IAAAI,eAAA,GAAAJ,OAAA;AAQO,MAAMK,kBAAkB,GAAGA,CAAC;EAClCC,OAAO;EACPC,QAAQ;EACRC;AACyB,CAAC,KAAK;EAC/B,MAAM;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGH,QAAQ;EACnC,MAAMI,gBAAgB,GAAG,IAAAC,gCAAmB,EAC1CC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACH,gBACtB,CAAC;EACD,MAAMI,aAAa,GAAG,IAAAH,gCAAmB,EAAEC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,aAAa,CAAC;EAC7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I,QAAQ,EAAET,eAAe,CAACK,GAAG,CAAC,CAAC;MAC/BK,SAAS,EAAEC,YAAK,CAACN,GAAG,CAAC;IACtB,CAAC,CAAC;EACH,CAAC,EACD,CAACO,aAAa,EAAEC,iBAAiB,KAAK;IACrC,SAAS;;IAET,IACC,CAACD,aAAa,IACdA,aAAa,CAACE,MAAM,KAAKD,iBAAiB,EAAEC,MAAM,EACjD;MACD;IACD;IAEAhC,eAAe,CAAC;MACfiC,IAAI,EAAEH,aAAa,CAACG,IAAI;MACxBC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAAtC,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -5,20 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useBoundaryMeasurement = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
-
var _linkPairs = require("../../../stores/bounds/helpers/link-pairs.helpers");
|
|
10
8
|
var _styles = require("../../../utils/bounds/helpers/styles/styles");
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
9
|
+
var _useBoundaryPresence = require("./lifecycles/use-boundary-presence");
|
|
10
|
+
var _useInitialDestinationMeasurement = require("./lifecycles/use-initial-destination-measurement");
|
|
11
|
+
var _useInitialSourceMeasurement = require("./lifecycles/use-initial-source-measurement");
|
|
12
|
+
var _useRefreshBoundary = require("./lifecycles/use-refresh-boundary");
|
|
15
13
|
var _useMeasurer = require("./use-measurer");
|
|
16
|
-
var _useRefreshBoundary = require("./use-refresh-boundary");
|
|
17
14
|
/**
|
|
18
15
|
* Owns the full measurement lifecycle for a boundary: builds the measurer,
|
|
19
16
|
* registers presence, runs the initial source/destination + refresh reactions,
|
|
20
|
-
* and
|
|
21
|
-
* measurer itself.
|
|
17
|
+
* and keeps the component itself away from the measurer.
|
|
22
18
|
*/
|
|
23
19
|
const useBoundaryMeasurement = ({
|
|
24
20
|
boundTag,
|
|
@@ -28,10 +24,9 @@ const useBoundaryMeasurement = ({
|
|
|
28
24
|
measuredRef,
|
|
29
25
|
style,
|
|
30
26
|
targetPreparedStyles,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
config
|
|
34
|
-
onPress
|
|
27
|
+
handoff,
|
|
28
|
+
escapeClipping,
|
|
29
|
+
config
|
|
35
30
|
}) => {
|
|
36
31
|
const {
|
|
37
32
|
anchor,
|
|
@@ -47,14 +42,14 @@ const useBoundaryMeasurement = ({
|
|
|
47
42
|
}), [anchor, scaleMode, target, method]);
|
|
48
43
|
const rootPreparedStyles = (0, _react.useMemo)(() => (0, _styles.prepareStyleForBounds)(style), [style]);
|
|
49
44
|
const preparedStyles = targetPreparedStyles ?? rootPreparedStyles;
|
|
50
|
-
const portalHost = (0, _resolvePortal.resolvePortalHost)(portal);
|
|
51
45
|
const measureBoundary = (0, _useMeasurer.useMeasurer)({
|
|
52
46
|
enabled,
|
|
53
47
|
boundTag,
|
|
54
48
|
currentScreenKey,
|
|
55
49
|
preparedStyles,
|
|
56
50
|
measuredAnimatedRef: measuredRef,
|
|
57
|
-
|
|
51
|
+
handoff,
|
|
52
|
+
escapeClipping
|
|
58
53
|
});
|
|
59
54
|
|
|
60
55
|
// Register/unregister this boundary in the presence map so source/destination
|
|
@@ -63,17 +58,14 @@ const useBoundaryMeasurement = ({
|
|
|
63
58
|
enabled: runtimeEnabled,
|
|
64
59
|
boundTag,
|
|
65
60
|
currentScreenKey,
|
|
66
|
-
boundaryConfig
|
|
61
|
+
boundaryConfig,
|
|
62
|
+
handoff,
|
|
63
|
+
escapeClipping
|
|
67
64
|
});
|
|
68
|
-
|
|
69
|
-
// Passive auto-measurement only applies to non-pressable boundaries; pressable
|
|
70
|
-
// ones capture their source on press (see handlePress below).
|
|
71
|
-
const shouldPassivelyMeasureSource = shouldAutoMeasure && typeof onPress !== "function";
|
|
72
65
|
(0, _useInitialSourceMeasurement.useInitialSourceMeasurement)({
|
|
73
66
|
enabled: runtimeEnabled,
|
|
74
67
|
measureBoundary,
|
|
75
|
-
boundTag
|
|
76
|
-
shouldAutoMeasure: shouldPassivelyMeasureSource
|
|
68
|
+
boundTag
|
|
77
69
|
});
|
|
78
70
|
(0, _useInitialDestinationMeasurement.useInitialDestinationMeasurement)({
|
|
79
71
|
boundTag,
|
|
@@ -85,19 +77,6 @@ const useBoundaryMeasurement = ({
|
|
|
85
77
|
boundTag,
|
|
86
78
|
measureBoundary
|
|
87
79
|
});
|
|
88
|
-
const handlePress = (0, _react.useCallback)((...args) => {
|
|
89
|
-
// Press path has priority: capture source before user onPress/navigation.
|
|
90
|
-
(0, _reactNativeReanimated.runOnUI)(measureBoundary)({
|
|
91
|
-
type: "source",
|
|
92
|
-
pairKey: (0, _linkPairs.createPendingPairKey)(currentScreenKey)
|
|
93
|
-
});
|
|
94
|
-
if (typeof onPress === "function") {
|
|
95
|
-
onPress(...args);
|
|
96
|
-
}
|
|
97
|
-
}, [measureBoundary, onPress, currentScreenKey]);
|
|
98
|
-
return {
|
|
99
|
-
onPress: typeof onPress === "function" ? handlePress : undefined
|
|
100
|
-
};
|
|
101
80
|
};
|
|
102
81
|
exports.useBoundaryMeasurement = useBoundaryMeasurement;
|
|
103
82
|
//# sourceMappingURL=use-boundary-measurement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","
|
|
1
|
+
{"version":3,"names":["_react","require","_styles","_useBoundaryPresence","_useInitialDestinationMeasurement","_useInitialSourceMeasurement","_useRefreshBoundary","_useMeasurer","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","targetPreparedStyles","handoff","escapeClipping","config","anchor","scaleMode","target","method","boundaryConfig","useMemo","rootPreparedStyles","prepareStyleForBounds","preparedStyles","measureBoundary","useMeasurer","measuredAnimatedRef","useBoundaryPresence","useInitialSourceMeasurement","useInitialDestinationMeasurement","useRefreshBoundary","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-boundary-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AACA,IAAAI,4BAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAmBA;AACA;AACA;AACA;AACA;AACO,MAAMO,sBAAsB,GAAGA,CAAC;EACtCC,QAAQ;EACRC,OAAO;EACPC,cAAc;EACdC,gBAAgB;EAChBC,WAAW;EACXC,KAAK;EACLC,oBAAoB;EACpBC,OAAO;EACPC,cAAc;EACdC;AAC6B,CAAC,KAAK;EACnC,MAAM;IAAEC,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EACpD,MAAMK,cAAc,GAAG,IAAAC,cAAO,EAC7B,OAAO;IAAEL,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,CAAC,EAC7C,CAACH,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,MAAM,CACnC,CAAC;EAED,MAAMG,kBAAkB,GAAG,IAAAD,cAAO,EACjC,MAAM,IAAAE,6BAAqB,EAACZ,KAAK,CAAC,EAClC,CAACA,KAAK,CACP,CAAC;EACD,MAAMa,cAAc,GAAGZ,oBAAoB,IAAIU,kBAAkB;EAEjE,MAAMG,eAAe,GAAG,IAAAC,wBAAW,EAAC;IACnCnB,OAAO;IACPD,QAAQ;IACRG,gBAAgB;IAChBe,cAAc;IACdG,mBAAmB,EAAEjB,WAAW;IAChCG,OAAO;IACPC;EACD,CAAC,CAAC;;EAEF;EACA;EACA,IAAAc,wCAAmB,EAAC;IACnBrB,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRG,gBAAgB;IAChBW,cAAc;IACdP,OAAO;IACPC;EACD,CAAC,CAAC;EAEF,IAAAe,wDAA2B,EAAC;IAC3BtB,OAAO,EAAEC,cAAc;IACvBiB,eAAe;IACfnB;EACD,CAAC,CAAC;EAEF,IAAAwB,kEAAgC,EAAC;IAChCxB,QAAQ;IACRC,OAAO,EAAEC,cAAc;IACvBiB;EACD,CAAC,CAAC;EAEF,IAAAM,sCAAkB,EAAC;IAClBxB,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRmB;EACD,CAAC,CAAC;AACH,CAAC;AAACO,OAAA,CAAA3B,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -11,7 +11,6 @@ var _measuredBoundsWrites = require("../../../providers/helpers/measured-bounds-
|
|
|
11
11
|
var _origin = require("../../../providers/screen/origin.provider");
|
|
12
12
|
var _scroll = require("../../../stores/scroll.store");
|
|
13
13
|
var _system = require("../../../stores/system.store");
|
|
14
|
-
var _hostRegistry = require("../portal/stores/host-registry.store");
|
|
15
14
|
var _measuredBounds = require("../utils/measured-bounds");
|
|
16
15
|
const useMeasurer = ({
|
|
17
16
|
enabled,
|
|
@@ -19,7 +18,8 @@ const useMeasurer = ({
|
|
|
19
18
|
currentScreenKey,
|
|
20
19
|
preparedStyles,
|
|
21
20
|
measuredAnimatedRef,
|
|
22
|
-
|
|
21
|
+
handoff,
|
|
22
|
+
escapeClipping
|
|
23
23
|
}) => {
|
|
24
24
|
const {
|
|
25
25
|
width: viewportWidth,
|
|
@@ -51,7 +51,6 @@ const useMeasurer = ({
|
|
|
51
51
|
const viewportAllowsDestinationWrite = target.type !== "destination" || !shouldGuardDestinationViewport || (0, _measuredBounds.isMeasurementInViewport)(normalizedMeasured, viewportWidth, viewportHeight);
|
|
52
52
|
if (!viewportAllowsDestinationWrite) return;
|
|
53
53
|
const measuredWithScroll = (0, _measuredBounds.attachScrollSnapshotToMeasuredBounds)(normalizedMeasured, scrollMetadata.get());
|
|
54
|
-
const sourceHost = target.type === "source" ? (0, _hostRegistry.getActiveScrollHost)(currentScreenKey) ?? undefined : undefined;
|
|
55
54
|
(0, _measuredBoundsWrites.applyMeasuredBoundsWrites)({
|
|
56
55
|
entryTag: boundTag.tag,
|
|
57
56
|
linkId: boundTag.linkKey,
|
|
@@ -60,10 +59,10 @@ const useMeasurer = ({
|
|
|
60
59
|
measured: measuredWithScroll,
|
|
61
60
|
preparedStyles,
|
|
62
61
|
linkWrite: target,
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
handoff,
|
|
63
|
+
escapeClipping
|
|
65
64
|
});
|
|
66
|
-
}, [enabled, boundTag, currentScreenKey, preparedStyles, measuredAnimatedRef,
|
|
65
|
+
}, [enabled, boundTag, currentScreenKey, preparedStyles, measuredAnimatedRef, handoff, escapeClipping, viewportWidth, viewportHeight, scrollState, scrollMetadata, pendingLifecycleStartBlockCount, originRef]);
|
|
67
66
|
};
|
|
68
67
|
exports.useMeasurer = useMeasurer;
|
|
69
68
|
//# sourceMappingURL=use-measurer.js.map
|