react-native-screen-transitions 3.8.0 → 3.9.0-alpha.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/blank-stack/components/stack-view.js +2 -1
- package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/components/boundary-target.js +21 -8
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/create-boundary-component.js +10 -24
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js +115 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.js +4 -5
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.js +26 -22
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-refresh-boundary.js +10 -7
- package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/index.js +8 -1
- package/lib/commonjs/shared/components/boundary/index.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/host.js +99 -0
- package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js +68 -0
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/portal-provider.js +17 -0
- package/lib/commonjs/shared/components/boundary/portal/components/portal-provider.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js +195 -0
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js +74 -0
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/index.js +27 -0
- package/lib/commonjs/shared/components/boundary/portal/index.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/stores/host-bounds.store.js +47 -0
- package/lib/commonjs/shared/components/boundary/portal/stores/host-bounds.store.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js +137 -0
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js +60 -0
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js +40 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +15 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js +71 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +16 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/providers/boundary-owner.provider.js +26 -25
- package/lib/commonjs/shared/components/boundary/providers/boundary-owner.provider.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/types.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +25 -0
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/utils/measured-bounds.js +19 -9
- package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +105 -0
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js +48 -0
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +1 -0
- package/lib/commonjs/shared/components/create-transition-aware-component.js +8 -3
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/{integrations/masked-view.js → masked-view.js} +2 -2
- package/lib/commonjs/shared/components/masked-view.js.map +1 -0
- package/lib/commonjs/shared/components/screen-container/layers/content.js +9 -5
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/configs/presets.js +6 -6
- package/lib/commonjs/shared/configs/presets.js.map +1 -1
- package/lib/commonjs/shared/index.js +4 -4
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +4 -2
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js +7 -3
- package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +8 -1
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +21 -6
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/origin.provider.js +41 -0
- package/lib/commonjs/shared/providers/screen/origin.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/constants.js +2 -0
- package/lib/commonjs/shared/providers/screen/styles/constants.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js +58 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +7 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js +7 -5
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +1 -10
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +36 -19
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +6 -4
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/commonjs/shared/stores/scroll.store.js +54 -1
- package/lib/commonjs/shared/stores/scroll.store.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js +38 -4
- package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +40 -87
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +6 -67
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +8 -12
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/composers.js +235 -68
- package/lib/commonjs/shared/utils/bounds/helpers/styles/composers.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +74 -4
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +5 -9
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +5 -10
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/blank-stack/components/stack-view.js +3 -2
- package/lib/module/blank-stack/components/stack-view.js.map +1 -1
- package/lib/module/shared/components/{create-boundary-component → boundary}/components/boundary-target.js +21 -8
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -0
- package/lib/module/shared/components/{create-boundary-component → boundary}/create-boundary-component.js +11 -25
- package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js +110 -0
- package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +1 -0
- package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.js +4 -5
- package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +1 -0
- package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.js +27 -23
- package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -0
- package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-refresh-boundary.js +10 -7
- package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +1 -0
- package/lib/module/shared/components/{create-boundary-component → boundary}/index.js +8 -1
- package/lib/module/shared/components/boundary/index.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/host.js +94 -0
- package/lib/module/shared/components/boundary/portal/components/host.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js +63 -0
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/portal-provider.js +13 -0
- package/lib/module/shared/components/boundary/portal/components/portal-provider.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/portal.js +190 -0
- package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js +69 -0
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/index.js +6 -0
- package/lib/module/shared/components/boundary/portal/index.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/stores/host-bounds.store.js +40 -0
- package/lib/module/shared/components/boundary/portal/stores/host-bounds.store.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js +126 -0
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js +53 -0
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/attachment.js +35 -0
- package/lib/module/shared/components/boundary/portal/utils/attachment.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/naming.js +10 -0
- package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js +66 -0
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +11 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -0
- package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js +60 -0
- package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js.map +1 -0
- package/lib/module/shared/components/boundary/types.js.map +1 -0
- package/lib/module/shared/components/boundary/utils/destination-signals.js +20 -0
- package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -0
- package/lib/module/shared/components/{create-boundary-component → boundary}/utils/measured-bounds.js +16 -7
- package/lib/module/shared/components/boundary/utils/measured-bounds.js.map +1 -0
- package/lib/module/shared/components/boundary/utils/refresh-signals.js +100 -0
- package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -0
- package/lib/module/shared/components/boundary/utils/source-signals.js +43 -0
- package/lib/module/shared/components/boundary/utils/source-signals.js.map +1 -0
- package/lib/module/shared/components/create-transition-aware-component.js +8 -3
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/{integrations/masked-view.js → masked-view.js} +2 -2
- package/lib/module/shared/components/masked-view.js.map +1 -0
- package/lib/module/shared/components/screen-container/layers/content.js +10 -6
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/configs/presets.js +6 -6
- package/lib/module/shared/configs/presets.js.map +1 -1
- package/lib/module/shared/index.js +2 -2
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +4 -2
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js +8 -4
- package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +8 -1
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +20 -6
- package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -1
- package/lib/module/shared/providers/screen/origin.provider.js +33 -0
- package/lib/module/shared/providers/screen/origin.provider.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/constants.js +2 -0
- package/lib/module/shared/providers/screen/styles/constants.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js +53 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/styles.provider.js +7 -5
- package/lib/module/shared/providers/screen/styles/styles.provider.js.map +1 -1
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +1 -8
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/module/shared/stores/bounds/index.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +36 -19
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +6 -4
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/module/shared/stores/scroll.store.js +50 -0
- package/lib/module/shared/stores/scroll.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/types/bounds.types.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js +36 -3
- package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +42 -89
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +6 -67
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +8 -13
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/composers.js +236 -69
- package/lib/module/shared/utils/bounds/helpers/styles/composers.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js +74 -4
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js +5 -9
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +5 -10
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/typescript/blank-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-initial-destination-measurement.d.ts +1 -4
- package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.d.ts +0 -2
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.d.ts +4 -2
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts +10 -0
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/index.d.ts +8 -2
- package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/host.d.ts +7 -0
- package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts +9 -0
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts +4 -0
- package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +19 -0
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts +13 -0
- package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/index.d.ts +4 -0
- package/lib/typescript/shared/components/boundary/portal/index.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/stores/host-bounds.store.d.ts +9 -0
- package/lib/typescript/shared/components/boundary/portal/stores/host-bounds.store.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts +19 -0
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts +11 -0
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts +21 -0
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +3 -0
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts +37 -0
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +3 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/providers/boundary-owner.provider.d.ts +14 -6
- package/lib/typescript/shared/components/boundary/providers/boundary-owner.provider.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/types.d.ts +78 -0
- package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/utils/destination-signals.d.ts +2 -3
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/utils/refresh-signals.d.ts +4 -3
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/utils/source-signals.d.ts +1 -2
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/masked-view.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +19 -17
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +3 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +6 -1
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts +9 -3
- package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/origin.provider.d.ts +11 -0
- package/lib/typescript/shared/providers/screen/origin.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/constants.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.d.ts +3 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +1 -3
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/index.d.ts +1 -1
- package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts +2 -2
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +2 -2
- 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/internals/state.d.ts +4 -2
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +47 -12
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/stores/scroll.store.d.ts +12 -1
- package/lib/typescript/shared/stores/scroll.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +13 -2
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +10 -40
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +2 -2
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts +2 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts +7 -11
- package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts +0 -3
- package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +7 -3
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/composers.d.ts +3 -0
- package/lib/typescript/shared/utils/bounds/helpers/styles/composers.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/options.d.ts +93 -6
- package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/blank-stack/components/stack-view.tsx +4 -3
- package/src/shared/components/{create-boundary-component → boundary}/components/boundary-target.tsx +28 -11
- package/src/shared/components/{create-boundary-component → boundary}/create-boundary-component.tsx +20 -31
- package/src/shared/components/boundary/hooks/use-initial-destination-measurement.ts +156 -0
- package/src/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.ts +5 -14
- package/src/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.ts +42 -46
- package/src/shared/components/{create-boundary-component → boundary}/hooks/use-refresh-boundary.ts +16 -11
- package/src/shared/components/{create-boundary-component → boundary}/index.tsx +12 -0
- package/src/shared/components/boundary/portal/components/host.tsx +114 -0
- package/src/shared/components/boundary/portal/components/portal-boundary-host.tsx +90 -0
- package/src/shared/components/boundary/portal/components/portal-provider.tsx +10 -0
- package/src/shared/components/boundary/portal/components/portal.tsx +278 -0
- package/src/shared/components/boundary/portal/hooks/use-host-measurement.ts +102 -0
- package/src/shared/components/boundary/portal/index.ts +3 -0
- package/src/shared/components/boundary/portal/stores/host-bounds.store.ts +45 -0
- package/src/shared/components/boundary/portal/stores/host-registry.store.ts +182 -0
- package/src/shared/components/boundary/portal/stores/portal-boundary-host.store.ts +91 -0
- package/src/shared/components/boundary/portal/utils/attachment.ts +48 -0
- package/src/shared/components/boundary/portal/utils/naming.ts +10 -0
- package/src/shared/components/boundary/portal/utils/offset-style.ts +171 -0
- package/src/shared/components/boundary/portal/utils/teleport-control.ts +13 -0
- package/src/shared/components/{create-boundary-component → boundary}/providers/boundary-owner.provider.tsx +41 -33
- package/src/shared/components/boundary/types.ts +92 -0
- package/src/shared/components/boundary/utils/destination-signals.ts +31 -0
- package/src/shared/components/{create-boundary-component → boundary}/utils/measured-bounds.ts +34 -11
- package/src/shared/components/boundary/utils/refresh-signals.ts +175 -0
- package/src/shared/components/boundary/utils/source-signals.ts +63 -0
- package/src/shared/components/create-transition-aware-component.tsx +8 -3
- package/src/shared/components/{integrations/masked-view.tsx → masked-view.tsx} +2 -2
- package/src/shared/components/screen-container/layers/content.tsx +12 -7
- package/src/shared/configs/presets.ts +2 -6
- package/src/shared/index.ts +13 -5
- package/src/shared/providers/helpers/measured-bounds-writes.ts +11 -1
- package/src/shared/providers/screen/descriptors/descriptors.provider.tsx +7 -3
- package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +16 -0
- package/src/shared/providers/screen/descriptors/helpers/get-ancestor-keys.ts +31 -6
- package/src/shared/providers/screen/origin.provider.tsx +38 -0
- package/src/shared/providers/screen/styles/constants.ts +2 -0
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.ts +74 -0
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +1 -0
- package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +1 -0
- package/src/shared/providers/screen/styles/styles.provider.tsx +5 -3
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +1 -10
- package/src/shared/stores/bounds/index.ts +2 -4
- package/src/shared/stores/bounds/internals/entries.ts +4 -4
- package/src/shared/stores/bounds/internals/links.ts +52 -18
- package/src/shared/stores/bounds/internals/resolver.ts +5 -3
- package/src/shared/stores/bounds/internals/state.ts +5 -2
- package/src/shared/stores/bounds/types.ts +59 -15
- package/src/shared/stores/scroll.store.ts +68 -0
- package/src/shared/types/animation.types.ts +17 -2
- package/src/shared/types/bounds.types.ts +22 -60
- package/src/shared/types/index.ts +5 -0
- package/src/shared/utils/bounds/helpers/create-bound-tag.ts +46 -4
- package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +65 -116
- package/src/shared/utils/bounds/helpers/create-link-accessor.ts +10 -80
- package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +10 -13
- package/src/shared/utils/bounds/helpers/styles/composers.ts +269 -46
- package/src/shared/utils/bounds/helpers/styles/compute.ts +134 -2
- package/src/shared/utils/bounds/navigation/reveal/build.ts +5 -7
- package/src/shared/utils/bounds/navigation/zoom/build.ts +5 -8
- package/src/shared/utils/bounds/types/options.ts +105 -6
- package/lib/commonjs/shared/components/create-boundary-component/components/boundary-target.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +0 -99
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/providers/boundary-owner.provider.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/types.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js +0 -75
- package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/measured-bounds.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js +0 -103
- package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js +0 -52
- package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js.map +0 -1
- package/lib/commonjs/shared/components/integrations/masked-view.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js +0 -68
- package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/interpolate-link-style.js +0 -30
- package/lib/commonjs/shared/utils/bounds/helpers/styles/interpolate-link-style.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/components/boundary-target.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +0 -94
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/index.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/providers/boundary-owner.provider.js +0 -60
- package/lib/module/shared/components/create-boundary-component/providers/boundary-owner.provider.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/types.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js +0 -70
- package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/utils/measured-bounds.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js +0 -98
- package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/utils/source-signals.js +0 -47
- package/lib/module/shared/components/create-boundary-component/utils/source-signals.js.map +0 -1
- package/lib/module/shared/components/integrations/masked-view.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/create-interpolators.js +0 -63
- package/lib/module/shared/utils/bounds/helpers/create-interpolators.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/styles/interpolate-link-style.js +0 -26
- package/lib/module/shared/utils/bounds/helpers/styles/interpolate-link-style.js.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +0 -14
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/providers/boundary-owner.provider.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts +0 -37
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts +0 -8
- package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts.map +0 -1
- package/lib/typescript/shared/components/integrations/masked-view.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts +0 -14
- package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/interpolate-link-style.d.ts +0 -17
- package/lib/typescript/shared/utils/bounds/helpers/styles/interpolate-link-style.d.ts.map +0 -1
- package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +0 -130
- package/src/shared/components/create-boundary-component/types.ts +0 -48
- package/src/shared/components/create-boundary-component/utils/destination-signals.ts +0 -129
- package/src/shared/components/create-boundary-component/utils/refresh-signals.ts +0 -164
- package/src/shared/components/create-boundary-component/utils/source-signals.ts +0 -72
- package/src/shared/utils/bounds/helpers/create-interpolators.ts +0 -117
- package/src/shared/utils/bounds/helpers/styles/interpolate-link-style.ts +0 -43
- /package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.js +0 -0
- /package/lib/commonjs/shared/components/{create-boundary-component → boundary}/types.js +0 -0
- /package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.js +0 -0
- /package/lib/module/shared/components/{create-boundary-component → boundary}/types.js +0 -0
- /package/lib/typescript/shared/components/{create-boundary-component → boundary}/components/boundary-target.d.ts +0 -0
- /package/lib/typescript/shared/components/{create-boundary-component → boundary}/create-boundary-component.d.ts +0 -0
- /package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.d.ts +0 -0
- /package/lib/typescript/shared/components/{integrations/masked-view.d.ts → masked-view.d.ts} +0 -0
- /package/src/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.ts +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ResettableStyleStatesBySlot } from "./types";
|
|
2
|
+
|
|
3
|
+
const areRecordsEqual = (
|
|
4
|
+
left: Record<string, unknown> | undefined,
|
|
5
|
+
right: Record<string, unknown> | undefined,
|
|
6
|
+
) => {
|
|
7
|
+
"worklet";
|
|
8
|
+
if (left === right) {
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (!left || !right) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
for (const key in left) {
|
|
17
|
+
if (left[key] !== right[key]) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
for (const key in right) {
|
|
23
|
+
if (!(key in left)) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return true;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const areResettableStatesEqual = (
|
|
32
|
+
left: ResettableStyleStatesBySlot[string] | undefined,
|
|
33
|
+
right: ResettableStyleStatesBySlot[string] | undefined,
|
|
34
|
+
) => {
|
|
35
|
+
"worklet";
|
|
36
|
+
if (left === right) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (!left || !right) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
areRecordsEqual(left.styleKeys, right.styleKeys) &&
|
|
46
|
+
areRecordsEqual(left.styleResetValues, right.styleResetValues) &&
|
|
47
|
+
areRecordsEqual(left.propKeys, right.propKeys) &&
|
|
48
|
+
areRecordsEqual(left.propResetValues, right.propResetValues)
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const areResettableStatesBySlotEqual = (
|
|
53
|
+
left: ResettableStyleStatesBySlot,
|
|
54
|
+
right: ResettableStyleStatesBySlot,
|
|
55
|
+
) => {
|
|
56
|
+
"worklet";
|
|
57
|
+
if (left === right) {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
for (const slotId in left) {
|
|
62
|
+
if (!areResettableStatesEqual(left[slotId], right[slotId])) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
for (const slotId in right) {
|
|
68
|
+
if (!(slotId in left)) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return true;
|
|
74
|
+
};
|
|
@@ -11,6 +11,7 @@ import type {
|
|
|
11
11
|
ResettableStyleStatesBySlot,
|
|
12
12
|
} from "./types";
|
|
13
13
|
|
|
14
|
+
export { areResettableStatesBySlotEqual } from "./are-resettable-states-equal";
|
|
14
15
|
export type { LocalStyleLayers, ResettableStyleStatesBySlot } from "./types";
|
|
15
16
|
|
|
16
17
|
type ResolveSlotStylesContext = {
|
|
@@ -15,6 +15,7 @@ type Props = {
|
|
|
15
15
|
|
|
16
16
|
type ScreenStylesContextValue = {
|
|
17
17
|
stylesMap: SharedValue<NormalizedTransitionInterpolatedStyle>;
|
|
18
|
+
shouldBlockVisibility: SharedValue<boolean>;
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
export const {
|
|
@@ -28,17 +29,18 @@ export const {
|
|
|
28
29
|
|
|
29
30
|
const rawStylesMaps = useInterpolatedStylesMap();
|
|
30
31
|
|
|
32
|
+
const { animatedStyle, animatedProps, shouldBlockVisibility } =
|
|
33
|
+
useMaybeBlockVisibility(isFloatingOverlay);
|
|
34
|
+
|
|
31
35
|
const stylesMap = useResolvedStylesMap({
|
|
32
36
|
localStylesMaps: rawStylesMaps,
|
|
33
37
|
ancestorStylesMap: parentContext?.stylesMap,
|
|
34
38
|
});
|
|
35
39
|
|
|
36
|
-
const { animatedStyle, animatedProps } =
|
|
37
|
-
useMaybeBlockVisibility(isFloatingOverlay);
|
|
38
|
-
|
|
39
40
|
return {
|
|
40
41
|
value: {
|
|
41
42
|
stylesMap,
|
|
43
|
+
shouldBlockVisibility,
|
|
42
44
|
},
|
|
43
45
|
children: (
|
|
44
46
|
<FloatingOverlayLayer enabled={isFloatingOverlay}>
|
|
@@ -35,15 +35,6 @@ export const getSourceScreenKeyFromPairKey = (
|
|
|
35
35
|
return pairKey.slice(0, separatorIndex);
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
export const getDestinationScreenKeyFromPairKey = (
|
|
39
|
-
pairKey: ScreenPairKey,
|
|
40
|
-
): ScreenIdentifier["screenKey"] | "" => {
|
|
41
|
-
"worklet";
|
|
42
|
-
const separatorIndex = pairKey.indexOf(PAIR_SEPARATOR);
|
|
43
|
-
if (separatorIndex === -1) return "";
|
|
44
|
-
return pairKey.slice(separatorIndex + PAIR_SEPARATOR.length);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
38
|
export const isScreenPairKeyForScreen = (
|
|
48
39
|
pairKey: ScreenPairKey,
|
|
49
40
|
screenKey: ScreenIdentifier["screenKey"],
|
|
@@ -75,7 +66,7 @@ export const createGroupTag = (group: GroupKey, linkKey: LinkKey): string => {
|
|
|
75
66
|
return `${group}:${linkKey}`;
|
|
76
67
|
};
|
|
77
68
|
|
|
78
|
-
|
|
69
|
+
const ensurePairState = (
|
|
79
70
|
state: LinkPairsState,
|
|
80
71
|
pairKey: ScreenPairKey,
|
|
81
72
|
): LinkPairState => {
|
|
@@ -13,12 +13,10 @@ import { resolveTransitionPair } from "./internals/resolver";
|
|
|
13
13
|
import type { MeasuredEntry } from "./types";
|
|
14
14
|
|
|
15
15
|
export type {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
EntryPatch,
|
|
16
|
+
BoundsLink,
|
|
17
|
+
BoundsLinkStatus,
|
|
19
18
|
MeasuredEntry,
|
|
20
19
|
ResolvedTransitionPair,
|
|
21
|
-
ResolveTransitionContext,
|
|
22
20
|
} from "./types";
|
|
23
21
|
|
|
24
22
|
export type Snapshot = MeasuredEntry;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hasAnyKeys } from "../helpers/keys";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Entry, EntryPatch, ScreenKey, TagID } from "../types";
|
|
3
3
|
import { type BoundaryEntriesState, boundaryRegistry } from "./state";
|
|
4
4
|
|
|
5
5
|
const ensureBoundaryState = (state: BoundaryEntriesState, tag: TagID) => {
|
|
@@ -16,7 +16,7 @@ const ensureScreenEntry = (
|
|
|
16
16
|
state: BoundaryEntriesState,
|
|
17
17
|
tag: TagID,
|
|
18
18
|
screenKey: ScreenKey,
|
|
19
|
-
):
|
|
19
|
+
): Entry => {
|
|
20
20
|
"worklet";
|
|
21
21
|
const tagState = ensureBoundaryState(state, tag);
|
|
22
22
|
if (!tagState.screens[screenKey]) {
|
|
@@ -28,7 +28,7 @@ const ensureScreenEntry = (
|
|
|
28
28
|
return tagState.screens[screenKey];
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
const applyEntryPatch = (entry:
|
|
31
|
+
const applyEntryPatch = (entry: Entry, patch: EntryPatch) => {
|
|
32
32
|
"worklet";
|
|
33
33
|
if (patch.bounds !== undefined) {
|
|
34
34
|
entry.bounds = patch.bounds;
|
|
@@ -49,7 +49,7 @@ const applyEntryPatch = (entry: ScreenEntry, patch: EntryPatch) => {
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
function getEntry(tag: TagID, key: ScreenKey):
|
|
52
|
+
function getEntry(tag: TagID, key: ScreenKey): Entry | null {
|
|
53
53
|
"worklet";
|
|
54
54
|
return boundaryRegistry.get()[tag]?.screens[key] ?? null;
|
|
55
55
|
}
|
|
@@ -14,19 +14,26 @@ import {
|
|
|
14
14
|
removePairLink,
|
|
15
15
|
} from "../helpers/link-pairs.helpers";
|
|
16
16
|
import type {
|
|
17
|
+
BoundsPortalAttachTarget,
|
|
17
18
|
GroupKey,
|
|
18
19
|
LinkKey,
|
|
19
20
|
LinkPairsState,
|
|
20
21
|
ScreenKey,
|
|
21
22
|
ScreenPairKey,
|
|
23
|
+
SourceHostRef,
|
|
24
|
+
SourceTagLinkSide,
|
|
22
25
|
TagID,
|
|
23
26
|
TagLink,
|
|
24
27
|
} from "../types";
|
|
25
28
|
import { pairs } from "./state";
|
|
26
29
|
|
|
27
|
-
const
|
|
30
|
+
const syncLinkStatus = (link: TagLink) => {
|
|
28
31
|
"worklet";
|
|
29
|
-
|
|
32
|
+
link.status = link.source
|
|
33
|
+
? link.destination
|
|
34
|
+
? "complete"
|
|
35
|
+
: "destination-incomplete"
|
|
36
|
+
: "source-incomplete";
|
|
30
37
|
};
|
|
31
38
|
|
|
32
39
|
const createLinkSide = (
|
|
@@ -78,14 +85,23 @@ const writeDestination = (
|
|
|
78
85
|
group?: GroupKey,
|
|
79
86
|
) => {
|
|
80
87
|
"worklet";
|
|
81
|
-
const
|
|
82
|
-
if (!link) return;
|
|
88
|
+
const existingLink = getPairLink(state, pairKey, linkKey);
|
|
83
89
|
|
|
84
90
|
const destination = createLinkSide(screenKey, bounds, styles);
|
|
91
|
+
const link =
|
|
92
|
+
existingLink ??
|
|
93
|
+
({
|
|
94
|
+
group,
|
|
95
|
+
status: "source-incomplete",
|
|
96
|
+
source: null,
|
|
97
|
+
destination,
|
|
98
|
+
initialDestination: destination,
|
|
99
|
+
} satisfies TagLink);
|
|
85
100
|
|
|
86
101
|
link.group = group ?? link.group;
|
|
87
102
|
link.destination = destination;
|
|
88
103
|
link.initialDestination ??= destination;
|
|
104
|
+
syncLinkStatus(link);
|
|
89
105
|
|
|
90
106
|
writePairLink(state, pairKey, linkKey, link);
|
|
91
107
|
|
|
@@ -136,20 +152,31 @@ function setSource(
|
|
|
136
152
|
bounds: MeasuredDimensions,
|
|
137
153
|
styles: StyleProps = {},
|
|
138
154
|
group?: GroupKey,
|
|
155
|
+
portalAttachTarget?: BoundsPortalAttachTarget,
|
|
156
|
+
sourceHost?: SourceHostRef,
|
|
139
157
|
) {
|
|
140
158
|
"worklet";
|
|
141
159
|
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
142
160
|
"worklet";
|
|
143
|
-
const linkKey =
|
|
144
|
-
const source = createLinkSide(screenKey, bounds, styles);
|
|
161
|
+
const linkKey = getLinkKeyFromTag(tag);
|
|
145
162
|
|
|
146
163
|
const pairLinks = ensurePairLinks(state, pairKey);
|
|
147
164
|
|
|
148
165
|
const existingLink = pairLinks[linkKey];
|
|
166
|
+
|
|
167
|
+
// Refresh paths may re-measure the source without portal context;
|
|
168
|
+
// keep the previously recorded host in that case.
|
|
169
|
+
const source: SourceTagLinkSide = {
|
|
170
|
+
...createLinkSide(screenKey, bounds, styles),
|
|
171
|
+
portalAttachTarget:
|
|
172
|
+
portalAttachTarget ?? existingLink?.source?.portalAttachTarget,
|
|
173
|
+
sourceHost: sourceHost ?? existingLink?.source?.sourceHost,
|
|
174
|
+
};
|
|
149
175
|
const link =
|
|
150
176
|
existingLink ??
|
|
151
177
|
({
|
|
152
178
|
group,
|
|
179
|
+
status: "destination-incomplete",
|
|
153
180
|
source,
|
|
154
181
|
destination: null,
|
|
155
182
|
initialSource: source,
|
|
@@ -158,6 +185,7 @@ function setSource(
|
|
|
158
185
|
link.group = group ?? link.group;
|
|
159
186
|
link.source = source;
|
|
160
187
|
link.initialSource ??= source;
|
|
188
|
+
syncLinkStatus(link);
|
|
161
189
|
|
|
162
190
|
pairLinks[linkKey] = link;
|
|
163
191
|
|
|
@@ -181,7 +209,7 @@ function setDestination(
|
|
|
181
209
|
"worklet";
|
|
182
210
|
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
183
211
|
"worklet";
|
|
184
|
-
const linkKey =
|
|
212
|
+
const linkKey = getLinkKeyFromTag(tag);
|
|
185
213
|
promotePendingSource(state, pairKey, linkKey);
|
|
186
214
|
writeDestination(state, pairKey, linkKey, screenKey, bounds, styles, group);
|
|
187
215
|
|
|
@@ -193,7 +221,7 @@ function setActiveGroupId(pairKey: ScreenPairKey, group: GroupKey, tag: TagID) {
|
|
|
193
221
|
"worklet";
|
|
194
222
|
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
195
223
|
"worklet";
|
|
196
|
-
writeGroup(state, pairKey, group,
|
|
224
|
+
writeGroup(state, pairKey, group, getLinkKeyFromTag(tag));
|
|
197
225
|
return state;
|
|
198
226
|
});
|
|
199
227
|
}
|
|
@@ -208,12 +236,14 @@ function getActiveGroupId(
|
|
|
208
236
|
|
|
209
237
|
function getLink(pairKey: ScreenPairKey, tag: TagID): TagLink | null {
|
|
210
238
|
"worklet";
|
|
211
|
-
return getPairLink(pairs.get(), pairKey,
|
|
239
|
+
return getPairLink(pairs.get(), pairKey, getLinkKeyFromTag(tag));
|
|
212
240
|
}
|
|
213
241
|
|
|
214
|
-
const
|
|
242
|
+
const hasSourceLink = (
|
|
243
|
+
link: TagLink | null,
|
|
244
|
+
): link is TagLink & { source: NonNullable<TagLink["source"]> } => {
|
|
215
245
|
"worklet";
|
|
216
|
-
return !!link?.
|
|
246
|
+
return !!link?.source;
|
|
217
247
|
};
|
|
218
248
|
|
|
219
249
|
const getPendingSourceLink = (
|
|
@@ -236,7 +266,7 @@ function getResolvedLink(
|
|
|
236
266
|
): { tag: TagID; link: TagLink | null } {
|
|
237
267
|
"worklet";
|
|
238
268
|
const state = pairs.get();
|
|
239
|
-
const linkKey =
|
|
269
|
+
const linkKey = getLinkKeyFromTag(tag);
|
|
240
270
|
const group = getGroupKeyFromTag(tag);
|
|
241
271
|
const requestedLink = getPairLink(state, pairKey, linkKey);
|
|
242
272
|
|
|
@@ -251,8 +281,9 @@ function getResolvedLink(
|
|
|
251
281
|
const link = requestedLink ?? fallbackPendingLink;
|
|
252
282
|
|
|
253
283
|
// Group active ids can update before the new member has a full source/destination
|
|
254
|
-
// link
|
|
255
|
-
|
|
284
|
+
// link. As soon as the requested member has source bounds, prefer it; only
|
|
285
|
+
// fall back while the requested member has no source yet.
|
|
286
|
+
if (!group || hasSourceLink(link)) {
|
|
256
287
|
return {
|
|
257
288
|
tag,
|
|
258
289
|
link,
|
|
@@ -261,8 +292,11 @@ function getResolvedLink(
|
|
|
261
292
|
|
|
262
293
|
const initialId = state[pairKey]?.groups?.[group]?.initialId;
|
|
263
294
|
if (initialId) {
|
|
264
|
-
const initialLink =
|
|
265
|
-
|
|
295
|
+
const initialLink =
|
|
296
|
+
getPairLink(state, pairKey, initialId) ??
|
|
297
|
+
getPendingSourceLink(state, pairKey, initialId);
|
|
298
|
+
|
|
299
|
+
if (hasSourceLink(initialLink)) {
|
|
266
300
|
return {
|
|
267
301
|
tag: createGroupTag(group, initialId),
|
|
268
302
|
link: initialLink,
|
|
@@ -281,7 +315,7 @@ function getSource(
|
|
|
281
315
|
tag: TagID,
|
|
282
316
|
): TagLink["source"] | null {
|
|
283
317
|
"worklet";
|
|
284
|
-
return getPairSource(pairs.get(), pairKey,
|
|
318
|
+
return getPairSource(pairs.get(), pairKey, getLinkKeyFromTag(tag));
|
|
285
319
|
}
|
|
286
320
|
|
|
287
321
|
function getDestination(
|
|
@@ -289,7 +323,7 @@ function getDestination(
|
|
|
289
323
|
tag: TagID,
|
|
290
324
|
): TagLink["destination"] | null {
|
|
291
325
|
"worklet";
|
|
292
|
-
return getPairDestination(pairs.get(), pairKey,
|
|
326
|
+
return getPairDestination(pairs.get(), pairKey, getLinkKeyFromTag(tag));
|
|
293
327
|
}
|
|
294
328
|
|
|
295
329
|
export {
|
|
@@ -33,12 +33,14 @@ function resolveTransitionPair(
|
|
|
33
33
|
const matchedLink = pairKey ? getResolvedLink(pairKey, tag).link : null;
|
|
34
34
|
|
|
35
35
|
return {
|
|
36
|
-
sourceBounds: matchedLink?.source
|
|
36
|
+
sourceBounds: matchedLink?.source?.bounds ?? null,
|
|
37
37
|
destinationBounds: matchedLink?.destination?.bounds ?? null,
|
|
38
|
-
sourceStyles: matchedLink?.source
|
|
38
|
+
sourceStyles: matchedLink?.source?.styles ?? null,
|
|
39
39
|
destinationStyles: matchedLink?.destination?.styles ?? null,
|
|
40
|
-
sourceScreenKey: matchedLink?.source
|
|
40
|
+
sourceScreenKey: matchedLink?.source?.screenKey ?? null,
|
|
41
41
|
destinationScreenKey: matchedLink?.destination?.screenKey ?? null,
|
|
42
|
+
sourcePortalAttachTarget: matchedLink?.source?.portalAttachTarget,
|
|
43
|
+
sourceHost: matchedLink?.source?.sourceHost,
|
|
42
44
|
};
|
|
43
45
|
}
|
|
44
46
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { makeMutable } from "react-native-reanimated";
|
|
2
|
-
import type { LinkPairsState,
|
|
2
|
+
import type { Entry, LinkPairsState, ScreenKey, TagID } from "../types";
|
|
3
3
|
|
|
4
|
-
export type BoundaryEntriesState = Record<
|
|
4
|
+
export type BoundaryEntriesState = Record<
|
|
5
|
+
TagID,
|
|
6
|
+
{ screens: Record<ScreenKey, Entry> }
|
|
7
|
+
>;
|
|
5
8
|
|
|
6
9
|
export const boundaryRegistry = makeMutable<BoundaryEntriesState>({});
|
|
7
10
|
|
|
@@ -10,9 +10,10 @@ export type TagID = string;
|
|
|
10
10
|
export type LinkKey = string;
|
|
11
11
|
export type GroupKey = string;
|
|
12
12
|
export type ScreenPairKey = string;
|
|
13
|
+
export type BoundsPortalAttachTarget = "current-screen" | "matched-screen";
|
|
13
14
|
export type { ScreenKey } from "../../types/screen.types";
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
type BoundaryConfig = {
|
|
16
17
|
anchor?: BoundsAnchor;
|
|
17
18
|
scaleMode?: BoundsScaleMode;
|
|
18
19
|
target?: "bound" | "fullscreen" | MeasuredDimensions;
|
|
@@ -39,15 +40,64 @@ export type ScreenIdentifier = {
|
|
|
39
40
|
screenKey: ScreenKey;
|
|
40
41
|
};
|
|
41
42
|
|
|
42
|
-
export type
|
|
43
|
+
export type BoundsLinkStatus =
|
|
44
|
+
| "source-incomplete"
|
|
45
|
+
| "destination-incomplete"
|
|
46
|
+
| "complete";
|
|
47
|
+
|
|
48
|
+
export type TagLinkSide = ScreenIdentifier & MeasuredEntry;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The source screen's active portal host at measure time. Recorded only when
|
|
52
|
+
* that host captures scroll (a Transition.ScrollView scope) — matched-screen
|
|
53
|
+
* placement uses it as a coordinate space to express the source rect in the
|
|
54
|
+
* source ScrollView's live frame. The portal never attaches here.
|
|
55
|
+
*/
|
|
56
|
+
export type SourceHostRef = {
|
|
57
|
+
hostKey: string;
|
|
58
|
+
capturesScroll: boolean;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export type SourceTagLinkSide = TagLinkSide & {
|
|
62
|
+
/** Where this boundary's portal content renders during the transition. */
|
|
63
|
+
portalAttachTarget?: BoundsPortalAttachTarget;
|
|
64
|
+
/** Scroll-scoped host the source originated from, if any. */
|
|
65
|
+
sourceHost?: SourceHostRef;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
type TagLinkBase = {
|
|
43
69
|
group?: GroupKey;
|
|
44
|
-
source: ScreenIdentifier & MeasuredEntry;
|
|
45
|
-
/** Destination side once attached; null while the source is still pending. */
|
|
46
|
-
destination: (ScreenIdentifier & MeasuredEntry) | null;
|
|
47
70
|
/** First captured source side exposed for public link inspection. */
|
|
48
|
-
initialSource?:
|
|
71
|
+
initialSource?: TagLinkSide;
|
|
49
72
|
/** First attached destination side, used to compensate reveal closes after destination refreshes. */
|
|
50
|
-
initialDestination?:
|
|
73
|
+
initialDestination?: TagLinkSide;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export type TagLink =
|
|
77
|
+
| (TagLinkBase & {
|
|
78
|
+
status: "source-incomplete";
|
|
79
|
+
/** Source side once attached; null while destination captured first. */
|
|
80
|
+
source: null;
|
|
81
|
+
/** Destination side once attached; null while the source is still pending. */
|
|
82
|
+
destination: TagLinkSide | null;
|
|
83
|
+
})
|
|
84
|
+
| (TagLinkBase & {
|
|
85
|
+
status: "destination-incomplete";
|
|
86
|
+
/** Source side once attached; null while destination captured first. */
|
|
87
|
+
source: SourceTagLinkSide;
|
|
88
|
+
/** Destination side once attached; null while the source is still pending. */
|
|
89
|
+
destination: null;
|
|
90
|
+
})
|
|
91
|
+
| (TagLinkBase & {
|
|
92
|
+
status: "complete";
|
|
93
|
+
/** Source side once attached; null while destination captured first. */
|
|
94
|
+
source: SourceTagLinkSide;
|
|
95
|
+
/** Destination side once attached; null while the source is still pending. */
|
|
96
|
+
destination: TagLinkSide;
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export type BoundsLink = TagLink & {
|
|
100
|
+
id: TagID;
|
|
51
101
|
};
|
|
52
102
|
|
|
53
103
|
export type ResolveTransitionContext = {
|
|
@@ -64,12 +114,8 @@ export type ResolvedTransitionPair = {
|
|
|
64
114
|
destinationStyles: StyleProps | null;
|
|
65
115
|
sourceScreenKey: ScreenKey | null;
|
|
66
116
|
destinationScreenKey: ScreenKey | null;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
export type ScreenEntry = Entry;
|
|
70
|
-
|
|
71
|
-
export type BoundaryState = {
|
|
72
|
-
screens: Record<ScreenKey, ScreenEntry>;
|
|
117
|
+
sourcePortalAttachTarget?: BoundsPortalAttachTarget;
|
|
118
|
+
sourceHost?: SourceHostRef;
|
|
73
119
|
};
|
|
74
120
|
|
|
75
121
|
export type LinkGroupState = {
|
|
@@ -83,5 +129,3 @@ export type LinkPairState = {
|
|
|
83
129
|
};
|
|
84
130
|
|
|
85
131
|
export type LinkPairsState = Record<ScreenPairKey, LinkPairState>;
|
|
86
|
-
|
|
87
|
-
export type TagState = BoundaryState;
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
} from "react-native-reanimated";
|
|
6
6
|
import type {
|
|
7
7
|
ScrollGestureAxis,
|
|
8
|
+
ScrollGestureAxisState,
|
|
8
9
|
ScrollGestureState,
|
|
9
10
|
ScrollMetadataState,
|
|
10
11
|
} from "../types/gesture.types";
|
|
@@ -69,6 +70,73 @@ const clearMetadataWriters = (routeKey: ScreenKey) => {
|
|
|
69
70
|
delete metadataWriters[routeKey];
|
|
70
71
|
};
|
|
71
72
|
|
|
73
|
+
export const cloneScrollMetadataState = (
|
|
74
|
+
scroll: ScrollMetadataState | null | undefined,
|
|
75
|
+
): ScrollMetadataState | null => {
|
|
76
|
+
"worklet";
|
|
77
|
+
|
|
78
|
+
if (!scroll) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
vertical: scroll.vertical
|
|
84
|
+
? {
|
|
85
|
+
offset: scroll.vertical.offset,
|
|
86
|
+
contentSize: scroll.vertical.contentSize,
|
|
87
|
+
layoutSize: scroll.vertical.layoutSize,
|
|
88
|
+
isTouched: scroll.vertical.isTouched,
|
|
89
|
+
}
|
|
90
|
+
: null,
|
|
91
|
+
horizontal: scroll.horizontal
|
|
92
|
+
? {
|
|
93
|
+
offset: scroll.horizontal.offset,
|
|
94
|
+
contentSize: scroll.horizontal.contentSize,
|
|
95
|
+
layoutSize: scroll.horizontal.layoutSize,
|
|
96
|
+
isTouched: scroll.horizontal.isTouched,
|
|
97
|
+
}
|
|
98
|
+
: null,
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Offset clamped to the axis layout range, so iOS rubber-band overscroll never
|
|
104
|
+
* leaks into coordinate-space deltas. Returns null when the axis is untracked.
|
|
105
|
+
*/
|
|
106
|
+
export const clampScrollAxisOffset = (
|
|
107
|
+
axisState: ScrollGestureAxisState | null | undefined,
|
|
108
|
+
): number | null => {
|
|
109
|
+
"worklet";
|
|
110
|
+
|
|
111
|
+
if (!axisState) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const maxOffset = Math.max(0, axisState.contentSize - axisState.layoutSize);
|
|
116
|
+
return Math.min(Math.max(axisState.offset, 0), maxOffset);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Clamped scroll travel between a captured snapshot and the current state on
|
|
121
|
+
* one axis. Returns 0 when either side does not track the axis.
|
|
122
|
+
*/
|
|
123
|
+
export const getClampedScrollAxisDelta = (
|
|
124
|
+
current: ScrollMetadataState | null | undefined,
|
|
125
|
+
captured: ScrollMetadataState | null | undefined,
|
|
126
|
+
axis: ScrollGestureAxis,
|
|
127
|
+
): number => {
|
|
128
|
+
"worklet";
|
|
129
|
+
|
|
130
|
+
const currentOffset = clampScrollAxisOffset(current?.[axis]);
|
|
131
|
+
const capturedOffset = clampScrollAxisOffset(captured?.[axis]);
|
|
132
|
+
|
|
133
|
+
if (currentOffset === null || capturedOffset === null) {
|
|
134
|
+
return 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return currentOffset - capturedOffset;
|
|
138
|
+
};
|
|
139
|
+
|
|
72
140
|
/**
|
|
73
141
|
* Route-keyed scroll geometry used by gesture activation and bounds measurement.
|
|
74
142
|
* Coordination tracks gesture-owner scoped ScrollView offsets and dimensions;
|
|
@@ -292,11 +292,26 @@ export type ScreenStyleInterpolator = (
|
|
|
292
292
|
*/
|
|
293
293
|
export type AnimatedViewStyle = ViewStyle & TextStyle;
|
|
294
294
|
|
|
295
|
+
export type BoundaryTeleportControl =
|
|
296
|
+
| boolean
|
|
297
|
+
| {
|
|
298
|
+
enabled?: boolean;
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
export type TransitionSlotProps = Record<string, unknown> & {
|
|
302
|
+
/**
|
|
303
|
+
* Controls whether a portal-enabled boundary should attach for the current
|
|
304
|
+
* interpolator frame. `false` detaches the portal while keeping hostName
|
|
305
|
+
* ownership internal.
|
|
306
|
+
*/
|
|
307
|
+
teleport?: BoundaryTeleportControl;
|
|
308
|
+
};
|
|
309
|
+
|
|
295
310
|
type TransitionSlotDefinition = {
|
|
296
311
|
/** Animated styles applied via `useAnimatedStyle`. */
|
|
297
312
|
style?: AnimatedViewStyle;
|
|
298
313
|
/** Animated props applied via `useAnimatedProps`. */
|
|
299
|
-
props?:
|
|
314
|
+
props?: TransitionSlotProps;
|
|
300
315
|
};
|
|
301
316
|
|
|
302
317
|
/**
|
|
@@ -330,7 +345,7 @@ export type TransitionInterpolatorOptions = Omit<
|
|
|
330
345
|
*/
|
|
331
346
|
export type NormalizedTransitionSlotStyle = {
|
|
332
347
|
style?: StyleProps;
|
|
333
|
-
props?:
|
|
348
|
+
props?: TransitionSlotProps;
|
|
334
349
|
};
|
|
335
350
|
|
|
336
351
|
/**
|