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
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from "react";
|
|
2
|
+
import type { ViewProps } from "react-native";
|
|
1
3
|
import type { AnimatedProps } from "react-native-reanimated";
|
|
2
4
|
import type { ScreenStyleInterpolator, TransitionSpec } from "./animation.types";
|
|
3
5
|
import type { GestureActivationArea, GestureDirectionOption, GestureProgressMode, ScrollMetadataState } from "./gesture.types";
|
|
@@ -35,6 +37,60 @@ export type GestureTracking = "auto" | "never" | "always";
|
|
|
35
37
|
*/
|
|
36
38
|
export type SnapPoint = number | "auto";
|
|
37
39
|
export type BackdropBehavior = "block" | "passthrough" | "dismiss" | "collapse";
|
|
40
|
+
/**
|
|
41
|
+
* Props passed to custom screen layer component renderers such as
|
|
42
|
+
* {@linkcode ScreenTransitionConfig.backdropComponent}.
|
|
43
|
+
*/
|
|
44
|
+
export type ScreenLayerComponentProps = {
|
|
45
|
+
/**
|
|
46
|
+
* Animated styles for the target layer, including the library-owned base
|
|
47
|
+
* layout style for that layer.
|
|
48
|
+
*/
|
|
49
|
+
styles: AnimatedProps<ViewProps>["style"];
|
|
50
|
+
/**
|
|
51
|
+
* Animated props resolved from the matching `screenStyleInterpolator` slot.
|
|
52
|
+
*/
|
|
53
|
+
props: AnimatedProps<Record<string, unknown>>["animatedProps"];
|
|
54
|
+
/**
|
|
55
|
+
* Pointer-event behavior resolved for the current layer state.
|
|
56
|
+
*/
|
|
57
|
+
pointerEvents: ViewProps["pointerEvents"];
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Props passed to {@linkcode ScreenTransitionConfig.backdropComponent} when it
|
|
61
|
+
* is provided as a render-style component.
|
|
62
|
+
*/
|
|
63
|
+
export type ScreenBackdropComponentProps = ScreenLayerComponentProps;
|
|
64
|
+
/**
|
|
65
|
+
* Props passed to {@linkcode ScreenTransitionConfig.contentComponent} when it
|
|
66
|
+
* is provided as a render-style component.
|
|
67
|
+
*/
|
|
68
|
+
export type ScreenContentComponentProps = ScreenLayerComponentProps & {
|
|
69
|
+
/**
|
|
70
|
+
* The screen subtree rendered inside the content layer.
|
|
71
|
+
*/
|
|
72
|
+
children: ReactNode;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Custom renderer for the backdrop layer.
|
|
76
|
+
*
|
|
77
|
+
* Component types such as `BlurView` are still accepted for compatibility.
|
|
78
|
+
* Function components can also receive {@linkcode ScreenBackdropComponentProps}
|
|
79
|
+
* to render the animated styles and props manually.
|
|
80
|
+
*
|
|
81
|
+
* @see {@linkcode ScreenTransitionConfig.backdropComponent}
|
|
82
|
+
*/
|
|
83
|
+
export type ScreenBackdropComponent = ComponentType<any> | ComponentType<ScreenBackdropComponentProps>;
|
|
84
|
+
/**
|
|
85
|
+
* Custom renderer for the screen content layer.
|
|
86
|
+
*
|
|
87
|
+
* Component types such as a custom native view are accepted directly. Function
|
|
88
|
+
* components can also receive {@linkcode ScreenContentComponentProps} to render
|
|
89
|
+
* the animated styles, props, pointer-events, and children manually.
|
|
90
|
+
*
|
|
91
|
+
* @see {@linkcode ScreenTransitionConfig.contentComponent}
|
|
92
|
+
*/
|
|
93
|
+
export type ScreenContentComponent = ComponentType<any> | ComponentType<ScreenContentComponentProps>;
|
|
38
94
|
/**
|
|
39
95
|
* Controls how an inactive screen is retained after it is no longer active.
|
|
40
96
|
*
|
|
@@ -99,6 +155,8 @@ export type TransitionAwareProps<T extends object> = AnimatedProps<T> & {
|
|
|
99
155
|
* <Transition.View sharedBoundTag="profile-avatar">
|
|
100
156
|
* <Avatar size="large" />
|
|
101
157
|
* </Transition.View>
|
|
158
|
+
*
|
|
159
|
+
* @deprecated Use `Transition.Boundary` with `id` instead.
|
|
102
160
|
*/
|
|
103
161
|
sharedBoundTag?: string;
|
|
104
162
|
/**
|
|
@@ -108,6 +166,8 @@ export type TransitionAwareProps<T extends object> = AnimatedProps<T> & {
|
|
|
108
166
|
* Useful when layout can change while unfocused (for example, programmatic
|
|
109
167
|
* ScrollView/FlatList scrolling triggered from another screen).
|
|
110
168
|
*
|
|
169
|
+
* @deprecated Legacy `sharedBoundTag` refresh option. The boundary
|
|
170
|
+
* measurement pipeline refreshes layout through `Transition.Boundary`.
|
|
111
171
|
* @default false
|
|
112
172
|
*/
|
|
113
173
|
remeasureOnFocus?: boolean;
|
|
@@ -181,6 +241,8 @@ export type ScreenTransitionConfig = {
|
|
|
181
241
|
/**
|
|
182
242
|
* How much velocity affects snap point targeting. Lower values make snapping
|
|
183
243
|
* feel more deliberate (iOS-like), higher values make it more responsive to flicks.
|
|
244
|
+
*
|
|
245
|
+
* @deprecated Use `gestureSnapVelocityImpact` instead.
|
|
184
246
|
* @default 0.1
|
|
185
247
|
*/
|
|
186
248
|
snapVelocityImpact?: number;
|
|
@@ -353,13 +415,21 @@ export type ScreenTransitionConfig = {
|
|
|
353
415
|
/**
|
|
354
416
|
* Custom component to render as the backdrop layer (between screens).
|
|
355
417
|
*
|
|
356
|
-
*
|
|
357
|
-
*
|
|
418
|
+
* Direct component types are wrapped with `Animated.createAnimatedComponent`
|
|
419
|
+
* internally. Function components can receive `{ styles, props, pointerEvents }`
|
|
420
|
+
* and decide how to render the layer. Animated styles and props are driven by
|
|
421
|
+
* the `backdrop` slot in the interpolator return value.
|
|
358
422
|
*
|
|
359
423
|
* `backdropBehavior` still controls the wrapping Pressable for dismiss/collapse handling.
|
|
360
424
|
*
|
|
361
425
|
* @example
|
|
362
|
-
* backdropComponent:
|
|
426
|
+
* backdropComponent: ({ styles, props, pointerEvents }) => (
|
|
427
|
+
* <AnimatedBlurView
|
|
428
|
+
* style={styles}
|
|
429
|
+
* animatedProps={props}
|
|
430
|
+
* pointerEvents={pointerEvents}
|
|
431
|
+
* />
|
|
432
|
+
* ),
|
|
363
433
|
* screenStyleInterpolator: ({ progress }) => {
|
|
364
434
|
* "worklet";
|
|
365
435
|
* return {
|
|
@@ -372,7 +442,31 @@ export type ScreenTransitionConfig = {
|
|
|
372
442
|
*
|
|
373
443
|
* @default undefined
|
|
374
444
|
*/
|
|
375
|
-
backdropComponent?:
|
|
445
|
+
backdropComponent?: ScreenBackdropComponent;
|
|
446
|
+
/**
|
|
447
|
+
* Custom component to render as the screen's content layer.
|
|
448
|
+
*
|
|
449
|
+
* The component receives the `content` slot's animated styles and props. A
|
|
450
|
+
* direct component type is wrapped with `Animated.createAnimatedComponent`;
|
|
451
|
+
* a function component can receive `{ styles, props, pointerEvents, children }`
|
|
452
|
+
* and decide how to render the layer.
|
|
453
|
+
*
|
|
454
|
+
* `contentComponent` replaces `surfaceComponent` for custom screen shells.
|
|
455
|
+
*
|
|
456
|
+
* @example
|
|
457
|
+
* contentComponent: ({ styles, props, pointerEvents, children }) => (
|
|
458
|
+
* <AnimatedSquircleView
|
|
459
|
+
* style={styles}
|
|
460
|
+
* animatedProps={props}
|
|
461
|
+
* pointerEvents={pointerEvents}
|
|
462
|
+
* >
|
|
463
|
+
* {children}
|
|
464
|
+
* </AnimatedSquircleView>
|
|
465
|
+
* )
|
|
466
|
+
*
|
|
467
|
+
* @default undefined
|
|
468
|
+
*/
|
|
469
|
+
contentComponent?: ScreenContentComponent;
|
|
376
470
|
/**
|
|
377
471
|
* Custom component to render as the screen's surface layer.
|
|
378
472
|
*
|
|
@@ -395,6 +489,7 @@ export type ScreenTransitionConfig = {
|
|
|
395
489
|
* }
|
|
396
490
|
*
|
|
397
491
|
* @default undefined
|
|
492
|
+
* @deprecated Use `contentComponent` instead.
|
|
398
493
|
*/
|
|
399
494
|
surfaceComponent?: React.ComponentType<any>;
|
|
400
495
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/screen.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACX,uBAAuB,EACvB,cAAc,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACX,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,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;;OAuBG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;CAC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/utils/bounds/helpers/styles/compute.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compute.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/utils/bounds/helpers/styles/compute.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAG9E,OAAO,KAAK,EAEX,mBAAmB,EACnB,aAAa,EACb,MAAM,qBAAqB,CAAC;AA4G7B,eAAO,MAAM,kBAAkB,GAC9B,4EAQG,mBAAmB,EACtB,iBAAgB,aAAkC,EAClD,eAAe,sBAAsB,iBA6FrC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { StyleProps, TransformArrayItem } from "react-native-reanimated";
|
|
2
|
+
export declare const BOUNDS_LOCAL_TRANSFORM_STYLE_KEY = "__screenTransitionsBoundsLocalTransform";
|
|
3
|
+
export declare const attachBoundsLocalTransform: (slotStyle: StyleProps, localStyle: StyleProps | null | undefined) => StyleProps;
|
|
4
|
+
export declare const getBoundsLocalTransform: (style: StyleProps | undefined) => TransformArrayItem[] | undefined;
|
|
5
|
+
export declare const stripBoundsLocalTransform: (style: StyleProps) => StyleProps;
|
|
6
|
+
//# sourceMappingURL=local-transform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-transform.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/utils/bounds/helpers/styles/local-transform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE9E,eAAO,MAAM,gCAAgC,4CACH,CAAC;AA2B3C,eAAO,MAAM,0BAA0B,GACtC,WAAW,UAAU,EACrB,YAAY,UAAU,GAAG,IAAI,GAAG,SAAS,KACvC,UAkBF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GACnC,OAAO,UAAU,GAAG,SAAS,KAC3B,kBAAkB,EAAE,GAAG,SAOzB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,OAAO,UAAU,KAAG,UAqB7D,CAAC"}
|
|
@@ -192,6 +192,8 @@ export type BoundsOptions = {
|
|
|
192
192
|
motion?: BoundsMotion;
|
|
193
193
|
/**
|
|
194
194
|
* If true, the raw values will be returned instead of the computed values.
|
|
195
|
+
*
|
|
196
|
+
* @deprecated Use `bounds(id).math(options)` instead of passing `raw`.
|
|
195
197
|
* @default false
|
|
196
198
|
*/
|
|
197
199
|
raw?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/utils/bounds/types/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EACX,wBAAwB,EACxB,YAAY,EACZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtC,MAAM,MAAM,YAAY,GACrB,YAAY,GACZ,KAAK,GACL,aAAa,GACb,SAAS,GACT,QAAQ,GACR,UAAU,GACV,eAAe,GACf,QAAQ,GACR,gBAAgB,CAAC;AAEpB,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3D,KAAK,YAAY,GAAG,OAAO,GAAG,YAAY,GAAG,kBAAkB,CAAC;AAEhE,KAAK,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;AAE3C;;;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I,CAAC,aAAa,EAAE,OAAO,GAAG,IAAI,GAAG,KAAK,CAAC,CAAC;AAE/E,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE3C,MAAM,MAAM,gBAAgB,CAC3B,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,IAClD,mBAAmB,CAAC,CAAC,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -13,8 +13,14 @@ import type {
|
|
|
13
13
|
import type { ScreenTransitionConfig } from "../shared";
|
|
14
14
|
import type { OverlayProps } from "../shared/types/overlay.types";
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Component stack is deprecated. Use blank stack instead.
|
|
18
|
+
*/
|
|
16
19
|
export type ComponentStackNavigationEventMap = {};
|
|
17
20
|
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Component stack is deprecated. Use blank stack instead.
|
|
23
|
+
*/
|
|
18
24
|
export type ComponentStackNavigationProp<
|
|
19
25
|
ParamList extends ParamListBase,
|
|
20
26
|
RouteName extends keyof ParamList = string,
|
|
@@ -29,6 +35,9 @@ export type ComponentStackNavigationProp<
|
|
|
29
35
|
> &
|
|
30
36
|
StackActionHelpers<ParamList>;
|
|
31
37
|
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Component stack is deprecated. Use blank stack instead.
|
|
40
|
+
*/
|
|
32
41
|
export type ComponentStackScreenProps<
|
|
33
42
|
ParamList extends ParamListBase,
|
|
34
43
|
RouteName extends keyof ParamList = string,
|
|
@@ -38,6 +47,9 @@ export type ComponentStackScreenProps<
|
|
|
38
47
|
route: RouteProp<ParamList, RouteName>;
|
|
39
48
|
};
|
|
40
49
|
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Component stack is deprecated. Use blank stack instead.
|
|
52
|
+
*/
|
|
41
53
|
export type ComponentStackOptionsArgs<
|
|
42
54
|
ParamList extends ParamListBase,
|
|
43
55
|
RouteName extends keyof ParamList = keyof ParamList,
|
|
@@ -46,6 +58,9 @@ export type ComponentStackOptionsArgs<
|
|
|
46
58
|
theme: Theme;
|
|
47
59
|
};
|
|
48
60
|
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated Component stack is deprecated. Use blank stack instead.
|
|
63
|
+
*/
|
|
49
64
|
export type ComponentStackNavigationHelpers = NavigationHelpers<
|
|
50
65
|
ParamListBase,
|
|
51
66
|
ComponentStackNavigationEventMap
|
|
@@ -56,6 +71,8 @@ type ComponentStackNavigationConfig = {};
|
|
|
56
71
|
/**
|
|
57
72
|
* Props passed to overlay components in component-stack.
|
|
58
73
|
* Uses the shared OverlayProps type with component-stack's navigation type.
|
|
74
|
+
*
|
|
75
|
+
* @deprecated Component stack is deprecated. Use blank stack instead.
|
|
59
76
|
*/
|
|
60
77
|
export type ComponentStackOverlayProps = OverlayProps<
|
|
61
78
|
ComponentStackNavigationProp<ParamListBase>
|
|
@@ -70,9 +87,15 @@ type ComponentStackScreenTransitionConfig = ScreenTransitionConfig & {
|
|
|
70
87
|
detachPreviousScreen?: boolean;
|
|
71
88
|
};
|
|
72
89
|
|
|
90
|
+
/**
|
|
91
|
+
* @deprecated Component stack is deprecated. Use blank stack instead.
|
|
92
|
+
*/
|
|
73
93
|
export type ComponentStackNavigationOptions =
|
|
74
94
|
ComponentStackScreenTransitionConfig & {};
|
|
75
95
|
|
|
96
|
+
/**
|
|
97
|
+
* @deprecated Component stack is deprecated. Use blank stack instead.
|
|
98
|
+
*/
|
|
76
99
|
export type ComponentStackNavigatorProps = DefaultNavigatorOptions<
|
|
77
100
|
ParamListBase,
|
|
78
101
|
string | undefined,
|
|
@@ -84,6 +107,9 @@ export type ComponentStackNavigatorProps = DefaultNavigatorOptions<
|
|
|
84
107
|
StackRouterOptions &
|
|
85
108
|
ComponentStackNavigationConfig;
|
|
86
109
|
|
|
110
|
+
/**
|
|
111
|
+
* @deprecated Component stack is deprecated. Use blank stack instead.
|
|
112
|
+
*/
|
|
87
113
|
export type ComponentStackDescriptor = Descriptor<
|
|
88
114
|
ComponentStackNavigationOptions,
|
|
89
115
|
ComponentStackNavigationProp<ParamListBase>,
|
|
@@ -2,6 +2,10 @@ import type React from "react";
|
|
|
2
2
|
import { memo, useLayoutEffect, useMemo } from "react";
|
|
3
3
|
import type { View } from "react-native";
|
|
4
4
|
import Animated, { useAnimatedRef } from "react-native-reanimated";
|
|
5
|
+
import {
|
|
6
|
+
useComposedSlotStyles,
|
|
7
|
+
useSlotLayoutStyles,
|
|
8
|
+
} from "../../../providers/screen/styles";
|
|
5
9
|
import { prepareStyleForBounds } from "../../../utils/bounds/helpers/styles/styles";
|
|
6
10
|
import { logger } from "../../../utils/logger";
|
|
7
11
|
import { Portal } from "../portal/components/portal";
|
|
@@ -22,12 +26,20 @@ export const BoundaryTarget = memo(function BoundaryTarget(
|
|
|
22
26
|
const registerTargetRef = rootContext?.registerTargetRef;
|
|
23
27
|
const unregisterTargetRef = rootContext?.unregisterTargetRef;
|
|
24
28
|
const isActiveTarget = rootContext?.activeTargetRef === targetAnimatedRef;
|
|
29
|
+
const portalRuntime = rootContext?.portalRuntime;
|
|
30
|
+
const shouldApplyAssociatedStyleInline =
|
|
31
|
+
isActiveTarget && portalRuntime?.enabled !== true;
|
|
32
|
+
const shouldApplyPortalLayoutStyle =
|
|
33
|
+
isActiveTarget && portalRuntime?.enabled === true;
|
|
34
|
+
const associatedTargetStyles = useComposedSlotStyles(
|
|
35
|
+
rootContext?.boundTag.tag,
|
|
36
|
+
style,
|
|
37
|
+
);
|
|
38
|
+
const portalLayoutStyle = useSlotLayoutStyles(rootContext?.boundTag.tag);
|
|
25
39
|
const preparedStyles = useMemo(() => prepareStyleForBounds(style), [style]);
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
|
|
29
|
-
// the truthful measurement surface whenever a portal is configured.
|
|
30
|
-
const measurementRef = rootContext?.portal
|
|
40
|
+
// Teleported content can render outside its layout slot. The placeholder is
|
|
41
|
+
// the truthful measurement surface whenever runtime portal behavior is active.
|
|
42
|
+
const measurementRef = portalRuntime?.enabled
|
|
31
43
|
? placeholderAnimatedRef
|
|
32
44
|
: targetAnimatedRef;
|
|
33
45
|
|
|
@@ -54,7 +66,8 @@ export const BoundaryTarget = memo(function BoundaryTarget(
|
|
|
54
66
|
return (
|
|
55
67
|
<Portal
|
|
56
68
|
id={rootContext?.boundTag.tag}
|
|
57
|
-
|
|
69
|
+
handoff={portalRuntime?.handoff}
|
|
70
|
+
escapeClipping={portalRuntime?.escapeClipping}
|
|
58
71
|
placeholderRef={placeholderAnimatedRef}
|
|
59
72
|
>
|
|
60
73
|
<Animated.View
|
|
@@ -62,7 +75,8 @@ export const BoundaryTarget = memo(function BoundaryTarget(
|
|
|
62
75
|
ref={targetAnimatedRef}
|
|
63
76
|
style={[
|
|
64
77
|
style,
|
|
65
|
-
|
|
78
|
+
shouldApplyAssociatedStyleInline ? associatedTargetStyles : undefined,
|
|
79
|
+
shouldApplyPortalLayoutStyle ? portalLayoutStyle : undefined,
|
|
66
80
|
]}
|
|
67
81
|
collapsable={false}
|
|
68
82
|
/>
|
|
@@ -2,18 +2,22 @@ import {
|
|
|
2
2
|
type ComponentType,
|
|
3
3
|
forwardRef,
|
|
4
4
|
memo,
|
|
5
|
+
type ReactNode,
|
|
5
6
|
useImperativeHandle,
|
|
6
7
|
useMemo,
|
|
7
8
|
} from "react";
|
|
8
|
-
import
|
|
9
|
+
import type { View } from "react-native";
|
|
10
|
+
import Animated, { useAnimatedRef } from "react-native-reanimated";
|
|
9
11
|
import { useDescriptorsStore } from "../../providers/screen/descriptors";
|
|
10
12
|
import {
|
|
13
|
+
useComposedSlotStyles,
|
|
11
14
|
useSlotStackingStyles,
|
|
12
|
-
useSlotStyles,
|
|
13
15
|
} from "../../providers/screen/styles";
|
|
14
16
|
import { createBoundTag } from "../../stores/bounds/helpers/link-pairs.helpers";
|
|
15
17
|
import { useBoundaryMeasurement } from "./hooks/use-boundary-measurement";
|
|
16
|
-
import {
|
|
18
|
+
import { BoundaryLocalPortalHost } from "./portal/components/boundary-local-portal-host";
|
|
19
|
+
import { Portal } from "./portal/components/portal";
|
|
20
|
+
import { resolveBoundaryPortal } from "./portal/utils/resolve-portal";
|
|
17
21
|
import {
|
|
18
22
|
BoundaryRootProvider,
|
|
19
23
|
useBoundaryRootState,
|
|
@@ -22,14 +26,29 @@ import type { BoundaryComponentProps } from "./types";
|
|
|
22
26
|
|
|
23
27
|
interface CreateBoundaryComponentOptions {
|
|
24
28
|
alreadyAnimated?: boolean;
|
|
25
|
-
shouldAutoMeasure?: boolean;
|
|
26
29
|
}
|
|
27
30
|
|
|
31
|
+
const hasRenderableChildren = (children: ReactNode): boolean => {
|
|
32
|
+
if (
|
|
33
|
+
children === null ||
|
|
34
|
+
children === undefined ||
|
|
35
|
+
typeof children === "boolean"
|
|
36
|
+
) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (Array.isArray(children)) {
|
|
41
|
+
return children.some(hasRenderableChildren);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return true;
|
|
45
|
+
};
|
|
46
|
+
|
|
28
47
|
export function createBoundaryComponent<P extends object>(
|
|
29
48
|
Wrapped: ComponentType<P>,
|
|
30
49
|
options: CreateBoundaryComponentOptions = {},
|
|
31
50
|
) {
|
|
32
|
-
const { alreadyAnimated = false
|
|
51
|
+
const { alreadyAnimated = false } = options;
|
|
33
52
|
const AnimatedComponent = alreadyAnimated
|
|
34
53
|
? Wrapped
|
|
35
54
|
: Animated.createAnimatedComponent(Wrapped);
|
|
@@ -48,7 +67,9 @@ export function createBoundaryComponent<P extends object>(
|
|
|
48
67
|
method,
|
|
49
68
|
style,
|
|
50
69
|
onPress,
|
|
51
|
-
|
|
70
|
+
handoff,
|
|
71
|
+
escapeClipping,
|
|
72
|
+
children,
|
|
52
73
|
...rest
|
|
53
74
|
} = props as any;
|
|
54
75
|
|
|
@@ -56,7 +77,10 @@ export function createBoundaryComponent<P extends object>(
|
|
|
56
77
|
() => createBoundTag(String(id), group),
|
|
57
78
|
[id, group],
|
|
58
79
|
);
|
|
59
|
-
const
|
|
80
|
+
const portalRuntime = resolveBoundaryPortal({
|
|
81
|
+
handoff,
|
|
82
|
+
escapeClipping,
|
|
83
|
+
});
|
|
60
84
|
|
|
61
85
|
const currentScreenKey = useDescriptorsStore(
|
|
62
86
|
(s) => s.derivations.currentScreenKey,
|
|
@@ -68,9 +92,12 @@ export function createBoundaryComponent<P extends object>(
|
|
|
68
92
|
// Associated slot styles attach whenever the boundary is enabled,
|
|
69
93
|
// independent of whether an interpolator is configured for this transition.
|
|
70
94
|
const shouldAttachAssociatedStyles = enabled;
|
|
95
|
+
const canPortalRoot =
|
|
96
|
+
portalRuntime.enabled && hasRenderableChildren(children);
|
|
71
97
|
|
|
72
|
-
const associatedStyles =
|
|
98
|
+
const associatedStyles = useComposedSlotStyles(boundTag.tag, style);
|
|
73
99
|
const associatedStackingStyles = useSlotStackingStyles(boundTag.tag);
|
|
100
|
+
const rootPlaceholderRef = useAnimatedRef<View>();
|
|
74
101
|
|
|
75
102
|
const {
|
|
76
103
|
ref,
|
|
@@ -80,13 +107,11 @@ export function createBoundaryComponent<P extends object>(
|
|
|
80
107
|
targetPreparedStyles,
|
|
81
108
|
} = useBoundaryRootState({
|
|
82
109
|
boundTag,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
? associatedStyles
|
|
86
|
-
: undefined,
|
|
110
|
+
portalRuntime,
|
|
111
|
+
rootMeasurementRef: canPortalRoot ? rootPlaceholderRef : undefined,
|
|
87
112
|
});
|
|
88
113
|
|
|
89
|
-
|
|
114
|
+
useBoundaryMeasurement({
|
|
90
115
|
boundTag,
|
|
91
116
|
enabled,
|
|
92
117
|
runtimeEnabled,
|
|
@@ -94,40 +119,79 @@ export function createBoundaryComponent<P extends object>(
|
|
|
94
119
|
measuredRef,
|
|
95
120
|
style,
|
|
96
121
|
targetPreparedStyles,
|
|
97
|
-
|
|
98
|
-
|
|
122
|
+
handoff: portalRuntime.handoff,
|
|
123
|
+
escapeClipping: portalRuntime.escapeClipping,
|
|
99
124
|
config: { anchor, scaleMode, target, method },
|
|
100
|
-
onPress,
|
|
101
125
|
});
|
|
102
126
|
|
|
103
127
|
useImperativeHandle(forwardedRef, () => ref.current as any, [ref]);
|
|
104
128
|
|
|
129
|
+
const shouldPortalRoot = canPortalRoot && !hasActiveTarget;
|
|
105
130
|
// A nested active target takes the full associated style, so the root keeps
|
|
106
|
-
// only its stacking context
|
|
131
|
+
// only its stacking context. Without a nested target, a portal'd root is the
|
|
132
|
+
// target, so its associated style is applied through the portal host instead
|
|
133
|
+
// of inline on the teleported element.
|
|
134
|
+
// Host-only handoff receivers still need the associated style: their local
|
|
135
|
+
// portal host is absolute-filled inside this root, so the root is the visual
|
|
136
|
+
// frame that animates the received payload.
|
|
107
137
|
const attachedStyle = shouldAttachAssociatedStyles
|
|
108
138
|
? hasActiveTarget
|
|
109
139
|
? associatedStackingStyles
|
|
110
|
-
:
|
|
140
|
+
: shouldPortalRoot
|
|
141
|
+
? undefined
|
|
142
|
+
: associatedStyles
|
|
111
143
|
: undefined;
|
|
144
|
+
const pressProps = typeof onPress === "function" ? { onPress } : undefined;
|
|
145
|
+
|
|
146
|
+
const localPortalHost = (
|
|
147
|
+
<BoundaryLocalPortalHost
|
|
148
|
+
boundaryId={boundTag.tag}
|
|
149
|
+
enabled={enabled && portalRuntime.handoff}
|
|
150
|
+
screenKey={currentScreenKey}
|
|
151
|
+
/>
|
|
152
|
+
);
|
|
153
|
+
const canInjectLocalPortalHost = typeof children !== "function";
|
|
154
|
+
|
|
155
|
+
const renderBoundaryRoot = (extraChildren?: ReactNode) => (
|
|
156
|
+
<AnimatedComponent
|
|
157
|
+
{...rest}
|
|
158
|
+
{...pressProps}
|
|
159
|
+
ref={ref}
|
|
160
|
+
style={[style, attachedStyle]}
|
|
161
|
+
collapsable={false}
|
|
162
|
+
>
|
|
163
|
+
{children}
|
|
164
|
+
{canInjectLocalPortalHost ? extraChildren : null}
|
|
165
|
+
</AnimatedComponent>
|
|
166
|
+
);
|
|
167
|
+
const boundaryRoot = renderBoundaryRoot(
|
|
168
|
+
shouldPortalRoot ? undefined : localPortalHost,
|
|
169
|
+
);
|
|
112
170
|
|
|
113
171
|
return (
|
|
114
172
|
<BoundaryRootProvider value={contextValue}>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
173
|
+
{shouldPortalRoot ? (
|
|
174
|
+
<Portal
|
|
175
|
+
id={boundTag.tag}
|
|
176
|
+
handoff={portalRuntime.handoff}
|
|
177
|
+
escapeClipping={portalRuntime.escapeClipping}
|
|
178
|
+
placeholderRef={rootPlaceholderRef}
|
|
179
|
+
placeholderChildren={
|
|
180
|
+
portalRuntime.handoff ? localPortalHost : undefined
|
|
181
|
+
}
|
|
182
|
+
>
|
|
183
|
+
{boundaryRoot}
|
|
184
|
+
</Portal>
|
|
185
|
+
) : (
|
|
186
|
+
boundaryRoot
|
|
187
|
+
)}
|
|
122
188
|
</BoundaryRootProvider>
|
|
123
189
|
);
|
|
124
190
|
});
|
|
125
191
|
|
|
126
192
|
// The HOC's runtime identity (animated + memoized forwardRef) is not
|
|
127
193
|
// expressible against the public boundary props, so assert it here.
|
|
128
|
-
return memo(
|
|
129
|
-
Animated.createAnimatedComponent(Inner),
|
|
130
|
-
) as unknown as React.MemoExoticComponent<
|
|
194
|
+
return memo(Inner) as unknown as React.MemoExoticComponent<
|
|
131
195
|
React.ForwardRefExoticComponent<
|
|
132
196
|
BoundaryComponentProps<P> &
|
|
133
197
|
React.RefAttributes<React.ComponentRef<typeof Wrapped>>
|
|
@@ -3,17 +3,26 @@ import { runOnUI } from "react-native-reanimated";
|
|
|
3
3
|
import {
|
|
4
4
|
removeEntry,
|
|
5
5
|
setEntry,
|
|
6
|
-
} from "
|
|
7
|
-
import type { BoundTag } from "
|
|
8
|
-
import type { BoundaryConfigProps } from "
|
|
6
|
+
} from "../../../../stores/bounds/internals/entries";
|
|
7
|
+
import type { BoundTag } from "../../../../stores/bounds/types";
|
|
8
|
+
import type { BoundaryConfigProps } from "../../types";
|
|
9
9
|
|
|
10
10
|
export const useBoundaryPresence = (params: {
|
|
11
11
|
enabled: boolean;
|
|
12
12
|
boundTag: BoundTag;
|
|
13
13
|
currentScreenKey: string;
|
|
14
14
|
boundaryConfig?: BoundaryConfigProps;
|
|
15
|
+
handoff?: boolean;
|
|
16
|
+
escapeClipping?: boolean;
|
|
15
17
|
}) => {
|
|
16
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
enabled,
|
|
20
|
+
boundTag,
|
|
21
|
+
currentScreenKey,
|
|
22
|
+
boundaryConfig,
|
|
23
|
+
handoff,
|
|
24
|
+
escapeClipping,
|
|
25
|
+
} = params;
|
|
17
26
|
const { tag } = boundTag;
|
|
18
27
|
|
|
19
28
|
useLayoutEffect(() => {
|
|
@@ -21,10 +30,12 @@ export const useBoundaryPresence = (params: {
|
|
|
21
30
|
|
|
22
31
|
runOnUI(setEntry)(tag, currentScreenKey, {
|
|
23
32
|
boundaryConfig,
|
|
33
|
+
handoff: handoff ? true : null,
|
|
34
|
+
escapeClipping: escapeClipping ? true : null,
|
|
24
35
|
});
|
|
25
36
|
|
|
26
37
|
return () => {
|
|
27
38
|
runOnUI(removeEntry)(tag, currentScreenKey);
|
|
28
39
|
};
|
|
29
|
-
}, [enabled, tag, currentScreenKey, boundaryConfig]);
|
|
40
|
+
}, [enabled, tag, currentScreenKey, boundaryConfig, handoff, escapeClipping]);
|
|
30
41
|
};
|