react-native-screen-transitions 3.8.0 → 3.9.0-alpha.1
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 +18 -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 +74 -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 +20 -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 +198 -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/teleport.js +23 -0
- package/lib/commonjs/shared/components/boundary/portal/teleport.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/hooks/navigation/use-stack.js +17 -2
- package/lib/commonjs/shared/hooks/navigation/use-stack.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/animation/helpers/pipeline.js +4 -13
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/stack-progress.js +23 -12
- package/lib/commonjs/shared/providers/screen/animation/helpers/stack-progress.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.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/animation.store.js +2 -0
- package/lib/commonjs/shared/stores/animation.store.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 +20 -26
- 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 +69 -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 +16 -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 +193 -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/teleport.js +19 -0
- package/lib/module/shared/components/boundary/portal/teleport.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/hooks/navigation/use-stack.js +19 -4
- package/lib/module/shared/hooks/navigation/use-stack.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/animation/helpers/pipeline.js +5 -14
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/stack-progress.js +20 -10
- package/lib/module/shared/providers/screen/animation/helpers/stack-progress.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.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/animation.store.js +2 -0
- package/lib/module/shared/stores/animation.store.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/teleport.d.ts +6 -0
- package/lib/typescript/shared/components/boundary/portal/teleport.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/hooks/navigation/use-stack.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/animation/helpers/hydrate-transition-state/types.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/stack-progress.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/stack-progress.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.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/animation.store.d.ts +1 -0
- package/lib/typescript/shared/stores/animation.store.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 +8 -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 +33 -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 +97 -0
- package/src/shared/components/boundary/portal/components/portal-provider.tsx +14 -0
- package/src/shared/components/boundary/portal/components/portal.tsx +283 -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/teleport.ts +21 -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/hooks/navigation/use-stack.tsx +32 -1
- package/src/shared/index.ts +13 -5
- package/src/shared/providers/helpers/measured-bounds-writes.ts +11 -1
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +1 -0
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +13 -19
- package/src/shared/providers/screen/animation/helpers/stack-progress.ts +31 -16
- package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +2 -0
- 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/animation.store.ts +3 -0
- 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
|
@@ -434,12 +434,10 @@ export const SharedAppleMusic = ({
|
|
|
434
434
|
const dragXScale = interpolate(normX, [0, 1], xScaleOuput);
|
|
435
435
|
const dragYScale = interpolate(normY, [0, 1], yScaleOuput);
|
|
436
436
|
|
|
437
|
-
const boundValues = bounds({
|
|
438
|
-
id: sharedBoundTag,
|
|
437
|
+
const boundValues = bounds({ id: sharedBoundTag }).math({
|
|
439
438
|
method: focused ? "content" : "transform",
|
|
440
439
|
anchor: "top",
|
|
441
440
|
scaleMode: "uniform",
|
|
442
|
-
raw: true,
|
|
443
441
|
});
|
|
444
442
|
|
|
445
443
|
const opacity = interpolate(
|
|
@@ -455,12 +453,10 @@ export const SharedAppleMusic = ({
|
|
|
455
453
|
* ===============================
|
|
456
454
|
*/
|
|
457
455
|
if (focused) {
|
|
458
|
-
const maskedValues = bounds({
|
|
459
|
-
id: sharedBoundTag,
|
|
456
|
+
const maskedValues = bounds({ id: sharedBoundTag }).math({
|
|
460
457
|
space: "absolute",
|
|
461
458
|
method: "size",
|
|
462
459
|
target: "fullscreen",
|
|
463
|
-
raw: true,
|
|
464
460
|
});
|
|
465
461
|
|
|
466
462
|
// Apple Music style drop shadow that increases with drag magnitude
|
|
@@ -5,10 +5,14 @@ import {
|
|
|
5
5
|
useCallback,
|
|
6
6
|
useContext,
|
|
7
7
|
useLayoutEffect,
|
|
8
|
+
useMemo,
|
|
8
9
|
useRef,
|
|
9
10
|
useSyncExternalStore,
|
|
10
11
|
} from "react";
|
|
12
|
+
import { useDerivedValue } from "react-native-reanimated";
|
|
13
|
+
import { syncStackProgressValues } from "../../providers/screen/animation/helpers/stack-progress";
|
|
11
14
|
import type { StackCoreContextValue } from "../../providers/stack/core.provider";
|
|
15
|
+
import { AnimationStore } from "../../stores/animation.store";
|
|
12
16
|
import type { OverlayProps } from "../../types/overlay.types";
|
|
13
17
|
import type {
|
|
14
18
|
BaseStackDescriptor,
|
|
@@ -87,6 +91,30 @@ const createStackStore = (
|
|
|
87
91
|
const StackContext = createContext<StackStoreApi | null>(null);
|
|
88
92
|
StackContext.displayName = "Stack";
|
|
89
93
|
|
|
94
|
+
function StackProgressOwner({ routeKeys }: { routeKeys: string[] }) {
|
|
95
|
+
const visualProgressValues = useMemo(
|
|
96
|
+
() =>
|
|
97
|
+
routeKeys.map((routeKey) =>
|
|
98
|
+
AnimationStore.getValue(routeKey, "visualProgress"),
|
|
99
|
+
),
|
|
100
|
+
[routeKeys],
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
const stackProgressValues = useMemo(
|
|
104
|
+
() =>
|
|
105
|
+
routeKeys.map((routeKey) =>
|
|
106
|
+
AnimationStore.getValue(routeKey, "stackProgress"),
|
|
107
|
+
),
|
|
108
|
+
[routeKeys],
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
useDerivedValue(() => {
|
|
112
|
+
syncStackProgressValues(visualProgressValues, stackProgressValues);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
|
|
90
118
|
export function StackProvider({
|
|
91
119
|
children,
|
|
92
120
|
value,
|
|
@@ -116,7 +144,10 @@ export function StackProvider({
|
|
|
116
144
|
});
|
|
117
145
|
|
|
118
146
|
return (
|
|
119
|
-
<StackContext.Provider value={store}>
|
|
147
|
+
<StackContext.Provider value={store}>
|
|
148
|
+
<StackProgressOwner routeKeys={value.routeKeys} />
|
|
149
|
+
{children}
|
|
150
|
+
</StackContext.Provider>
|
|
120
151
|
);
|
|
121
152
|
}
|
|
122
153
|
|
package/src/shared/index.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { FlatList, Pressable, ScrollView, View } from "react-native";
|
|
2
2
|
import { withScreenTransitions } from "./adapters/with-screen-transitions";
|
|
3
|
-
import {
|
|
4
|
-
Boundary,
|
|
5
|
-
createBoundaryComponent,
|
|
6
|
-
} from "./components/create-boundary-component";
|
|
3
|
+
import { Boundary, createBoundaryComponent } from "./components/boundary";
|
|
7
4
|
import { createTransitionAwareComponent } from "./components/create-transition-aware-component";
|
|
8
|
-
import MaskedView from "./components/
|
|
5
|
+
import MaskedView from "./components/masked-view";
|
|
9
6
|
import { Presets, Specs } from "./configs";
|
|
10
7
|
|
|
11
8
|
export default {
|
|
@@ -29,6 +26,11 @@ export default {
|
|
|
29
26
|
export type { NativeStackAdapterOptions } from "./adapters/with-screen-transitions";
|
|
30
27
|
export { withScreenTransitions } from "./adapters/with-screen-transitions";
|
|
31
28
|
export { snapTo } from "./animation/snap-to";
|
|
29
|
+
export type {
|
|
30
|
+
BoundaryPortal,
|
|
31
|
+
BoundaryPortalAttachTarget,
|
|
32
|
+
BoundaryPortalOptions,
|
|
33
|
+
} from "./components/boundary";
|
|
32
34
|
export {
|
|
33
35
|
NAVIGATION_MASK_CONTAINER_STYLE_ID,
|
|
34
36
|
NAVIGATION_MASK_ELEMENT_STYLE_ID,
|
|
@@ -51,7 +53,12 @@ export {
|
|
|
51
53
|
export type {
|
|
52
54
|
AnimatedViewStyle,
|
|
53
55
|
AnimationConfig,
|
|
56
|
+
BoundaryTeleportControl,
|
|
57
|
+
BoundsMotion,
|
|
58
|
+
BoundsMotionFrame,
|
|
59
|
+
BoundsMotionTransform,
|
|
54
60
|
BoundsNavigationAccessor,
|
|
61
|
+
BoundsNavigationRevealOptions,
|
|
55
62
|
BoundsNavigationRevealStyle,
|
|
56
63
|
BoundsNavigationZoomOpacityRange,
|
|
57
64
|
BoundsNavigationZoomOpacityRanges,
|
|
@@ -72,6 +79,7 @@ export type {
|
|
|
72
79
|
ScrollGestureState,
|
|
73
80
|
ScrollMetadataState,
|
|
74
81
|
TransitionInterpolatedStyle,
|
|
82
|
+
TransitionSlotProps,
|
|
75
83
|
TransitionSlotStyle,
|
|
76
84
|
TransitionSpec,
|
|
77
85
|
} from "./types";
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
2
2
|
import { setEntry } from "../../stores/bounds/internals/entries";
|
|
3
3
|
import { setDestination, setSource } from "../../stores/bounds/internals/links";
|
|
4
|
-
import type {
|
|
4
|
+
import type {
|
|
5
|
+
BoundsPortalAttachTarget,
|
|
6
|
+
ScreenPairKey,
|
|
7
|
+
SourceHostRef,
|
|
8
|
+
} from "../../stores/bounds/types";
|
|
5
9
|
|
|
6
10
|
type LinkWrite =
|
|
7
11
|
| {
|
|
@@ -21,6 +25,8 @@ type ApplyMeasuredBoundsWritesParams = {
|
|
|
21
25
|
measured: MeasuredDimensions;
|
|
22
26
|
preparedStyles: StyleProps;
|
|
23
27
|
linkWrite?: LinkWrite;
|
|
28
|
+
portalHost?: BoundsPortalAttachTarget;
|
|
29
|
+
sourceHost?: SourceHostRef;
|
|
24
30
|
};
|
|
25
31
|
|
|
26
32
|
export const applyMeasuredBoundsWrites = (
|
|
@@ -35,6 +41,8 @@ export const applyMeasuredBoundsWrites = (
|
|
|
35
41
|
measured,
|
|
36
42
|
preparedStyles,
|
|
37
43
|
linkWrite,
|
|
44
|
+
portalHost,
|
|
45
|
+
sourceHost,
|
|
38
46
|
} = params;
|
|
39
47
|
|
|
40
48
|
// Set the bounds entry on every measure to avoid any stale measurements
|
|
@@ -51,6 +59,8 @@ export const applyMeasuredBoundsWrites = (
|
|
|
51
59
|
measured,
|
|
52
60
|
preparedStyles,
|
|
53
61
|
group,
|
|
62
|
+
portalHost,
|
|
63
|
+
sourceHost,
|
|
54
64
|
);
|
|
55
65
|
}
|
|
56
66
|
|
|
@@ -11,6 +11,7 @@ import type { BaseStackRoute } from "../../../../../types/stack.types";
|
|
|
11
11
|
export type BuiltState = {
|
|
12
12
|
transitionProgress: SharedValue<number>;
|
|
13
13
|
visualProgress: SharedValue<number>;
|
|
14
|
+
stackProgress: SharedValue<number>;
|
|
14
15
|
willAnimate: SharedValue<number>;
|
|
15
16
|
closing: SharedValue<number>;
|
|
16
17
|
progressAnimating: SharedValue<number>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
1
|
import { useWindowDimensions } from "react-native";
|
|
3
2
|
import {
|
|
4
3
|
type DerivedValue,
|
|
@@ -9,7 +8,6 @@ import {
|
|
|
9
8
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
10
9
|
import { DEFAULT_SCREEN_TRANSITION_STATE } from "../../../../constants";
|
|
11
10
|
import { useStack } from "../../../../hooks/navigation/use-stack";
|
|
12
|
-
import { AnimationStore } from "../../../../stores/animation.store";
|
|
13
11
|
import type {
|
|
14
12
|
ScreenInterpolationProps,
|
|
15
13
|
ScreenStyleInterpolator,
|
|
@@ -20,7 +18,7 @@ import { updateDerivations } from "./derivations";
|
|
|
20
18
|
import { hasTransitionsEnabled } from "./has-transitions-enabled";
|
|
21
19
|
import { hydrateTransitionState } from "./hydrate-transition-state";
|
|
22
20
|
import type { SelectedInterpolatorOptions } from "./selected-interpolator-options";
|
|
23
|
-
import {
|
|
21
|
+
import { resolveStackProgress } from "./stack-progress";
|
|
24
22
|
import { useBuildTransitionState } from "./use-build-transition-state";
|
|
25
23
|
|
|
26
24
|
export type ScreenInterpolatorFrame = Omit<
|
|
@@ -61,10 +59,11 @@ const createInitialBaseInterpolatorProps = (
|
|
|
61
59
|
};
|
|
62
60
|
|
|
63
61
|
export function useScreenAnimationPipeline(): ScreenAnimationPipeline {
|
|
64
|
-
const
|
|
62
|
+
const transitionsAlwaysOn = useStack(
|
|
63
|
+
(stack) => stack.flags.TRANSITIONS_ALWAYS_ON,
|
|
64
|
+
);
|
|
65
65
|
const dimensions = useWindowDimensions();
|
|
66
66
|
const insets = useSafeAreaInsets();
|
|
67
|
-
const transitionsAlwaysOn = flags.TRANSITIONS_ALWAYS_ON;
|
|
68
67
|
|
|
69
68
|
const {
|
|
70
69
|
current: currDescriptor,
|
|
@@ -76,14 +75,6 @@ export function useScreenAnimationPipeline(): ScreenAnimationPipeline {
|
|
|
76
75
|
const nextAnimation = useBuildTransitionState(nextDescriptor);
|
|
77
76
|
const prevAnimation = useBuildTransitionState(prevDescriptor);
|
|
78
77
|
|
|
79
|
-
const currentRouteKey = currDescriptor?.route?.key;
|
|
80
|
-
const currentIndex = routeKeys.indexOf(currentRouteKey);
|
|
81
|
-
const visualProgressValues = useMemo(() => {
|
|
82
|
-
return routeKeys.map((routeKey) =>
|
|
83
|
-
AnimationStore.getValue(routeKey, "visualProgress"),
|
|
84
|
-
);
|
|
85
|
-
}, [routeKeys]);
|
|
86
|
-
|
|
87
78
|
const nextRouteKey = nextDescriptor?.route?.key;
|
|
88
79
|
const nextHasTransitions =
|
|
89
80
|
!!nextRouteKey &&
|
|
@@ -110,6 +101,11 @@ export function useScreenAnimationPipeline(): ScreenAnimationPipeline {
|
|
|
110
101
|
interpolatorOptions.owner === "next" &&
|
|
111
102
|
!!nextAnimation &&
|
|
112
103
|
nextHasTransitions;
|
|
104
|
+
const previousCurrentProgress = currentAnimation?.visualProgress.get();
|
|
105
|
+
const previousNextProgress =
|
|
106
|
+
nextAnimation && nextHasTransitions
|
|
107
|
+
? nextAnimation.visualProgress.get()
|
|
108
|
+
: undefined;
|
|
113
109
|
|
|
114
110
|
frame.previous = prevAnimation
|
|
115
111
|
? hydrateTransitionState(prevAnimation, dimensions)
|
|
@@ -141,15 +137,13 @@ export function useScreenAnimationPipeline(): ScreenAnimationPipeline {
|
|
|
141
137
|
|
|
142
138
|
updateDerivations(frame);
|
|
143
139
|
|
|
144
|
-
frame.stackProgress =
|
|
145
|
-
|
|
146
|
-
visualProgressValues,
|
|
147
|
-
currentIndex,
|
|
140
|
+
frame.stackProgress = resolveStackProgress(
|
|
141
|
+
currentAnimation?.stackProgress,
|
|
148
142
|
frame.progress,
|
|
149
|
-
currentRouteKey,
|
|
150
143
|
frame.current.progress,
|
|
151
|
-
|
|
144
|
+
previousCurrentProgress,
|
|
152
145
|
frame.next?.progress,
|
|
146
|
+
previousNextProgress,
|
|
153
147
|
);
|
|
154
148
|
frame.logicallySettled = frame.active.settled;
|
|
155
149
|
|
|
@@ -1,28 +1,43 @@
|
|
|
1
1
|
import type { SharedValue } from "react-native-reanimated";
|
|
2
2
|
|
|
3
|
-
export const
|
|
4
|
-
routeKeys: string[],
|
|
3
|
+
export const syncStackProgressValues = (
|
|
5
4
|
visualProgressValues: SharedValue<number>[],
|
|
6
|
-
|
|
5
|
+
stackProgressValues: SharedValue<number>[],
|
|
6
|
+
) => {
|
|
7
|
+
"worklet";
|
|
8
|
+
let total = 0;
|
|
9
|
+
|
|
10
|
+
for (let i = visualProgressValues.length - 1; i >= 0; i--) {
|
|
11
|
+
total += visualProgressValues[i]?.get() ?? 0;
|
|
12
|
+
const stackProgress = stackProgressValues[i];
|
|
13
|
+
|
|
14
|
+
if (stackProgress && stackProgress.get() !== total) {
|
|
15
|
+
stackProgress.set(total);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const resolveStackProgress = (
|
|
21
|
+
stackProgress: SharedValue<number> | undefined,
|
|
7
22
|
fallbackProgress: number,
|
|
8
|
-
currentRouteKey: string | undefined,
|
|
9
23
|
currentProgress: number,
|
|
10
|
-
|
|
24
|
+
previousCurrentProgress: number | undefined,
|
|
11
25
|
nextProgress: number | undefined,
|
|
26
|
+
previousNextProgress: number | undefined,
|
|
12
27
|
) => {
|
|
13
28
|
"worklet";
|
|
14
|
-
if (
|
|
29
|
+
if (!stackProgress) {
|
|
30
|
+
return fallbackProgress;
|
|
31
|
+
}
|
|
15
32
|
|
|
16
|
-
let total =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
total += visualProgressValues[i].get();
|
|
25
|
-
}
|
|
33
|
+
let total = stackProgress.get();
|
|
34
|
+
|
|
35
|
+
if (previousCurrentProgress !== undefined) {
|
|
36
|
+
total += currentProgress - previousCurrentProgress;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (nextProgress !== undefined && previousNextProgress !== undefined) {
|
|
40
|
+
total += nextProgress - previousNextProgress;
|
|
26
41
|
}
|
|
27
42
|
|
|
28
43
|
return total;
|
|
@@ -22,6 +22,7 @@ import { toPlainRoute, toPlainValue } from "./worklet";
|
|
|
22
22
|
type BuiltState = {
|
|
23
23
|
transitionProgress: SharedValue<number>;
|
|
24
24
|
visualProgress: SharedValue<number>;
|
|
25
|
+
stackProgress: SharedValue<number>;
|
|
25
26
|
willAnimate: SharedValue<number>;
|
|
26
27
|
closing: SharedValue<number>;
|
|
27
28
|
progressAnimating: SharedValue<number>;
|
|
@@ -67,6 +68,7 @@ export const useBuildTransitionState = (
|
|
|
67
68
|
return {
|
|
68
69
|
transitionProgress: AnimationStore.getValue(key, "transitionProgress"),
|
|
69
70
|
visualProgress: AnimationStore.getValue(key, "visualProgress"),
|
|
71
|
+
stackProgress: AnimationStore.getValue(key, "stackProgress"),
|
|
70
72
|
willAnimate: AnimationStore.getValue(key, "willAnimate"),
|
|
71
73
|
closing: AnimationStore.getValue(key, "closing"),
|
|
72
74
|
entering: AnimationStore.getValue(key, "entering"),
|
|
@@ -4,7 +4,7 @@ import type { BaseStackDescriptor } from "../../../types/stack.types";
|
|
|
4
4
|
import createProvider from "../../../utils/create-provider";
|
|
5
5
|
import type { DescriptorDerivations } from "./helpers/derive-descriptor-derivations";
|
|
6
6
|
import { deriveDescriptorDerivations } from "./helpers/derive-descriptor-derivations";
|
|
7
|
-
import {
|
|
7
|
+
import { getAncestorKeyState } from "./helpers/get-ancestor-keys";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Base descriptor interface - minimal contract for all stack types.
|
|
@@ -49,7 +49,10 @@ const {
|
|
|
49
49
|
[previous, current, next],
|
|
50
50
|
);
|
|
51
51
|
|
|
52
|
-
const ancestorKeys = useMemo(
|
|
52
|
+
const { ancestorKeys, ancestorDestinationPairKey } = useMemo(
|
|
53
|
+
() => getAncestorKeyState(current),
|
|
54
|
+
[current],
|
|
55
|
+
);
|
|
53
56
|
|
|
54
57
|
const derivations = useMemo(
|
|
55
58
|
() =>
|
|
@@ -58,8 +61,9 @@ const {
|
|
|
58
61
|
current,
|
|
59
62
|
next,
|
|
60
63
|
ancestorKeys,
|
|
64
|
+
ancestorDestinationPairKey,
|
|
61
65
|
}),
|
|
62
|
-
[previous, current, next, ancestorKeys],
|
|
66
|
+
[previous, current, next, ancestorKeys, ancestorDestinationPairKey],
|
|
63
67
|
);
|
|
64
68
|
|
|
65
69
|
const value = useMemo(
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import { createScreenPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
2
|
+
import type { ScreenPairKey } from "../../../../stores/bounds/types";
|
|
1
3
|
import type { BaseStackDescriptor } from "../../../../types/stack.types";
|
|
2
4
|
|
|
3
5
|
export interface DescriptorDerivations {
|
|
4
6
|
previousScreenKey?: string;
|
|
5
7
|
currentScreenKey: string;
|
|
6
8
|
nextScreenKey?: string;
|
|
9
|
+
sourcePairKey?: ScreenPairKey;
|
|
10
|
+
destinationPairKey?: ScreenPairKey;
|
|
11
|
+
ancestorDestinationPairKey?: ScreenPairKey;
|
|
7
12
|
parentScreenKey?: string;
|
|
8
13
|
isFirstKey: boolean;
|
|
9
14
|
isTopMostScreen: boolean;
|
|
@@ -16,6 +21,7 @@ interface Params {
|
|
|
16
21
|
current: BaseStackDescriptor;
|
|
17
22
|
next?: BaseStackDescriptor;
|
|
18
23
|
ancestorKeys: string[];
|
|
24
|
+
ancestorDestinationPairKey?: ScreenPairKey;
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
export function deriveDescriptorDerivations({
|
|
@@ -23,10 +29,17 @@ export function deriveDescriptorDerivations({
|
|
|
23
29
|
current,
|
|
24
30
|
next,
|
|
25
31
|
ancestorKeys,
|
|
32
|
+
ancestorDestinationPairKey,
|
|
26
33
|
}: Params): DescriptorDerivations {
|
|
27
34
|
const previousScreenKey = previous?.route.key;
|
|
28
35
|
const currentScreenKey = current.route.key;
|
|
29
36
|
const nextScreenKey = next?.route.key;
|
|
37
|
+
const sourcePairKey = nextScreenKey
|
|
38
|
+
? createScreenPairKey(currentScreenKey, nextScreenKey)
|
|
39
|
+
: undefined;
|
|
40
|
+
const destinationPairKey = previousScreenKey
|
|
41
|
+
? createScreenPairKey(previousScreenKey, currentScreenKey)
|
|
42
|
+
: undefined;
|
|
30
43
|
|
|
31
44
|
const navigationState = current.navigation.getState();
|
|
32
45
|
const routes = navigationState?.routes ?? [];
|
|
@@ -41,6 +54,9 @@ export function deriveDescriptorDerivations({
|
|
|
41
54
|
previousScreenKey,
|
|
42
55
|
currentScreenKey,
|
|
43
56
|
nextScreenKey,
|
|
57
|
+
sourcePairKey,
|
|
58
|
+
destinationPairKey,
|
|
59
|
+
ancestorDestinationPairKey,
|
|
44
60
|
parentScreenKey: ancestorKeys[0],
|
|
45
61
|
isFirstKey,
|
|
46
62
|
isTopMostScreen,
|
|
@@ -1,16 +1,26 @@
|
|
|
1
|
+
import { createScreenPairKey } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
2
|
+
import type { ScreenPairKey } from "../../../../stores/bounds/types";
|
|
1
3
|
import type { BaseStackDescriptor } from "../../../../types/stack.types";
|
|
2
4
|
|
|
5
|
+
export interface AncestorKeyState {
|
|
6
|
+
ancestorKeys: string[];
|
|
7
|
+
ancestorDestinationPairKey?: ScreenPairKey;
|
|
8
|
+
}
|
|
9
|
+
|
|
3
10
|
/**
|
|
4
|
-
* Builds
|
|
5
|
-
*
|
|
6
|
-
*
|
|
11
|
+
* Builds nested navigator ancestor keys from immediate parent to root.
|
|
12
|
+
* The nearest ancestor destination pair lets child routes attach measurements
|
|
13
|
+
* to the transition owned by the parent stack.
|
|
7
14
|
*/
|
|
8
|
-
export function
|
|
15
|
+
export function getAncestorKeyState(
|
|
16
|
+
current: BaseStackDescriptor,
|
|
17
|
+
): AncestorKeyState {
|
|
9
18
|
const ancestors: string[] = [];
|
|
19
|
+
let ancestorDestinationPairKey: ScreenPairKey | undefined;
|
|
10
20
|
const nav = current.navigation as any;
|
|
11
21
|
|
|
12
22
|
if (typeof nav?.getParent !== "function") {
|
|
13
|
-
return ancestors;
|
|
23
|
+
return { ancestorKeys: ancestors };
|
|
14
24
|
}
|
|
15
25
|
|
|
16
26
|
let parent = nav.getParent();
|
|
@@ -21,10 +31,25 @@ export function getAncestorKeys(current: BaseStackDescriptor): string[] {
|
|
|
21
31
|
const focusedRoute = state.routes[state.index];
|
|
22
32
|
if (focusedRoute?.key) {
|
|
23
33
|
ancestors.push(focusedRoute.key);
|
|
34
|
+
|
|
35
|
+
const previousRoute = state.routes[state.index - 1];
|
|
36
|
+
if (!ancestorDestinationPairKey && previousRoute?.key) {
|
|
37
|
+
ancestorDestinationPairKey = createScreenPairKey(
|
|
38
|
+
previousRoute.key,
|
|
39
|
+
focusedRoute.key,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
24
42
|
}
|
|
25
43
|
}
|
|
26
44
|
parent = parent.getParent();
|
|
27
45
|
}
|
|
28
46
|
|
|
29
|
-
return
|
|
47
|
+
return {
|
|
48
|
+
ancestorKeys: ancestors,
|
|
49
|
+
ancestorDestinationPairKey,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function getAncestorKeys(current: BaseStackDescriptor): string[] {
|
|
54
|
+
return getAncestorKeyState(current).ancestorKeys;
|
|
30
55
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { StyleSheet, type View } from "react-native";
|
|
2
|
+
import Animated, {
|
|
3
|
+
type AnimatedRef,
|
|
4
|
+
useAnimatedRef,
|
|
5
|
+
} from "react-native-reanimated";
|
|
6
|
+
import createProvider from "../../utils/create-provider";
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
interface ContextValue {
|
|
12
|
+
originRef: AnimatedRef<View>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const { OriginProvider, useOriginContext } = createProvider("Origin", {
|
|
16
|
+
guarded: true,
|
|
17
|
+
})<Props, ContextValue>(({ children }) => {
|
|
18
|
+
const originRef = useAnimatedRef<View>();
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
value: {
|
|
22
|
+
originRef,
|
|
23
|
+
},
|
|
24
|
+
children: (
|
|
25
|
+
<Animated.View
|
|
26
|
+
style={styles.container}
|
|
27
|
+
collapsable={false}
|
|
28
|
+
ref={originRef}
|
|
29
|
+
>
|
|
30
|
+
{children}
|
|
31
|
+
</Animated.View>
|
|
32
|
+
),
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const styles = StyleSheet.create({
|
|
37
|
+
container: { flex: 1 },
|
|
38
|
+
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PORTAL_HOST_NAME_RESET_VALUE } from "../../../components/boundary/portal/utils/naming";
|
|
1
2
|
import {
|
|
2
3
|
NAVIGATION_MASK_CONTAINER_STYLE_ID,
|
|
3
4
|
NAVIGATION_MASK_ELEMENT_STYLE_ID,
|
|
@@ -59,6 +60,7 @@ export const STYLE_RESET_VALUES: Record<string, unknown> = {
|
|
|
59
60
|
};
|
|
60
61
|
|
|
61
62
|
export const PROP_RESET_VALUES: Record<string, unknown> = {
|
|
63
|
+
hostName: PORTAL_HOST_NAME_RESET_VALUE,
|
|
62
64
|
pointerEvents: "auto",
|
|
63
65
|
};
|
|
64
66
|
|
|
@@ -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}>
|
|
@@ -8,6 +8,7 @@ import { createStore } from "../utils/create-store";
|
|
|
8
8
|
export type AnimationStoreMap = {
|
|
9
9
|
transitionProgress: SharedValue<number>;
|
|
10
10
|
visualProgress: SharedValue<number>;
|
|
11
|
+
stackProgress: SharedValue<number>;
|
|
11
12
|
willAnimate: SharedValue<number>;
|
|
12
13
|
progressAnimating: SharedValue<number>;
|
|
13
14
|
progressSettled: SharedValue<number>;
|
|
@@ -19,6 +20,7 @@ function createAnimationBag(): AnimationStoreMap {
|
|
|
19
20
|
return {
|
|
20
21
|
transitionProgress: makeMutable(0),
|
|
21
22
|
visualProgress: makeMutable(0),
|
|
23
|
+
stackProgress: makeMutable(0),
|
|
22
24
|
willAnimate: makeMutable(0),
|
|
23
25
|
closing: makeMutable(0),
|
|
24
26
|
progressAnimating: makeMutable(0),
|
|
@@ -37,6 +39,7 @@ export const AnimationStore = createStore<AnimationStoreMap>({
|
|
|
37
39
|
disposeBag: (bag) => {
|
|
38
40
|
cancelAnimation(bag.transitionProgress);
|
|
39
41
|
cancelAnimation(bag.visualProgress);
|
|
42
|
+
cancelAnimation(bag.stackProgress);
|
|
40
43
|
cancelAnimation(bag.willAnimate);
|
|
41
44
|
cancelAnimation(bag.progressAnimating);
|
|
42
45
|
cancelAnimation(bag.progressSettled);
|