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
|
@@ -1,15 +1,21 @@
|
|
|
1
|
+
import type { TransformsStyle } from "react-native";
|
|
1
2
|
import {
|
|
2
3
|
Extrapolation,
|
|
3
4
|
interpolate,
|
|
4
5
|
type MeasuredDimensions,
|
|
5
6
|
type StyleProps,
|
|
6
7
|
} from "react-native-reanimated";
|
|
7
|
-
import {
|
|
8
|
+
import { EPSILON } from "../../../../constants";
|
|
9
|
+
import type { BoundsInterpolationProps } from "../../../../types/bounds.types";
|
|
8
10
|
import type {
|
|
9
11
|
ContentTransformGeometry,
|
|
10
12
|
RelativeGeometry,
|
|
11
13
|
} from "../../types/geometry";
|
|
12
|
-
import type {
|
|
14
|
+
import type {
|
|
15
|
+
BoundsAnchor,
|
|
16
|
+
BoundsMotionTransform,
|
|
17
|
+
BoundsOptions,
|
|
18
|
+
} from "../../types/options";
|
|
13
19
|
|
|
14
20
|
/**
|
|
15
21
|
* Element-level (relative) params shared by size/transform composers.
|
|
@@ -24,6 +30,7 @@ export type ElementComposeParams = {
|
|
|
24
30
|
progress: number;
|
|
25
31
|
ranges: readonly [number, number];
|
|
26
32
|
computeOptions: BoundsOptions;
|
|
33
|
+
interpolationProps: BoundsInterpolationProps;
|
|
27
34
|
};
|
|
28
35
|
|
|
29
36
|
/**
|
|
@@ -40,6 +47,7 @@ type ContentComposeParams = {
|
|
|
40
47
|
progress: number;
|
|
41
48
|
ranges: readonly [number, number];
|
|
42
49
|
computeOptions: BoundsOptions;
|
|
50
|
+
interpolationProps: BoundsInterpolationProps;
|
|
43
51
|
};
|
|
44
52
|
|
|
45
53
|
const getAnchorPoint = (
|
|
@@ -105,6 +113,124 @@ const getAnchorOffset = ({
|
|
|
105
113
|
}
|
|
106
114
|
};
|
|
107
115
|
|
|
116
|
+
const clampUnit = (value: number) => {
|
|
117
|
+
"worklet";
|
|
118
|
+
return Math.min(1, Math.max(0, value));
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const normalizeRangeProgress = (
|
|
122
|
+
progress: number,
|
|
123
|
+
ranges: readonly [number, number],
|
|
124
|
+
) => {
|
|
125
|
+
"worklet";
|
|
126
|
+
const distance = ranges[1] - ranges[0];
|
|
127
|
+
|
|
128
|
+
if (Math.abs(distance) <= EPSILON) {
|
|
129
|
+
return 1;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return clampUnit((progress - ranges[0]) / distance);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const getUniformScale = (scaleX: number, scaleY: number) => {
|
|
136
|
+
"worklet";
|
|
137
|
+
if (Math.abs(scaleX - scaleY) <= EPSILON) {
|
|
138
|
+
return scaleX;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return Math.sqrt(Math.abs(scaleX * scaleY));
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
const getScaleRatio = (resolvedScale: number, currentScale: number) => {
|
|
145
|
+
"worklet";
|
|
146
|
+
const safeCurrentScale = Math.abs(currentScale) > EPSILON ? currentScale : 1;
|
|
147
|
+
|
|
148
|
+
return resolvedScale / safeCurrentScale;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const resolveMotionTransform = ({
|
|
152
|
+
computeOptions,
|
|
153
|
+
interpolationProps,
|
|
154
|
+
progress,
|
|
155
|
+
ranges,
|
|
156
|
+
start,
|
|
157
|
+
end,
|
|
158
|
+
current,
|
|
159
|
+
}: {
|
|
160
|
+
computeOptions: BoundsOptions;
|
|
161
|
+
interpolationProps: BoundsInterpolationProps;
|
|
162
|
+
progress: number;
|
|
163
|
+
ranges: readonly [number, number];
|
|
164
|
+
start: MeasuredDimensions;
|
|
165
|
+
end: MeasuredDimensions;
|
|
166
|
+
current: BoundsMotionTransform;
|
|
167
|
+
}) => {
|
|
168
|
+
"worklet";
|
|
169
|
+
|
|
170
|
+
if (!computeOptions.motion) {
|
|
171
|
+
return current;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return computeOptions.motion({
|
|
175
|
+
progress: normalizeRangeProgress(progress, ranges),
|
|
176
|
+
current,
|
|
177
|
+
start,
|
|
178
|
+
end,
|
|
179
|
+
props: interpolationProps,
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
type MotionTransformEntry = Exclude<
|
|
184
|
+
TransformsStyle["transform"],
|
|
185
|
+
string | undefined
|
|
186
|
+
>[number];
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Builds the rendered transform stack for a resolved motion: optional
|
|
190
|
+
* perspective first (so rotations project in 3D), translates, optional
|
|
191
|
+
* rotations, then the composer's scale entries — rotation happens in
|
|
192
|
+
* unscaled space around the element center.
|
|
193
|
+
*/
|
|
194
|
+
const composeMotionTransform = (
|
|
195
|
+
motion: BoundsMotionTransform,
|
|
196
|
+
scaleTransforms?: MotionTransformEntry[],
|
|
197
|
+
) => {
|
|
198
|
+
"worklet";
|
|
199
|
+
const transform: MotionTransformEntry[] = [];
|
|
200
|
+
const rotate = motion.rotate ?? 0;
|
|
201
|
+
const rotateX = motion.rotateX ?? 0;
|
|
202
|
+
const rotateY = motion.rotateY ?? 0;
|
|
203
|
+
|
|
204
|
+
if (
|
|
205
|
+
rotate !== 0 ||
|
|
206
|
+
rotateX !== 0 ||
|
|
207
|
+
rotateY !== 0 ||
|
|
208
|
+
motion.perspective !== undefined
|
|
209
|
+
) {
|
|
210
|
+
transform.push({ perspective: motion.perspective ?? 1000 });
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
transform.push({ translateX: motion.x }, { translateY: motion.y });
|
|
214
|
+
|
|
215
|
+
if (rotateX !== 0) {
|
|
216
|
+
transform.push({ rotateX: `${rotateX}deg` });
|
|
217
|
+
}
|
|
218
|
+
if (rotateY !== 0) {
|
|
219
|
+
transform.push({ rotateY: `${rotateY}deg` });
|
|
220
|
+
}
|
|
221
|
+
if (rotate !== 0) {
|
|
222
|
+
transform.push({ rotate: `${rotate}deg` });
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
if (scaleTransforms) {
|
|
226
|
+
for (const entry of scaleTransforms) {
|
|
227
|
+
transform.push(entry);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return transform;
|
|
232
|
+
};
|
|
233
|
+
|
|
108
234
|
export function composeSizeAbsolute(params: ElementComposeParams): StyleProps {
|
|
109
235
|
"worklet";
|
|
110
236
|
const { start, end, progress, ranges, computeOptions } = params;
|
|
@@ -141,22 +267,40 @@ export function composeSizeAbsolute(params: ElementComposeParams): StyleProps {
|
|
|
141
267
|
|
|
142
268
|
const translateX = anchorX - anchorOffset.x;
|
|
143
269
|
const translateY = anchorY - anchorOffset.y;
|
|
270
|
+
const motion = resolveMotionTransform({
|
|
271
|
+
computeOptions,
|
|
272
|
+
interpolationProps: params.interpolationProps,
|
|
273
|
+
progress,
|
|
274
|
+
ranges,
|
|
275
|
+
start,
|
|
276
|
+
end,
|
|
277
|
+
current: {
|
|
278
|
+
x: translateX,
|
|
279
|
+
y: translateY,
|
|
280
|
+
scale: 1,
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
const resolvedWidth = width * motion.scale;
|
|
284
|
+
const resolvedHeight = height * motion.scale;
|
|
144
285
|
|
|
145
286
|
if (computeOptions.raw) {
|
|
146
287
|
return {
|
|
147
|
-
width,
|
|
148
|
-
height,
|
|
149
|
-
translateX,
|
|
150
|
-
translateY,
|
|
151
|
-
|
|
288
|
+
width: resolvedWidth,
|
|
289
|
+
height: resolvedHeight,
|
|
290
|
+
translateX: motion.x,
|
|
291
|
+
translateY: motion.y,
|
|
292
|
+
rotate: motion.rotate ?? 0,
|
|
293
|
+
rotateX: motion.rotateX ?? 0,
|
|
294
|
+
rotateY: motion.rotateY ?? 0,
|
|
295
|
+
transformOrigin: motion.transformOrigin,
|
|
152
296
|
};
|
|
153
297
|
}
|
|
154
298
|
|
|
155
299
|
return {
|
|
156
|
-
width,
|
|
157
|
-
height,
|
|
158
|
-
transform:
|
|
159
|
-
|
|
300
|
+
width: resolvedWidth,
|
|
301
|
+
height: resolvedHeight,
|
|
302
|
+
transform: composeMotionTransform(motion),
|
|
303
|
+
transformOrigin: motion.transformOrigin,
|
|
160
304
|
};
|
|
161
305
|
}
|
|
162
306
|
|
|
@@ -197,22 +341,40 @@ export function composeSizeRelative(params: ElementComposeParams): StyleProps {
|
|
|
197
341
|
|
|
198
342
|
const translateX = anchorX - (baseX + anchorOffset.x);
|
|
199
343
|
const translateY = anchorY - (baseY + anchorOffset.y);
|
|
344
|
+
const motion = resolveMotionTransform({
|
|
345
|
+
computeOptions,
|
|
346
|
+
interpolationProps: params.interpolationProps,
|
|
347
|
+
progress,
|
|
348
|
+
ranges,
|
|
349
|
+
start,
|
|
350
|
+
end,
|
|
351
|
+
current: {
|
|
352
|
+
x: translateX,
|
|
353
|
+
y: translateY,
|
|
354
|
+
scale: 1,
|
|
355
|
+
},
|
|
356
|
+
});
|
|
357
|
+
const resolvedWidth = width * motion.scale;
|
|
358
|
+
const resolvedHeight = height * motion.scale;
|
|
200
359
|
|
|
201
360
|
if (computeOptions.raw) {
|
|
202
361
|
return {
|
|
203
|
-
translateX,
|
|
204
|
-
translateY,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
362
|
+
translateX: motion.x,
|
|
363
|
+
translateY: motion.y,
|
|
364
|
+
rotate: motion.rotate ?? 0,
|
|
365
|
+
rotateX: motion.rotateX ?? 0,
|
|
366
|
+
rotateY: motion.rotateY ?? 0,
|
|
367
|
+
transformOrigin: motion.transformOrigin,
|
|
368
|
+
width: resolvedWidth,
|
|
369
|
+
height: resolvedHeight,
|
|
208
370
|
};
|
|
209
371
|
}
|
|
210
372
|
|
|
211
373
|
return {
|
|
212
|
-
transform:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
374
|
+
transform: composeMotionTransform(motion),
|
|
375
|
+
transformOrigin: motion.transformOrigin,
|
|
376
|
+
width: resolvedWidth,
|
|
377
|
+
height: resolvedHeight,
|
|
216
378
|
};
|
|
217
379
|
}
|
|
218
380
|
|
|
@@ -265,19 +427,43 @@ export function composeTransformAbsolute(
|
|
|
265
427
|
Extrapolation.CLAMP,
|
|
266
428
|
);
|
|
267
429
|
|
|
430
|
+
const currentScale = getUniformScale(scaleX, scaleY);
|
|
431
|
+
const motion = resolveMotionTransform({
|
|
432
|
+
computeOptions,
|
|
433
|
+
interpolationProps: params.interpolationProps,
|
|
434
|
+
progress,
|
|
435
|
+
ranges,
|
|
436
|
+
start,
|
|
437
|
+
end,
|
|
438
|
+
current: {
|
|
439
|
+
x: translateX,
|
|
440
|
+
y: translateY,
|
|
441
|
+
scale: currentScale,
|
|
442
|
+
},
|
|
443
|
+
});
|
|
444
|
+
const scaleRatio = getScaleRatio(motion.scale, currentScale);
|
|
445
|
+
const resolvedScaleX = scaleX * scaleRatio;
|
|
446
|
+
const resolvedScaleY = scaleY * scaleRatio;
|
|
447
|
+
|
|
268
448
|
if (computeOptions.raw) {
|
|
269
449
|
return {
|
|
270
|
-
translateX,
|
|
271
|
-
translateY,
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
450
|
+
translateX: motion.x,
|
|
451
|
+
translateY: motion.y,
|
|
452
|
+
rotate: motion.rotate ?? 0,
|
|
453
|
+
rotateX: motion.rotateX ?? 0,
|
|
454
|
+
rotateY: motion.rotateY ?? 0,
|
|
455
|
+
transformOrigin: motion.transformOrigin,
|
|
456
|
+
scaleX: resolvedScaleX,
|
|
457
|
+
scaleY: resolvedScaleY,
|
|
275
458
|
};
|
|
276
459
|
}
|
|
277
460
|
|
|
278
461
|
return {
|
|
279
|
-
transform:
|
|
280
|
-
|
|
462
|
+
transform: composeMotionTransform(motion, [
|
|
463
|
+
{ scaleX: resolvedScaleX },
|
|
464
|
+
{ scaleY: resolvedScaleY },
|
|
465
|
+
]),
|
|
466
|
+
transformOrigin: motion.transformOrigin,
|
|
281
467
|
};
|
|
282
468
|
}
|
|
283
469
|
|
|
@@ -310,29 +496,49 @@ export function composeTransformRelative(
|
|
|
310
496
|
Extrapolation.CLAMP,
|
|
311
497
|
);
|
|
312
498
|
|
|
499
|
+
const offsetX = computeOptions.offset?.x ?? computeOptions.gestures?.x ?? 0;
|
|
500
|
+
const offsetY = computeOptions.offset?.y ?? computeOptions.gestures?.y ?? 0;
|
|
501
|
+
const currentScale = getUniformScale(scaleX, scaleY);
|
|
502
|
+
const motion = resolveMotionTransform({
|
|
503
|
+
computeOptions,
|
|
504
|
+
interpolationProps: params.interpolationProps,
|
|
505
|
+
progress,
|
|
506
|
+
ranges,
|
|
507
|
+
start: params.start,
|
|
508
|
+
end: params.end,
|
|
509
|
+
current: {
|
|
510
|
+
x: translateX,
|
|
511
|
+
y: translateY,
|
|
512
|
+
scale: currentScale,
|
|
513
|
+
},
|
|
514
|
+
});
|
|
515
|
+
const scaleRatio = getScaleRatio(motion.scale, currentScale);
|
|
516
|
+
const resolvedScaleX = scaleX * scaleRatio;
|
|
517
|
+
const resolvedScaleY = scaleY * scaleRatio;
|
|
518
|
+
|
|
313
519
|
if (computeOptions.raw) {
|
|
314
520
|
return {
|
|
315
|
-
translateX,
|
|
316
|
-
translateY,
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
521
|
+
translateX: motion.x,
|
|
522
|
+
translateY: motion.y,
|
|
523
|
+
rotate: motion.rotate ?? 0,
|
|
524
|
+
rotateX: motion.rotateX ?? 0,
|
|
525
|
+
rotateY: motion.rotateY ?? 0,
|
|
526
|
+
transformOrigin: motion.transformOrigin,
|
|
527
|
+
scaleX: resolvedScaleX,
|
|
528
|
+
scaleY: resolvedScaleY,
|
|
320
529
|
};
|
|
321
530
|
}
|
|
322
531
|
|
|
323
|
-
const offsetX = computeOptions.offset?.x ?? computeOptions.gestures?.x ?? 0;
|
|
324
|
-
const offsetY = computeOptions.offset?.y ?? computeOptions.gestures?.y ?? 0;
|
|
325
|
-
|
|
326
532
|
return {
|
|
327
533
|
transform: [
|
|
328
534
|
{ translateX: offsetX },
|
|
329
535
|
{ translateY: offsetY },
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
536
|
+
...composeMotionTransform(motion, [
|
|
537
|
+
{ scaleX: resolvedScaleX },
|
|
538
|
+
{ scaleY: resolvedScaleY },
|
|
539
|
+
]),
|
|
334
540
|
],
|
|
335
|
-
|
|
541
|
+
transformOrigin: motion.transformOrigin,
|
|
336
542
|
};
|
|
337
543
|
}
|
|
338
544
|
|
|
@@ -356,17 +562,34 @@ export function composeContentStyle(params: ContentComposeParams): StyleProps {
|
|
|
356
562
|
? interpolate(progress, ranges, [s, 1], Extrapolation.CLAMP)
|
|
357
563
|
: interpolate(progress, ranges, [1, s], Extrapolation.CLAMP);
|
|
358
564
|
|
|
565
|
+
const motion = resolveMotionTransform({
|
|
566
|
+
computeOptions: params.computeOptions,
|
|
567
|
+
interpolationProps: params.interpolationProps,
|
|
568
|
+
progress,
|
|
569
|
+
ranges,
|
|
570
|
+
start: params.start,
|
|
571
|
+
end: params.end,
|
|
572
|
+
current: {
|
|
573
|
+
x: translateX,
|
|
574
|
+
y: translateY,
|
|
575
|
+
scale,
|
|
576
|
+
},
|
|
577
|
+
});
|
|
578
|
+
|
|
359
579
|
if (raw) {
|
|
360
580
|
return {
|
|
361
|
-
translateX,
|
|
362
|
-
translateY,
|
|
363
|
-
|
|
364
|
-
|
|
581
|
+
translateX: motion.x,
|
|
582
|
+
translateY: motion.y,
|
|
583
|
+
rotate: motion.rotate ?? 0,
|
|
584
|
+
rotateX: motion.rotateX ?? 0,
|
|
585
|
+
rotateY: motion.rotateY ?? 0,
|
|
586
|
+
transformOrigin: motion.transformOrigin,
|
|
587
|
+
scale: motion.scale,
|
|
365
588
|
};
|
|
366
589
|
}
|
|
367
590
|
|
|
368
591
|
return {
|
|
369
|
-
transform:
|
|
370
|
-
|
|
592
|
+
transform: composeMotionTransform(motion, [{ scale: motion.scale }]),
|
|
593
|
+
transformOrigin: motion.transformOrigin,
|
|
371
594
|
};
|
|
372
595
|
}
|
|
@@ -7,7 +7,9 @@ import {
|
|
|
7
7
|
} from "../../../../constants";
|
|
8
8
|
import { resolveTransitionPair } from "../../../../stores/bounds/internals/resolver";
|
|
9
9
|
import type { ResolvedTransitionPair } from "../../../../stores/bounds/types";
|
|
10
|
+
import { getClampedScrollAxisDelta } from "../../../../stores/scroll.store";
|
|
10
11
|
import type { ScreenTransitionState } from "../../../../types/animation.types";
|
|
12
|
+
import type { ScrollMetadataState } from "../../../../types/gesture.types";
|
|
11
13
|
import type { Layout } from "../../../../types/screen.types";
|
|
12
14
|
import type {
|
|
13
15
|
BoundId,
|
|
@@ -27,6 +29,49 @@ import {
|
|
|
27
29
|
type ElementComposeParams,
|
|
28
30
|
} from "./composers";
|
|
29
31
|
|
|
32
|
+
const getBoundsScrollSnapshot = (
|
|
33
|
+
bounds: MeasuredDimensions | null,
|
|
34
|
+
): ScrollMetadataState | null => {
|
|
35
|
+
"worklet";
|
|
36
|
+
return (
|
|
37
|
+
(bounds as { scroll?: ScrollMetadataState | null } | null)?.scroll ?? null
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const getScreenScrollMetadata = (
|
|
42
|
+
screenKey: string | null,
|
|
43
|
+
previous: ScreenTransitionState | undefined,
|
|
44
|
+
current: ScreenTransitionState | undefined,
|
|
45
|
+
next: ScreenTransitionState | undefined,
|
|
46
|
+
): ScrollMetadataState | null => {
|
|
47
|
+
"worklet";
|
|
48
|
+
if (!screenKey) return null;
|
|
49
|
+
if (previous?.route.key === screenKey)
|
|
50
|
+
return previous.layouts?.scroll ?? null;
|
|
51
|
+
if (current?.route.key === screenKey) return current.layouts?.scroll ?? null;
|
|
52
|
+
if (next?.route.key === screenKey) return next.layouts?.scroll ?? null;
|
|
53
|
+
return null;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const shiftBounds = (
|
|
57
|
+
bounds: MeasuredDimensions,
|
|
58
|
+
dx: number,
|
|
59
|
+
dy: number,
|
|
60
|
+
): MeasuredDimensions => {
|
|
61
|
+
"worklet";
|
|
62
|
+
if (dx === 0 && dy === 0) {
|
|
63
|
+
return bounds;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
...bounds,
|
|
68
|
+
x: bounds.x + dx,
|
|
69
|
+
y: bounds.y + dy,
|
|
70
|
+
pageX: bounds.pageX + dx,
|
|
71
|
+
pageY: bounds.pageY + dy,
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
|
|
30
75
|
const resolveStartEnd = (params: {
|
|
31
76
|
id: BoundId;
|
|
32
77
|
previous?: ScreenTransitionState;
|
|
@@ -87,7 +132,80 @@ const resolveStartEnd = (params: {
|
|
|
87
132
|
};
|
|
88
133
|
}
|
|
89
134
|
|
|
90
|
-
|
|
135
|
+
/**
|
|
136
|
+
* Teleport continuity: this screen's source content physically renders
|
|
137
|
+
* inside the matched screen's portal host, which travels with that screen's
|
|
138
|
+
* ScrollView. Screen-fixed rects (the source, fullscreen/custom targets)
|
|
139
|
+
* must be expressed in the host's frame by the clamped scroll travel since
|
|
140
|
+
* the destination capture. The destination rect rides with the host, so it
|
|
141
|
+
* stays untouched. Classic two-component links never set a portal host and
|
|
142
|
+
* skip this entirely.
|
|
143
|
+
*/
|
|
144
|
+
const isTeleportedSourceElement =
|
|
145
|
+
resolvedPair.sourcePortalAttachTarget === "matched-screen" &&
|
|
146
|
+
!!currentScreenKey &&
|
|
147
|
+
currentScreenKey === resolvedPair.sourceScreenKey &&
|
|
148
|
+
!!resolvedPair.destinationScreenKey &&
|
|
149
|
+
currentScreenKey !== resolvedPair.destinationScreenKey &&
|
|
150
|
+
params.computeOptions.method !== "content";
|
|
151
|
+
|
|
152
|
+
let teleportShiftX = 0;
|
|
153
|
+
let teleportShiftY = 0;
|
|
154
|
+
let sourceScrollShiftX = 0;
|
|
155
|
+
let sourceScrollShiftY = 0;
|
|
156
|
+
|
|
157
|
+
if (isTeleportedSourceElement) {
|
|
158
|
+
const capturedScroll = getBoundsScrollSnapshot(destinationBounds);
|
|
159
|
+
const liveScroll = getScreenScrollMetadata(
|
|
160
|
+
resolvedPair.destinationScreenKey,
|
|
161
|
+
params.previous,
|
|
162
|
+
params.current,
|
|
163
|
+
params.next,
|
|
164
|
+
);
|
|
165
|
+
teleportShiftX = getClampedScrollAxisDelta(
|
|
166
|
+
liveScroll,
|
|
167
|
+
capturedScroll,
|
|
168
|
+
"horizontal",
|
|
169
|
+
);
|
|
170
|
+
teleportShiftY = getClampedScrollAxisDelta(
|
|
171
|
+
liveScroll,
|
|
172
|
+
capturedScroll,
|
|
173
|
+
"vertical",
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
// A source that lives inside its own scroll host travels with that
|
|
177
|
+
// ScrollView in page space. Shifting the start rect by the clamped source
|
|
178
|
+
// scroll travel keeps it aligned with the live placeholder; the host
|
|
179
|
+
// placement applies the identical shift, so the shifts cancel at full
|
|
180
|
+
// progress and the open frame is untouched. Screen-fixed rects (the
|
|
181
|
+
// fullscreen/custom end targets below) are not inside the scroll content
|
|
182
|
+
// and keep only the destination shift.
|
|
183
|
+
if (resolvedPair.sourceHost?.capturesScroll) {
|
|
184
|
+
const capturedSourceScroll = getBoundsScrollSnapshot(sourceBounds);
|
|
185
|
+
const liveSourceScroll = getScreenScrollMetadata(
|
|
186
|
+
resolvedPair.sourceScreenKey,
|
|
187
|
+
params.previous,
|
|
188
|
+
params.current,
|
|
189
|
+
params.next,
|
|
190
|
+
);
|
|
191
|
+
sourceScrollShiftX = getClampedScrollAxisDelta(
|
|
192
|
+
liveSourceScroll,
|
|
193
|
+
capturedSourceScroll,
|
|
194
|
+
"horizontal",
|
|
195
|
+
);
|
|
196
|
+
sourceScrollShiftY = getClampedScrollAxisDelta(
|
|
197
|
+
liveSourceScroll,
|
|
198
|
+
capturedSourceScroll,
|
|
199
|
+
"vertical",
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const start = shiftBounds(
|
|
205
|
+
sourceBounds,
|
|
206
|
+
teleportShiftX - sourceScrollShiftX,
|
|
207
|
+
teleportShiftY - sourceScrollShiftY,
|
|
208
|
+
);
|
|
91
209
|
let end = destinationBounds ?? fullscreen;
|
|
92
210
|
|
|
93
211
|
if (isFullscreenTarget) {
|
|
@@ -99,6 +217,10 @@ const resolveStartEnd = (params: {
|
|
|
99
217
|
end = customTarget;
|
|
100
218
|
}
|
|
101
219
|
|
|
220
|
+
if (hasTargetOverride) {
|
|
221
|
+
end = shiftBounds(end, teleportShiftX, teleportShiftY);
|
|
222
|
+
}
|
|
223
|
+
|
|
102
224
|
return {
|
|
103
225
|
start,
|
|
104
226
|
end,
|
|
@@ -111,7 +233,15 @@ const resolveStartEnd = (params: {
|
|
|
111
233
|
};
|
|
112
234
|
|
|
113
235
|
export const computeBoundStyles = (
|
|
114
|
-
{
|
|
236
|
+
{
|
|
237
|
+
id,
|
|
238
|
+
previous,
|
|
239
|
+
current,
|
|
240
|
+
next,
|
|
241
|
+
progress,
|
|
242
|
+
dimensions,
|
|
243
|
+
interpolationProps,
|
|
244
|
+
}: BoundsComputeParams,
|
|
115
245
|
computeOptions: BoundsOptions = { id: "bound-id" },
|
|
116
246
|
resolvedPair?: ResolvedTransitionPair,
|
|
117
247
|
) => {
|
|
@@ -167,6 +297,7 @@ export const computeBoundStyles = (
|
|
|
167
297
|
end: contentEnd,
|
|
168
298
|
geometry,
|
|
169
299
|
computeOptions,
|
|
300
|
+
interpolationProps,
|
|
170
301
|
});
|
|
171
302
|
}
|
|
172
303
|
|
|
@@ -185,6 +316,7 @@ export const computeBoundStyles = (
|
|
|
185
316
|
ranges,
|
|
186
317
|
geometry,
|
|
187
318
|
computeOptions,
|
|
319
|
+
interpolationProps,
|
|
188
320
|
};
|
|
189
321
|
|
|
190
322
|
const isSize = computeOptions.method === "size";
|
|
@@ -79,10 +79,10 @@ export function buildRevealStyles({
|
|
|
79
79
|
const bounds = createBoundsAccessorCore({
|
|
80
80
|
getProps: () => props,
|
|
81
81
|
});
|
|
82
|
-
const scopedBounds = bounds(
|
|
83
|
-
const link = scopedBounds.
|
|
82
|
+
const scopedBounds = bounds(tag);
|
|
83
|
+
const link = scopedBounds.link();
|
|
84
84
|
|
|
85
|
-
if (
|
|
85
|
+
if (link?.status !== "complete") {
|
|
86
86
|
return {};
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -133,16 +133,14 @@ export function buildRevealStyles({
|
|
|
133
133
|
/* ----------------------------- Focused Screen ----------------------------- */
|
|
134
134
|
|
|
135
135
|
if (focused) {
|
|
136
|
-
const contentRaw =
|
|
137
|
-
raw: true,
|
|
136
|
+
const contentRaw = scopedBounds.math({
|
|
138
137
|
scaleMode: "uniform",
|
|
139
138
|
method: "content",
|
|
140
139
|
target: initialDestinationTarget,
|
|
141
140
|
progress: transitionProgress,
|
|
142
141
|
});
|
|
143
142
|
|
|
144
|
-
const maskRaw =
|
|
145
|
-
raw: true,
|
|
143
|
+
const maskRaw = scopedBounds.math({
|
|
146
144
|
scaleMode: "uniform",
|
|
147
145
|
method: "size",
|
|
148
146
|
space: "absolute",
|
|
@@ -91,8 +91,8 @@ export function buildZoomStyles({
|
|
|
91
91
|
const bounds = createBoundsAccessorCore({
|
|
92
92
|
getProps: () => props,
|
|
93
93
|
});
|
|
94
|
-
const scopedBounds = bounds(
|
|
95
|
-
const link = scopedBounds.
|
|
94
|
+
const scopedBounds = bounds(tag);
|
|
95
|
+
const link = scopedBounds.link();
|
|
96
96
|
|
|
97
97
|
if (!link) return {};
|
|
98
98
|
|
|
@@ -223,18 +223,16 @@ export function buildZoomStyles({
|
|
|
223
223
|
link,
|
|
224
224
|
});
|
|
225
225
|
|
|
226
|
-
const contentRaw =
|
|
226
|
+
const contentRaw = scopedBounds.math({
|
|
227
227
|
...baseRawOptions,
|
|
228
|
-
raw: true,
|
|
229
228
|
anchor: zoomAnchor,
|
|
230
229
|
method: "content",
|
|
231
230
|
target: focusedContentTarget,
|
|
232
231
|
progress: transitionProgress,
|
|
233
232
|
});
|
|
234
233
|
|
|
235
|
-
const maskRaw =
|
|
234
|
+
const maskRaw = scopedBounds.math({
|
|
236
235
|
...baseRawOptions,
|
|
237
|
-
raw: true,
|
|
238
236
|
anchor: ZOOM_SHARED_OPTIONS.anchor,
|
|
239
237
|
method: "size",
|
|
240
238
|
space: "absolute",
|
|
@@ -368,9 +366,8 @@ export function buildZoomStyles({
|
|
|
368
366
|
link,
|
|
369
367
|
});
|
|
370
368
|
|
|
371
|
-
const elementRaw =
|
|
369
|
+
const elementRaw = scopedBounds.math({
|
|
372
370
|
...baseRawOptions,
|
|
373
|
-
raw: true,
|
|
374
371
|
anchor: zoomAnchor,
|
|
375
372
|
method: "transform",
|
|
376
373
|
space: "relative",
|