react-native-screen-transitions 3.9.0-alpha.2 → 3.9.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js +14 -9
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js +66 -28
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/{use-boundary-presence.js → lifecycles/use-boundary-presence.js} +8 -4
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +27 -10
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +5 -7
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +4 -4
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +14 -35
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +5 -6
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/index.js +26 -29
- package/lib/commonjs/shared/components/boundary/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js +58 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/host.js +20 -4
- package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js +53 -32
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js +206 -96
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js +14 -2
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js +5 -44
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js +37 -5
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/teleport.js +15 -2
- package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js +18 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +10 -3
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js +28 -49
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +254 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js +38 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js +29 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +10 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js +25 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +6 -7
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +1 -22
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +0 -21
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js +4 -9
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +1 -1
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +6 -3
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js +95 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
- package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +9 -3
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js +96 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +16 -3
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/index.js +16 -3
- package/lib/commonjs/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +22 -51
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +53 -0
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +22 -2
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/entries.js +11 -4
- package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +134 -51
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +1 -3
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/system.store.js +5 -0
- package/lib/commonjs/shared/stores/system.store.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +10 -69
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js +59 -0
- package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
- package/lib/module/shared/components/boundary/components/boundary-target.js +12 -7
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/shared/components/boundary/create-boundary-component.js +67 -29
- package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/{use-boundary-presence.js → lifecycles/use-boundary-presence.js} +8 -4
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +27 -10
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +5 -7
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +4 -4
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +15 -36
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-measurer.js +5 -6
- package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/boundary/index.js +26 -29
- package/lib/module/shared/components/boundary/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js +53 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/host.js +21 -5
- package/lib/module/shared/components/boundary/portal/components/host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js +53 -32
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/portal.js +212 -102
- package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js +15 -3
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js +4 -41
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js +35 -4
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/teleport.js +16 -2
- package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js +13 -0
- package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/naming.js +8 -2
- package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js +29 -49
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/ownership.js +246 -0
- package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js +33 -0
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js +24 -0
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +8 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js +20 -0
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +6 -7
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/destination-signals.js +2 -23
- package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/refresh-signals.js +0 -21
- package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/source-signals.js +4 -9
- package/lib/module/shared/components/boundary/utils/source-signals.js.map +1 -1
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +6 -3
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js +89 -0
- package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
- package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +9 -3
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js +87 -0
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +16 -3
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/index.js +2 -1
- package/lib/module/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/slot.provider.js +22 -47
- package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +47 -0
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +19 -1
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/entries.js +11 -4
- package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +135 -53
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +1 -3
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/system.store.js +5 -0
- package/lib/module/shared/stores/system.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js +10 -69
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js +52 -0
- package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +1 -2
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/component-stack/components/component-screen.d.ts +1 -1
- package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +1 -2
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +1 -1
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.d.ts +1 -2
- package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts +2 -2
- package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts.map +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-container.d.ts +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts +0 -1
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts +11 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/{use-initial-destination-measurement.d.ts → lifecycles/use-initial-destination-measurement.d.ts} +2 -2
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/{use-refresh-boundary.d.ts → lifecycles/use-refresh-boundary.d.ts} +2 -2
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +5 -9
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +4 -3
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/index.d.ts +35 -24
- package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/host.d.ts +2 -2
- package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts +2 -2
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +4 -3
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts +0 -7
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts +16 -1
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts +3 -0
- package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +2 -1
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts +16 -32
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +35 -0
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +4 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +7 -12
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/types.d.ts +9 -36
- package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts +0 -1
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts +6 -5
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/masked-view.d.ts +1 -1
- package/lib/typescript/shared/components/masked-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/index.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +711 -667
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +3 -3
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts +4 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts +11 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +4 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +2 -2
- package/lib/typescript/shared/providers/screen/styles/index.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +5 -10
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts +6 -0
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +2 -0
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +4 -3
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +9 -20
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/stores/system.store.d.ts +1 -0
- package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +7 -1
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts +6 -0
- package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/shared/components/boundary/components/boundary-target.tsx +21 -7
- package/src/shared/components/boundary/create-boundary-component.tsx +92 -28
- package/src/shared/components/boundary/hooks/{use-boundary-presence.ts → lifecycles/use-boundary-presence.ts} +16 -5
- package/src/shared/components/boundary/hooks/{use-initial-destination-measurement.ts → lifecycles/use-initial-destination-measurement.ts} +40 -13
- package/src/shared/components/boundary/hooks/{use-initial-source-measurement.ts → lifecycles/use-initial-source-measurement.ts} +7 -9
- package/src/shared/components/boundary/hooks/{use-refresh-boundary.ts → lifecycles/use-refresh-boundary.ts} +6 -6
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +15 -45
- package/src/shared/components/boundary/hooks/use-measurer.ts +9 -14
- package/src/shared/components/boundary/index.tsx +55 -29
- package/src/shared/components/boundary/portal/components/boundary-local-portal-host.tsx +66 -0
- package/src/shared/components/boundary/portal/components/host.tsx +20 -5
- package/src/shared/components/boundary/portal/components/portal-boundary-host.tsx +67 -52
- package/src/shared/components/boundary/portal/components/portal.tsx +280 -119
- package/src/shared/components/boundary/portal/hooks/use-host-measurement.ts +23 -2
- package/src/shared/components/boundary/portal/stores/host-registry.store.ts +4 -51
- package/src/shared/components/boundary/portal/stores/portal-boundary-host.store.ts +59 -6
- package/src/shared/components/boundary/portal/teleport.ts +28 -3
- package/src/shared/components/boundary/portal/utils/has-local-slot.ts +16 -0
- package/src/shared/components/boundary/portal/utils/naming.ts +11 -1
- package/src/shared/components/boundary/portal/utils/offset-style.ts +37 -139
- package/src/shared/components/boundary/portal/utils/ownership.ts +371 -0
- package/src/shared/components/boundary/portal/utils/resolve-portal.ts +50 -0
- package/src/shared/components/boundary/portal/utils/shallow-equal.ts +25 -0
- package/src/shared/components/boundary/portal/utils/teleport-control.ts +12 -0
- package/src/shared/components/boundary/portal/utils/visible-host.ts +24 -0
- package/src/shared/components/boundary/providers/boundary-root.provider.tsx +9 -18
- package/src/shared/components/boundary/types.ts +9 -39
- package/src/shared/components/boundary/utils/destination-signals.ts +1 -32
- package/src/shared/components/boundary/utils/refresh-signals.ts +0 -41
- package/src/shared/components/boundary/utils/source-signals.ts +5 -17
- package/src/shared/index.ts +0 -5
- package/src/shared/providers/helpers/measured-bounds-writes.ts +6 -11
- package/src/shared/providers/screen/animation/helpers/derivations.ts +3 -0
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +1 -0
- package/src/shared/providers/screen/styles/helpers/compose-slot-style.ts +129 -0
- package/src/shared/providers/screen/styles/helpers/normalize-slots.ts +45 -8
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +14 -2
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts +3 -0
- package/src/shared/providers/screen/styles/hooks/slot-resolvers.tsx +111 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +21 -3
- package/src/shared/providers/screen/styles/index.tsx +8 -3
- package/src/shared/providers/screen/styles/slot.provider.tsx +36 -54
- package/src/shared/providers/screen/styles/stores/slot-references.store.ts +71 -0
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +24 -1
- package/src/shared/stores/bounds/internals/entries.ts +13 -5
- package/src/shared/stores/bounds/internals/links.ts +167 -85
- package/src/shared/stores/bounds/internals/resolver.ts +0 -2
- package/src/shared/stores/bounds/types.ts +10 -22
- package/src/shared/stores/system.store.ts +6 -0
- package/src/shared/types/animation.types.ts +8 -1
- package/src/shared/utils/bounds/helpers/styles/compute.ts +22 -124
- package/src/shared/utils/bounds/helpers/styles/local-transform.ts +86 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js +0 -36
- package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js +0 -40
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/resolve-portal.js +0 -31
- package/lib/module/shared/components/boundary/portal/resolve-portal.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/utils/attachment.js +0 -35
- package/lib/module/shared/components/boundary/portal/utils/attachment.js.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts +0 -14
- package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts +0 -21
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts.map +0 -1
- package/src/shared/components/boundary/portal/resolve-portal.ts +0 -40
- package/src/shared/components/boundary/portal/utils/attachment.ts +0 -48
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.stripBoundsLocalTransform = exports.getBoundsLocalTransform = exports.attachBoundsLocalTransform = exports.BOUNDS_LOCAL_TRANSFORM_STYLE_KEY = void 0;
|
|
7
|
+
const BOUNDS_LOCAL_TRANSFORM_STYLE_KEY = exports.BOUNDS_LOCAL_TRANSFORM_STYLE_KEY = "__screenTransitionsBoundsLocalTransform";
|
|
8
|
+
const getTransformFromPreparedStyle = style => {
|
|
9
|
+
"worklet";
|
|
10
|
+
|
|
11
|
+
if (style === null || style === undefined || typeof style !== "object" || Array.isArray(style)) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
const transform = style.transform;
|
|
15
|
+
return Array.isArray(transform) ? transform : undefined;
|
|
16
|
+
};
|
|
17
|
+
const attachBoundsLocalTransform = (slotStyle, localStyle) => {
|
|
18
|
+
"worklet";
|
|
19
|
+
|
|
20
|
+
const localTransform = getTransformFromPreparedStyle(localStyle);
|
|
21
|
+
if (!localTransform?.length) {
|
|
22
|
+
return slotStyle;
|
|
23
|
+
}
|
|
24
|
+
const next = {};
|
|
25
|
+
const source = slotStyle;
|
|
26
|
+
for (const key in source) {
|
|
27
|
+
next[key] = source[key];
|
|
28
|
+
}
|
|
29
|
+
next[BOUNDS_LOCAL_TRANSFORM_STYLE_KEY] = localTransform;
|
|
30
|
+
return next;
|
|
31
|
+
};
|
|
32
|
+
exports.attachBoundsLocalTransform = attachBoundsLocalTransform;
|
|
33
|
+
const getBoundsLocalTransform = style => {
|
|
34
|
+
"worklet";
|
|
35
|
+
|
|
36
|
+
if (!style) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
return style[BOUNDS_LOCAL_TRANSFORM_STYLE_KEY];
|
|
40
|
+
};
|
|
41
|
+
exports.getBoundsLocalTransform = getBoundsLocalTransform;
|
|
42
|
+
const stripBoundsLocalTransform = style => {
|
|
43
|
+
"worklet";
|
|
44
|
+
|
|
45
|
+
if (style[BOUNDS_LOCAL_TRANSFORM_STYLE_KEY] === undefined) {
|
|
46
|
+
return style;
|
|
47
|
+
}
|
|
48
|
+
const rest = {};
|
|
49
|
+
const source = style;
|
|
50
|
+
for (const key in source) {
|
|
51
|
+
if (key === BOUNDS_LOCAL_TRANSFORM_STYLE_KEY) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
rest[key] = source[key];
|
|
55
|
+
}
|
|
56
|
+
return rest;
|
|
57
|
+
};
|
|
58
|
+
exports.stripBoundsLocalTransform = stripBoundsLocalTransform;
|
|
59
|
+
//# sourceMappingURL=local-transform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BOUNDS_LOCAL_TRANSFORM_STYLE_KEY","exports","getTransformFromPreparedStyle","style","undefined","Array","isArray","transform","attachBoundsLocalTransform","slotStyle","localStyle","localTransform","length","next","source","key","getBoundsLocalTransform","stripBoundsLocalTransform","rest"],"sourceRoot":"../../../../../../../src","sources":["shared/utils/bounds/helpers/styles/local-transform.ts"],"mappings":";;;;;;AAEO,MAAMA,gCAAgC,GAAAC,OAAA,CAAAD,gCAAA,GAC5C,yCAAyC;AAM1C,MAAME,6BAA6B,GAClCC,KAAc,IACwB;EACtC,SAAS;;EAET,IACCA,KAAK,KAAK,IAAI,IACdA,KAAK,KAAKC,SAAS,IACnB,OAAOD,KAAK,KAAK,QAAQ,IACzBE,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,EACnB;IACD,OAAOC,SAAS;EACjB;EAEA,MAAMG,SAAS,GAAIJ,KAAK,CAA6BI,SA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B,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { memo, useLayoutEffect, useMemo } from "react";
|
|
4
4
|
import Animated, { useAnimatedRef } from "react-native-reanimated";
|
|
5
|
+
import { useComposedSlotStyles, useSlotLayoutStyles } from "../../../providers/screen/styles";
|
|
5
6
|
import { prepareStyleForBounds } from "../../../utils/bounds/helpers/styles/styles";
|
|
6
7
|
import { logger } from "../../../utils/logger";
|
|
7
8
|
import { Portal } from "../portal/components/portal";
|
|
@@ -18,12 +19,15 @@ export const BoundaryTarget = /*#__PURE__*/memo(function BoundaryTarget(props) {
|
|
|
18
19
|
const registerTargetRef = rootContext?.registerTargetRef;
|
|
19
20
|
const unregisterTargetRef = rootContext?.unregisterTargetRef;
|
|
20
21
|
const isActiveTarget = rootContext?.activeTargetRef === targetAnimatedRef;
|
|
22
|
+
const portalRuntime = rootContext?.portalRuntime;
|
|
23
|
+
const shouldApplyAssociatedStyleInline = isActiveTarget && portalRuntime?.enabled !== true;
|
|
24
|
+
const shouldApplyPortalLayoutStyle = isActiveTarget && portalRuntime?.enabled === true;
|
|
25
|
+
const associatedTargetStyles = useComposedSlotStyles(rootContext?.boundTag.tag, style);
|
|
26
|
+
const portalLayoutStyle = useSlotLayoutStyles(rootContext?.boundTag.tag);
|
|
21
27
|
const preparedStyles = useMemo(() => prepareStyleForBounds(style), [style]);
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
// the truthful measurement surface whenever a portal is configured.
|
|
26
|
-
const measurementRef = rootContext?.portal ? placeholderAnimatedRef : targetAnimatedRef;
|
|
28
|
+
// Teleported content can render outside its layout slot. The placeholder is
|
|
29
|
+
// the truthful measurement surface whenever runtime portal behavior is active.
|
|
30
|
+
const measurementRef = portalRuntime?.enabled ? placeholderAnimatedRef : targetAnimatedRef;
|
|
27
31
|
useLayoutEffect(() => {
|
|
28
32
|
if (!registerTargetRef || !unregisterTargetRef) {
|
|
29
33
|
if (__DEV__) {
|
|
@@ -38,12 +42,13 @@ export const BoundaryTarget = /*#__PURE__*/memo(function BoundaryTarget(props) {
|
|
|
38
42
|
}, [registerTargetRef, unregisterTargetRef, targetAnimatedRef, preparedStyles, measurementRef]);
|
|
39
43
|
return /*#__PURE__*/_jsx(Portal, {
|
|
40
44
|
id: rootContext?.boundTag.tag,
|
|
41
|
-
|
|
45
|
+
handoff: portalRuntime?.handoff,
|
|
46
|
+
escapeClipping: portalRuntime?.escapeClipping,
|
|
42
47
|
placeholderRef: placeholderAnimatedRef,
|
|
43
48
|
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
44
49
|
...rest,
|
|
45
50
|
ref: targetAnimatedRef,
|
|
46
|
-
style: [style,
|
|
51
|
+
style: [style, shouldApplyAssociatedStyleInline ? associatedTargetStyles : undefined, shouldApplyPortalLayoutStyle ? portalLayoutStyle : undefined],
|
|
47
52
|
collapsable: false
|
|
48
53
|
})
|
|
49
54
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","useLayoutEffect","useMemo","Animated","useAnimatedRef","prepareStyleForBounds","logger","Portal","TARGET_OUTSIDE_ROOT_WARNING","useBoundaryRootContext","jsx","_jsx","BoundaryTarget","props","style","rest","targetAnimatedRef","placeholderAnimatedRef","rootContext","registerTargetRef","unregisterTargetRef","isActiveTarget","activeTargetRef","
|
|
1
|
+
{"version":3,"names":["memo","useLayoutEffect","useMemo","Animated","useAnimatedRef","useComposedSlotStyles","useSlotLayoutStyles","prepareStyleForBounds","logger","Portal","TARGET_OUTSIDE_ROOT_WARNING","useBoundaryRootContext","jsx","_jsx","BoundaryTarget","props","style","rest","targetAnimatedRef","placeholderAnimatedRef","rootContext","registerTargetRef","unregisterTargetRef","isActiveTarget","activeTargetRef","portalRuntime","shouldApplyAssociatedStyleInline","enabled","shouldApplyPortalLayoutStyle","associatedTargetStyles","boundTag","tag","portalLayoutStyle","preparedStyles","measurementRef","__DEV__","warn","id","handoff","escapeClipping","placeholderRef","children","View","ref","undefined","collapsable"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/components/boundary-target.tsx"],"mappings":";;AACA,SAASA,IAAI,EAAEC,eAAe,EAAEC,OAAO,QAAQ,OAAO;AAEtD,OAAOC,QAAQ,IAAIC,cAAc,QAAQ,yBAAyB;AAClE,SACCC,qBAAqB,EACrBC,mBAAmB,QACb,kCAAkC;AACzC,SAASC,qBAAqB,QAAQ,6CAA6C;AACnF,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,MAAM,QAAQ,6BAA6B;AACpD,SACCC,2BAA2B,EAC3BC,sBAAsB,QAChB,qCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAI7C,OAAO,MAAMC,cAAc,gBAAGd,IAAI,CAAC,SAASc,cAAcA,CACzDC,KAA0B,EACzB;EACD,MAAM;IAAEC,KAAK;IAAE,GAAGC;EAAK,CAAC,GAAGF,KAAK;EAChC,MAAMG,iBAAiB,GAAGd,cAAc,CAAO,CAAC;EAChD,MAAMe,sBAAsB,GAAGf,cAAc,CAAO,CAAC;EACrD,MAAMgB,WAAW,GAAGT,sBAAsB,CAAC,CAAC;EAC5C,MAAMU,iBAAiB,GAAGD,WAAW,EAAEC,iBAAiB;EACxD,MAAMC,mBAAmB,GAAGF,WAAW,EAAEE,mBAAmB;EAC5D,MAAMC,cAAc,GAAGH,WAAW,EAAEI,eAAe,KAAKN,iBAAiB;EACzE,MAAMO,aAAa,GAAGL,WAAW,EAAEK,aAAa;EAChD,MAAMC,gCAAgC,GACrCH,cAAc,IAAIE,aAAa,EAAEE,OAAO,KAAK,IAAI;EAClD,MAAMC,4BAA4B,GACjCL,cAAc,IAAIE,aAAa,EAAEE,OAAO,KAAK,IAAI;EAClD,MAAME,sBAAsB,GAAGxB,qBAAqB,CACnDe,WAAW,EAAEU,QAAQ,CAACC,GAAG,EACzBf,KACD,CAAC;EACD,MAAMgB,iBAAiB,GAAG1B,mBAAmB,CAACc,W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ativeHandle, useMemo } from "react";
|
|
4
|
-
import Animated from "react-native-reanimated";
|
|
4
|
+
import Animated, { useAnimatedRef } from "react-native-reanimated";
|
|
5
5
|
import { useDescriptorsStore } from "../../providers/screen/descriptors";
|
|
6
|
-
import {
|
|
6
|
+
import { useComposedSlotStyles, useSlotStackingStyles } from "../../providers/screen/styles";
|
|
7
7
|
import { createBoundTag } from "../../stores/bounds/helpers/link-pairs.helpers";
|
|
8
8
|
import { useBoundaryMeasurement } from "./hooks/use-boundary-measurement";
|
|
9
|
-
import {
|
|
9
|
+
import { BoundaryLocalPortalHost } from "./portal/components/boundary-local-portal-host";
|
|
10
|
+
import { Portal } from "./portal/components/portal";
|
|
11
|
+
import { resolveBoundaryPortal } from "./portal/utils/resolve-portal";
|
|
10
12
|
import { BoundaryRootProvider, useBoundaryRootState } from "./providers/boundary-root.provider";
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
const hasRenderableChildren = children => {
|
|
15
|
+
if (children === null || children === undefined || typeof children === "boolean") {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
if (Array.isArray(children)) {
|
|
19
|
+
return children.some(hasRenderableChildren);
|
|
20
|
+
}
|
|
21
|
+
return true;
|
|
22
|
+
};
|
|
12
23
|
export function createBoundaryComponent(Wrapped, options = {}) {
|
|
13
24
|
const {
|
|
14
|
-
alreadyAnimated = false
|
|
15
|
-
shouldAutoMeasure = false
|
|
25
|
+
alreadyAnimated = false
|
|
16
26
|
} = options;
|
|
17
27
|
const AnimatedComponent = alreadyAnimated ? Wrapped : Animated.createAnimatedComponent(Wrapped);
|
|
18
28
|
const Inner = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
@@ -26,19 +36,26 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
26
36
|
method,
|
|
27
37
|
style,
|
|
28
38
|
onPress,
|
|
29
|
-
|
|
39
|
+
handoff,
|
|
40
|
+
escapeClipping,
|
|
41
|
+
children,
|
|
30
42
|
...rest
|
|
31
43
|
} = props;
|
|
32
44
|
const boundTag = useMemo(() => createBoundTag(String(id), group), [id, group]);
|
|
33
|
-
const
|
|
45
|
+
const portalRuntime = resolveBoundaryPortal({
|
|
46
|
+
handoff,
|
|
47
|
+
escapeClipping
|
|
48
|
+
});
|
|
34
49
|
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
35
50
|
const hasConfiguredInterpolator = useDescriptorsStore(s => s.derivations.hasConfiguredInterpolator);
|
|
36
51
|
const runtimeEnabled = enabled && hasConfiguredInterpolator;
|
|
37
52
|
// Associated slot styles attach whenever the boundary is enabled,
|
|
38
53
|
// independent of whether an interpolator is configured for this transition.
|
|
39
54
|
const shouldAttachAssociatedStyles = enabled;
|
|
40
|
-
const
|
|
55
|
+
const canPortalRoot = portalRuntime.enabled && hasRenderableChildren(children);
|
|
56
|
+
const associatedStyles = useComposedSlotStyles(boundTag.tag, style);
|
|
41
57
|
const associatedStackingStyles = useSlotStackingStyles(boundTag.tag);
|
|
58
|
+
const rootPlaceholderRef = useAnimatedRef();
|
|
42
59
|
const {
|
|
43
60
|
ref,
|
|
44
61
|
contextValue,
|
|
@@ -47,12 +64,10 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
47
64
|
targetPreparedStyles
|
|
48
65
|
} = useBoundaryRootState({
|
|
49
66
|
boundTag,
|
|
50
|
-
|
|
51
|
-
|
|
67
|
+
portalRuntime,
|
|
68
|
+
rootMeasurementRef: canPortalRoot ? rootPlaceholderRef : undefined
|
|
52
69
|
});
|
|
53
|
-
|
|
54
|
-
onPress: resolvedOnPress
|
|
55
|
-
} = useBoundaryMeasurement({
|
|
70
|
+
useBoundaryMeasurement({
|
|
56
71
|
boundTag,
|
|
57
72
|
enabled,
|
|
58
73
|
runtimeEnabled,
|
|
@@ -60,35 +75,58 @@ export function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
60
75
|
measuredRef,
|
|
61
76
|
style,
|
|
62
77
|
targetPreparedStyles,
|
|
63
|
-
|
|
64
|
-
|
|
78
|
+
handoff: portalRuntime.handoff,
|
|
79
|
+
escapeClipping: portalRuntime.escapeClipping,
|
|
65
80
|
config: {
|
|
66
81
|
anchor,
|
|
67
82
|
scaleMode,
|
|
68
83
|
target,
|
|
69
84
|
method
|
|
70
|
-
}
|
|
71
|
-
onPress
|
|
85
|
+
}
|
|
72
86
|
});
|
|
73
87
|
useImperativeHandle(forwardedRef, () => ref.current, [ref]);
|
|
74
|
-
|
|
88
|
+
const shouldPortalRoot = canPortalRoot && !hasActiveTarget;
|
|
75
89
|
// A nested active target takes the full associated style, so the root keeps
|
|
76
|
-
// only its stacking context
|
|
77
|
-
|
|
90
|
+
// only its stacking context. Without a nested target, a portal'd root is the
|
|
91
|
+
// target, so its associated style is applied through the portal host instead
|
|
92
|
+
// of inline on the teleported element.
|
|
93
|
+
// Host-only handoff receivers still need the associated style: their local
|
|
94
|
+
// portal host is absolute-filled inside this root, so the root is the visual
|
|
95
|
+
// frame that animates the received payload.
|
|
96
|
+
const attachedStyle = shouldAttachAssociatedStyles ? hasActiveTarget ? associatedStackingStyles : shouldPortalRoot ? undefined : associatedStyles : undefined;
|
|
97
|
+
const pressProps = typeof onPress === "function" ? {
|
|
98
|
+
onPress
|
|
99
|
+
} : undefined;
|
|
100
|
+
const localPortalHost = /*#__PURE__*/_jsx(BoundaryLocalPortalHost, {
|
|
101
|
+
boundaryId: boundTag.tag,
|
|
102
|
+
enabled: enabled && portalRuntime.handoff,
|
|
103
|
+
screenKey: currentScreenKey
|
|
104
|
+
});
|
|
105
|
+
const canInjectLocalPortalHost = typeof children !== "function";
|
|
106
|
+
const renderBoundaryRoot = extraChildren => /*#__PURE__*/_jsxs(AnimatedComponent, {
|
|
107
|
+
...rest,
|
|
108
|
+
...pressProps,
|
|
109
|
+
ref: ref,
|
|
110
|
+
style: [style, attachedStyle],
|
|
111
|
+
collapsable: false,
|
|
112
|
+
children: [children, canInjectLocalPortalHost ? extraChildren : null]
|
|
113
|
+
});
|
|
114
|
+
const boundaryRoot = renderBoundaryRoot(shouldPortalRoot ? undefined : localPortalHost);
|
|
78
115
|
return /*#__PURE__*/_jsx(BoundaryRootProvider, {
|
|
79
116
|
value: contextValue,
|
|
80
|
-
children: /*#__PURE__*/_jsx(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
117
|
+
children: shouldPortalRoot ? /*#__PURE__*/_jsx(Portal, {
|
|
118
|
+
id: boundTag.tag,
|
|
119
|
+
handoff: portalRuntime.handoff,
|
|
120
|
+
escapeClipping: portalRuntime.escapeClipping,
|
|
121
|
+
placeholderRef: rootPlaceholderRef,
|
|
122
|
+
placeholderChildren: portalRuntime.handoff ? localPortalHost : undefined,
|
|
123
|
+
children: boundaryRoot
|
|
124
|
+
}) : boundaryRoot
|
|
87
125
|
});
|
|
88
126
|
});
|
|
89
127
|
|
|
90
128
|
// The HOC's runtime identity (animated + memoized forwardRef) is not
|
|
91
129
|
// expressible against the public boundary props, so assert it here.
|
|
92
|
-
return /*#__PURE__*/memo(
|
|
130
|
+
return /*#__PURE__*/memo(Inner);
|
|
93
131
|
}
|
|
94
132
|
//# sourceMappingURL=create-boundary-component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","memo","useImperativeHandle","useMemo","Animated","useDescriptorsStore","
|
|
1
|
+
{"version":3,"names":["forwardRef","memo","useImperativeHandle","useMemo","Animated","useAnimatedRef","useDescriptorsStore","useComposedSlotStyles","useSlotStackingStyles","createBoundTag","useBoundaryMeasurement","BoundaryLocalPortalHost","Portal","resolveBoundaryPortal","BoundaryRootProvider","useBoundaryRootState","jsx","_jsx","jsxs","_jsxs","hasRenderableChildren","children","undefined","Array","isArray","some","createBoundaryComponent","Wrapped","options","alreadyAnimated","AnimatedComponent","createAnimatedComponent","Inner","props","forwardedRef","enabled","group","id","anchor","scaleMode","target","method","style","onPress","handoff","escapeClipping","rest","boundTag","String","portalRuntime","currentScreenKey","s","derivations","hasConfiguredInterpolator","runtimeEnabled","shouldAttachAssociatedStyles","canPortalRoot","associatedStyles","tag","associatedStackingStyles","rootPlaceholderRef","ref","contextValue","measuredRef","hasActiveTarget","targetPreparedStyles","rootMeasurementRef","config","current","shouldPortalRoot","attachedStyle","pressProps","localPortalHost","boundaryId","screenKey","canInjectLocalPortalHost","renderBoundaryRoot","extraChildren","collapsable","boundaryRoot","value","placeholderRef","placeholderChildren"],"sourceRoot":"../../../../../src","sources":["shared/components/boundary/create-boundary-component.tsx"],"mappings":";;AAAA,SAECA,UAAU,EACVC,IAAI,EAEJC,mBAAmB,EACnBC,OAAO,QACD,OAAO;AAEd,OAAOC,QAAQ,IAAIC,cAAc,QAAQ,yBAAyB;AAClE,SAASC,mBAAmB,QAAQ,oCAAoC;AACxE,SACCC,qBAAqB,EACrBC,qBAAqB,QACf,+BAA+B;AACtC,SAASC,cAAc,QAAQ,gDAAgD;AAC/E,SAASC,sBAAsB,QAAQ,kCAAkC;AACzE,SAASC,uBAAuB,QAAQ,gDAAgD;AACxF,SAASC,MAAM,QAAQ,4BAA4B;AACnD,SAASC,qBAAqB,QAAQ,+BAA+B;AACrE,SACCC,oBAAoB,EACpBC,oBAAoB,QACd,oCAAoC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAO5C,MAAMC,qBAAqB,GAAIC,QAAmB,IAAc;EAC/D,IACCA,QAAQ,KAAK,IAAI,IACjBA,QAAQ,KAAKC,SAAS,IACtB,OAAOD,QAAQ,KAAK,SAAS,EAC5B;IACD,OAAO,KAAK;EACb;EAEA,IAAIE,KAAK,CAACC,OAAO,CAACH,QAAQ,CAAC,EAAE;IAC5B,OAAOA,QAAQ,CAACI,IAAI,CAACL,qBAAqB,CAAC;EAC5C;EAEA,OAAO,IAAI;AACZ,CAAC;AAED,OAAO,SA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MAAMuD,kBAAkB,GAAIC,aAAyB,iBACpD1D,KAAA,CAACW,iBAAiB;MAAA,GACbgB,IAAI;MAAA,GACJyB,UAAU;MACdV,GAAG,EAAEA,GAAI;MACTnB,KAAK,EAAE,CAACA,KAAK,EAAE4B,aAAa,CAAE;MAC9BQ,WAAW,EAAE,KAAM;MAAAzD,QAAA,GAElBA,QAAQ,EACRsD,wBAAwB,GAAGE,aAAa,GAAG,IAAI;IAAA,CAC9B,CACnB;IACD,MAAME,YAAY,GAAGH,kBAAkB,CACtCP,gBAAgB,GAAG/C,SAAS,GAAGkD,eAChC,CAAC;IAED,oBACCvD,IAAA,CAACH,oBAAoB;MAACkE,KAAK,EAAElB,YAAa;MAAAzC,QAAA,EACxCgD,gBAAgB,gBAChBpD,IAAA,CAACL,MAAM;QACNyB,EAAE,EAAEU,QAAQ,CAACW,GAAI;QACjBd,OAAO,EAAEK,aAAa,CAACL,OAAQ;QAC/BC,cAAc,EAAEI,aAAa,CAACJ,cAAe;QAC7CoC,cAAc,EAAErB,kBAAmB;QACnCsB,mBAAmB,EAClBjC,aAAa,CAACL,OAAO,GAAG4B,eAAe,GAAGlD,SAC1C;QAAAD,QAAA,EAEA0D;MAAY,CACN,CAAC,GAETA;IACA,CACoB,CAAC;EAEzB,CAAC,CAAC;;EAEF;EACA;EACA,oBAAO9E,IAAI,CAAC+B,KAAK,CAAC;AAMnB","ignoreList":[]}
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import { useLayoutEffect } from "react";
|
|
4
4
|
import { runOnUI } from "react-native-reanimated";
|
|
5
|
-
import { removeEntry, setEntry } from "
|
|
5
|
+
import { removeEntry, setEntry } from "../../../../stores/bounds/internals/entries";
|
|
6
6
|
export const useBoundaryPresence = params => {
|
|
7
7
|
const {
|
|
8
8
|
enabled,
|
|
9
9
|
boundTag,
|
|
10
10
|
currentScreenKey,
|
|
11
|
-
boundaryConfig
|
|
11
|
+
boundaryConfig,
|
|
12
|
+
handoff,
|
|
13
|
+
escapeClipping
|
|
12
14
|
} = params;
|
|
13
15
|
const {
|
|
14
16
|
tag
|
|
@@ -16,11 +18,13 @@ export const useBoundaryPresence = params => {
|
|
|
16
18
|
useLayoutEffect(() => {
|
|
17
19
|
if (!enabled) return;
|
|
18
20
|
runOnUI(setEntry)(tag, currentScreenKey, {
|
|
19
|
-
boundaryConfig
|
|
21
|
+
boundaryConfig,
|
|
22
|
+
handoff: handoff ? true : null,
|
|
23
|
+
escapeClipping: escapeClipping ? true : null
|
|
20
24
|
});
|
|
21
25
|
return () => {
|
|
22
26
|
runOnUI(removeEntry)(tag, currentScreenKey);
|
|
23
27
|
};
|
|
24
|
-
}, [enabled, tag, currentScreenKey, boundaryConfig]);
|
|
28
|
+
}, [enabled, tag, currentScreenKey, boundaryConfig, handoff, escapeClipping]);
|
|
25
29
|
};
|
|
26
30
|
//# sourceMappingURL=use-boundary-presence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","runOnUI","removeEntry","setEntry","useBoundaryPresence","params","enabled","boundTag","currentScreenKey","boundaryConfig","handoff","escapeClipping","tag"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-boundary-presence.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AACvC,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SACCC,WAAW,EACXC,QAAQ,QACF,6CAA6C;AAIpD,OAAO,MAAMC,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;EAExBP,eAAe,CAAC,MAAM;IACrB,IAAI,CAACM,OAAO,EAAE;IAEdL,OAAO,CAACE,QAAQ,CAAC,CAACS,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;MACZV,OAAO,CAACC,WAAW,CAAC,CAACU,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","ignoreList":[]}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { cancelAnimation, useAnimatedReaction, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
|
|
4
|
-
import { useDescriptorsStore } from "
|
|
5
|
-
import { AnimationStore } from "
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
5
|
+
import { AnimationStore } from "../../../../stores/animation.store";
|
|
6
|
+
import { getSourceScreenKeyFromPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
7
|
+
import { getEntry } from "../../../../stores/bounds/internals/entries";
|
|
8
|
+
import { getDestination, getLink } from "../../../../stores/bounds/internals/links";
|
|
9
|
+
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
10
|
+
import { LifecycleTransitionRequestKind, SystemStore } from "../../../../stores/system.store";
|
|
11
|
+
import { logger } from "../../../../utils/logger";
|
|
12
|
+
import { hasHandoffEscapeContinuation, usesEscapeClippingHost } from "../../portal/utils/ownership";
|
|
13
|
+
import { getInitialDestinationMeasurePairKey } from "../../utils/destination-signals";
|
|
11
14
|
const VIEWPORT_RETRY_DELAY_MS = 100;
|
|
12
15
|
/**
|
|
13
16
|
* A destination that keeps failing its measurement guards must not hold the
|
|
@@ -21,6 +24,7 @@ export const useInitialDestinationMeasurement = ({
|
|
|
21
24
|
measureBoundary
|
|
22
25
|
}) => {
|
|
23
26
|
const {
|
|
27
|
+
tag,
|
|
24
28
|
linkKey,
|
|
25
29
|
group
|
|
26
30
|
} = boundTag;
|
|
@@ -73,9 +77,6 @@ export const useInitialDestinationMeasurement = ({
|
|
|
73
77
|
"worklet";
|
|
74
78
|
|
|
75
79
|
if (!measurePairKey) {
|
|
76
|
-
releaseLifecycleStartBlock();
|
|
77
|
-
viewportRetries.set(0);
|
|
78
|
-
hasGivenUp.set(0);
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
82
|
const previousMeasurePairKey = previous?.[0];
|
|
@@ -97,6 +98,22 @@ export const useInitialDestinationMeasurement = ({
|
|
|
97
98
|
});
|
|
98
99
|
const destinationAttached = getDestination(measurePairKey, linkKey) !== null;
|
|
99
100
|
if (destinationAttached) {
|
|
101
|
+
const linkState = pairs.get();
|
|
102
|
+
const link = getLink(measurePairKey, linkKey);
|
|
103
|
+
const sourceScreenKey = getSourceScreenKeyFromPairKey(measurePairKey);
|
|
104
|
+
const sourceEntry = getEntry(tag, sourceScreenKey);
|
|
105
|
+
const sourceEntryUsesDestinationEscapeHost = sourceEntry?.handoff === true && sourceEntry.escapeClipping === true;
|
|
106
|
+
const shouldWaitForEscapeClippingHost = usesEscapeClippingHost(link) || sourceEntryUsesDestinationEscapeHost || hasHandoffEscapeContinuation({
|
|
107
|
+
linkKey,
|
|
108
|
+
linkState,
|
|
109
|
+
sourceScreenKey
|
|
110
|
+
});
|
|
111
|
+
if (shouldWaitForEscapeClippingHost) {
|
|
112
|
+
// Screen-level escape has a second readiness phase after destination
|
|
113
|
+
// measurement: the host must commit before the transition starts, or
|
|
114
|
+
// the payload can disappear for a frame.
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
100
117
|
releaseLifecycleStartBlock();
|
|
101
118
|
viewportRetries.set(0);
|
|
102
119
|
return;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","useDescriptorsStore","AnimationStore","getSourceScreenKeyFromPairKey","getEntry","getDestination","getLink","pairs","LifecycleTransitionRequestKind","SystemStore","logger","hasHandoffEscapeContinuation","usesEscapeClippingHost","getInitialDestinationMeasurePairKey","VIEWPORT_RETRY_DELAY_MS","MAX_VIEWPORT_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","measureBoundary","tag","linkKey","group","currentScreenKey","s","derivations","nextScreenKey","destinationPairKey","ancestorDestinationPairKey","destinationEnabled","progress","getValue","pendingLifecycleRequestKind","actions","blockLifecycleStart","unblockLifecycleStart","getBag","isBlockingLifecycleStart","retryToken","viewportRetries","hasGivenUp","releaseLifecycleStartBlock","get","set","retryTick","hasPendingOpenRequest","Open","isWaitingForOpenToStart","measurePairKey","linkId","linkState","undefined","previous","previousMeasurePairKey","previousRetryTick","shouldAttemptMeasure","type","pairKey","destinationAttached","link","sourceScreenKey","sourceEntry","sourceEntryUsesDestinationEscapeHost","handoff","escapeClipping","shouldWaitForEscapeClippingHost","warn","duration"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts"],"mappings":";;AAAA,SACCA,eAAe,EACfC,mBAAmB,EACnBC,cAAc,EACdC,SAAS,EACTC,UAAU,QACJ,yBAAyB;AAChC,SAASC,mBAAmB,QAAQ,0CAA0C;AAC9E,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,6BAA6B,QAAQ,sDAAsD;AACpG,SAASC,QAAQ,QAAQ,6CAA6C;AACtE,SACCC,cAAc,EACdC,OAAO,QACD,2CAA2C;AAClD,SAASC,KAAK,QAAQ,2CAA2C;AAEjE,SACCC,8BAA8B,EAC9BC,WAAW,QACL,iCAAiC;AACxC,SAASC,MAAM,QAAQ,0BAA0B;AACjD,SACCC,4BAA4B,EAC5BC,sBAAsB,QAChB,8BAA8B;AAErC,SAASC,mCAAmC,QAAQ,iCAAiC;AAErF,MAAM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AwB,eAAe,CAACI,GAAG,CAACJ,eAAe,CAACG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAC9C9C,eAAe,CAAC0C,UAAU,CAAC;IAC3BA,UAAU,CAACK,GAAG,CACb5C,SAAS,CACRe,uBAAuB,EACvBd,UAAU,CAACsC,UAAU,CAACI,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;MAAEyB,QAAQ,EAAE;IAAE,CAAC,CACjD,CACD,CAAC;EACF,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useAnimatedReaction, useSharedValue } from "react-native-reanimated";
|
|
4
|
-
import { useDescriptorsStore } from "
|
|
5
|
-
import { pairs } from "
|
|
6
|
-
import { getInitialSourceCaptureSignal } from "
|
|
4
|
+
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
5
|
+
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
6
|
+
import { getInitialSourceCaptureSignal } from "../../utils/source-signals";
|
|
7
7
|
export const useInitialSourceMeasurement = params => {
|
|
8
8
|
const {
|
|
9
9
|
enabled,
|
|
10
10
|
measureBoundary,
|
|
11
|
-
boundTag
|
|
12
|
-
shouldAutoMeasure
|
|
11
|
+
boundTag
|
|
13
12
|
} = params;
|
|
14
13
|
const sourcePairKey = useDescriptorsStore(s => s.derivations.sourcePairKey);
|
|
15
14
|
const lastSourceCaptureSignal = useSharedValue(null);
|
|
@@ -21,8 +20,7 @@ export const useInitialSourceMeasurement = params => {
|
|
|
21
20
|
sourcePairKey,
|
|
22
21
|
linkId: boundTag.linkKey,
|
|
23
22
|
group: boundTag.group,
|
|
24
|
-
|
|
25
|
-
linkState: shouldAutoMeasure && sourcePairKey ? pairs.get() : undefined
|
|
23
|
+
linkState: sourcePairKey ? pairs.get() : undefined
|
|
26
24
|
});
|
|
27
25
|
}, captureSignal => {
|
|
28
26
|
"worklet";
|
package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","useSharedValue","useDescriptorsStore","pairs","getInitialSourceCaptureSignal","useInitialSourceMeasurement","params","enabled","measureBoundary","boundTag","sourcePairKey","s","derivations","lastSourceCaptureSignal","linkId","linkKey","group","linkState","get","undefined","captureSignal","set","signal","type","pairKey"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.ts"],"mappings":";;AAAA,SAASA,mBAAmB,EAAEC,cAAc,QAAQ,yBAAyB;AAC7E,SAASC,mBAAmB,QAAQ,0CAA0C;AAC9E,SAASC,KAAK,QAAQ,2CAA2C;AAGjE,SAASC,6BAA6B,QAAQ,4BAA4B;AAE1E,OAAO,MAAMC,2BAA2B,GAAIC,MAI3C,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,eAAe;IAAEC;EAAS,CAAC,GAAGH,MAAM;EACrD,MAAMI,aAAa,GAAGR,mBAAmB,CAAES,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,aAAa,CAAC;EAC7E,MAAMG,uBAAuB,GAAGZ,cAAc,CAAgB,IAAI,CAAC;EAEnED,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,OAAOI,6BAA6B,CAAC;MACpCG,OAAO;MACPG,aAAa;MACbI,MAAM,EAAEL,QAAQ,CAACM,OAAO;MACxBC,KAAK,EAAEP,QAAQ,CAACO,KAAK;MACrBC,SAAS,EAAEP,aAAa,GAAGP,KAAK,CAACe,GAAG,CAAC,CAAC,GAAGC;IAC1C,CAAC,CAAC;EACH,CAAC,EACAC,aAAa,IAAK;IAClB,SAAS;;IACT,IAAI,CAACb,OAAO,IAAI,CAACa,aAAa,EAAE;MAC/BP,uBAAuB,CAACQ,GAAG,CAAC,IAAI,CAAC;MACjC;IACD;IAEA,IAAIR,uBAAuB,CAACK,GAAG,CAAC,CAAC,KAAKE,aAAa,CAACE,MAAM,EAAE;MAC3D;IACD;IAEAT,uBAAuB,CAACQ,GAAG,CAACD,aAAa,CAACE,MAAM,CAAC;IACjDd,eAAe,CAAC;MACfe,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useAnimatedReaction } from "react-native-reanimated";
|
|
4
|
-
import { useDescriptorsStore } from "
|
|
5
|
-
import { AnimationStore } from "
|
|
6
|
-
import { pairs } from "
|
|
7
|
-
import { getRefreshBoundarySignal } from "
|
|
4
|
+
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
5
|
+
import { AnimationStore } from "../../../../stores/animation.store";
|
|
6
|
+
import { pairs } from "../../../../stores/bounds/internals/state";
|
|
7
|
+
import { getRefreshBoundarySignal } from "../../utils/refresh-signals";
|
|
8
8
|
export const useRefreshBoundary = ({
|
|
9
9
|
enabled,
|
|
10
10
|
boundTag,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","useDescriptorsStore","AnimationStore","pairs","getRefreshBoundarySignal","useRefreshBoundary","enabled","boundTag","measureBoundary","linkKey","group","currentScreenKey","s","derivations","nextScreenKey","sourcePairKey","destinationPairKey","ancestorDestinationPairKey","refreshScreenKey","refreshWillAnimate","getValue","refreshClosing","refreshEntering","refreshAnimating","refreshProgress","linkId","shouldRefresh","get","closing","entering","animating","progress","linkState","refreshSignal","prevRefreshSignal","signal","type","pairKey"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,mBAAmB,QAAQ,0CAA0C;AAC9E,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,KAAK,QAAQ,2CAA2C;AA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AChBI,aAAa;MACbC,kBAAkB;MAClBC,0BAA0B;MAC1BH,aAAa;MACbW,MAAM,EAAEhB,OAAO;MACfC,KAAK;MACLgB,aAAa,EAAE,CAAC,CAACP,kBAAkB,CAACQ,GAAG,CAAC,CAAC;MACzCC,OAAO,EAAE,CAAC,CAACP,cAAc,CAACM,GAAG,CAAC,CAAC;MAC/BE,QAAQ,EAAE,CAAC,CAACP,eAAe,CAACK,GAAG,CAAC,CAAC;MACjCG,SAAS,EAAE,CAAC,CAACP,gBAAgB,CAACI,GAAG,CAAC,CAAC;MACnCI,QAAQ,EAAEP,eAAe,CAACG,GAAG,CAAC,CAAC;MAC/BK,SAAS,EAAE7B,KAAK,CAACwB,GAAG,CAAC;IACtB,CAAC,CAAC;EACH,CAAC,EACD,CAACM,aAAa,EAAEC,iBAAiB,KAAK;IACrC,SAAS;;IAET,IACC,CAACD,aAAa,IACdA,aAAa,CAACE,MAAM,KAAKD,iBAAiB,EAAEC,MAAM,EACjD;MACD;IACD;IAEA3B,eAAe,CAAC;MACf4B,IAAI,EAAEH,aAAa,CAACG,IAAI;MACxBC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { runOnUI } from "react-native-reanimated";
|
|
5
|
-
import { createPendingPairKey } from "../../../stores/bounds/helpers/link-pairs.helpers";
|
|
3
|
+
import { useMemo } from "react";
|
|
6
4
|
import { prepareStyleForBounds } from "../../../utils/bounds/helpers/styles/styles";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { useBoundaryPresence } from "./lifecycles/use-boundary-presence";
|
|
6
|
+
import { useInitialDestinationMeasurement } from "./lifecycles/use-initial-destination-measurement";
|
|
7
|
+
import { useInitialSourceMeasurement } from "./lifecycles/use-initial-source-measurement";
|
|
8
|
+
import { useRefreshBoundary } from "./lifecycles/use-refresh-boundary";
|
|
11
9
|
import { useMeasurer } from "./use-measurer";
|
|
12
|
-
import { useRefreshBoundary } from "./use-refresh-boundary";
|
|
13
10
|
/**
|
|
14
11
|
* Owns the full measurement lifecycle for a boundary: builds the measurer,
|
|
15
12
|
* registers presence, runs the initial source/destination + refresh reactions,
|
|
16
|
-
* and
|
|
17
|
-
* measurer itself.
|
|
13
|
+
* and keeps the component itself away from the measurer.
|
|
18
14
|
*/
|
|
19
15
|
export const useBoundaryMeasurement = ({
|
|
20
16
|
boundTag,
|
|
@@ -24,10 +20,9 @@ export const useBoundaryMeasurement = ({
|
|
|
24
20
|
measuredRef,
|
|
25
21
|
style,
|
|
26
22
|
targetPreparedStyles,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
config
|
|
30
|
-
onPress
|
|
23
|
+
handoff,
|
|
24
|
+
escapeClipping,
|
|
25
|
+
config
|
|
31
26
|
}) => {
|
|
32
27
|
const {
|
|
33
28
|
anchor,
|
|
@@ -43,14 +38,14 @@ export const useBoundaryMeasurement = ({
|
|
|
43
38
|
}), [anchor, scaleMode, target, method]);
|
|
44
39
|
const rootPreparedStyles = useMemo(() => prepareStyleForBounds(style), [style]);
|
|
45
40
|
const preparedStyles = targetPreparedStyles ?? rootPreparedStyles;
|
|
46
|
-
const portalHost = resolvePortalHost(portal);
|
|
47
41
|
const measureBoundary = useMeasurer({
|
|
48
42
|
enabled,
|
|
49
43
|
boundTag,
|
|
50
44
|
currentScreenKey,
|
|
51
45
|
preparedStyles,
|
|
52
46
|
measuredAnimatedRef: measuredRef,
|
|
53
|
-
|
|
47
|
+
handoff,
|
|
48
|
+
escapeClipping
|
|
54
49
|
});
|
|
55
50
|
|
|
56
51
|
// Register/unregister this boundary in the presence map so source/destination
|
|
@@ -59,17 +54,14 @@ export const useBoundaryMeasurement = ({
|
|
|
59
54
|
enabled: runtimeEnabled,
|
|
60
55
|
boundTag,
|
|
61
56
|
currentScreenKey,
|
|
62
|
-
boundaryConfig
|
|
57
|
+
boundaryConfig,
|
|
58
|
+
handoff,
|
|
59
|
+
escapeClipping
|
|
63
60
|
});
|
|
64
|
-
|
|
65
|
-
// Passive auto-measurement only applies to non-pressable boundaries; pressable
|
|
66
|
-
// ones capture their source on press (see handlePress below).
|
|
67
|
-
const shouldPassivelyMeasureSource = shouldAutoMeasure && typeof onPress !== "function";
|
|
68
61
|
useInitialSourceMeasurement({
|
|
69
62
|
enabled: runtimeEnabled,
|
|
70
63
|
measureBoundary,
|
|
71
|
-
boundTag
|
|
72
|
-
shouldAutoMeasure: shouldPassivelyMeasureSource
|
|
64
|
+
boundTag
|
|
73
65
|
});
|
|
74
66
|
useInitialDestinationMeasurement({
|
|
75
67
|
boundTag,
|
|
@@ -81,18 +73,5 @@ export const useBoundaryMeasurement = ({
|
|
|
81
73
|
boundTag,
|
|
82
74
|
measureBoundary
|
|
83
75
|
});
|
|
84
|
-
const handlePress = useCallback((...args) => {
|
|
85
|
-
// Press path has priority: capture source before user onPress/navigation.
|
|
86
|
-
runOnUI(measureBoundary)({
|
|
87
|
-
type: "source",
|
|
88
|
-
pairKey: createPendingPairKey(currentScreenKey)
|
|
89
|
-
});
|
|
90
|
-
if (typeof onPress === "function") {
|
|
91
|
-
onPress(...args);
|
|
92
|
-
}
|
|
93
|
-
}, [measureBoundary, onPress, currentScreenKey]);
|
|
94
|
-
return {
|
|
95
|
-
onPress: typeof onPress === "function" ? handlePress : undefined
|
|
96
|
-
};
|
|
97
76
|
};
|
|
98
77
|
//# sourceMappingURL=use-boundary-measurement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useMemo","prepareStyleForBounds","useBoundaryPresence","useInitialDestinationMeasurement","useInitialSourceMeasurement","useRefreshBoundary","useMeasurer","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","targetPreparedStyles","handoff","escapeClipping","config","anchor","scaleMode","target","method","boundaryConfig","rootPreparedStyles","preparedStyles","measureBoundary","measuredAnimatedRef"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-boundary-measurement.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,OAAO;AAI/B,SAASC,qBAAqB,QAAQ,6CAA6C;AAEnF,SAASC,mBAAmB,QAAQ,oCAAoC;AACxE,SAASC,gCAAgC,QAAQ,kDAAkD;AACnG,SAASC,2BAA2B,QAAQ,6CAA6C;AACzF,SAASC,kBAAkB,QAAQ,mCAAmC;AACtE,SAASC,WAAW,QAAQ,gBAAgB;AAmB5C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,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,GAAGtB,OAAO,CAC7B,OAAO;IAAEkB,MAAM;IAAEC,SAAS;IAAEC,MAAM;IAAEC;EAAO,CAAC,CAAC,EAC7C,CAACH,MAAM,EAAEC,SAAS,EAAEC,MAAM,EAAEC,MAAM,CACnC,CAAC;EAED,MAAME,kBAAkB,GAAGvB,OAAO,CACjC,MAAMC,qBAAqB,CAACY,KAAK,CAAC,EAClC,CAACA,KAAK,CACP,CAAC;EACD,MAAMW,cAAc,GAAGV,oBAAoB,IAAIS,kBAAkB;EAEjE,MAAME,eAAe,GAAGnB,WAAW,CAAC;IACnCG,OAAO;IACPD,QAAQ;IACRG,gBAAgB;IAChBa,cAAc;IACdE,mBAAmB,EAAEd,WAAW;IAChCG,OAAO;IACPC;EACD,CAAC,CAAC;;EAEF;EACA;EACAd,mBAAmB,CAAC;IACnBO,OAAO,EAAEC,c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