react-native-screen-transitions 3.4.0 → 3.5.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/README.md +5 -2
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +21 -32
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +2 -2
- package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +5 -5
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js +27 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js +7 -2
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js +110 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js +40 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js +79 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/{use-pre-transition-measurement.js → use-refresh-boundary.js} +26 -27
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -0
- package/lib/commonjs/shared/components/create-transition-aware-component.js +4 -13
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +1 -0
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +7 -10
- package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +3 -3
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +4 -5
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +4 -3
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +3 -3
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js +28 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/history/navigator-route-registry.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/{use-screen-events.js → history/use-screen-history.js} +17 -11
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/history/use-screen-history.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +140 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/{use-open-transition.js → use-open-transition-intent.js} +14 -24
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition-intent.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +53 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/index.js +17 -14
- package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -1
- package/lib/commonjs/shared/constants.js +6 -17
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/providers/register-bounds.provider.js +6 -9
- package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +26 -44
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js +19 -35
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +64 -38
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -2
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/types.js +4 -0
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +19 -5
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +1 -0
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/components/maybe-floating-container.js +29 -0
- package/lib/commonjs/shared/providers/screen/styles/components/maybe-floating-container.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/constants.js +36 -0
- package/lib/commonjs/shared/providers/screen/styles/constants.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js +49 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles.js +137 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +75 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +49 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +31 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js +33 -107
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/helpers/apply-measured-bounds-writes.js +13 -7
- package/lib/commonjs/shared/stores/bounds/helpers/apply-measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/helpers/keys.js +10 -0
- package/lib/commonjs/shared/stores/bounds/helpers/keys.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/index.js +26 -25
- package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/clear.js +13 -51
- package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/groups.js +27 -0
- package/lib/commonjs/shared/stores/bounds/internals/groups.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/internals/registry.js +210 -185
- package/lib/commonjs/shared/stores/bounds/internals/registry.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +2 -6
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/state.js +2 -3
- package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/commonjs/shared/stores/system.store.js +44 -11
- package/lib/commonjs/shared/stores/system.store.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js +4 -0
- package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js +6 -6
- package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +9 -3
- 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 +5 -8
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +2 -8
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/index.js +7 -5
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/zoom/build.js +44 -144
- package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/create-store.js +13 -4
- package/lib/commonjs/shared/utils/create-store.js.map +1 -1
- package/lib/commonjs/shared/utils/platform.js +1 -0
- package/lib/commonjs/shared/utils/platform.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +21 -32
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +2 -2
- package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +2 -2
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js +21 -0
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +7 -2
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js +105 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js +35 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-capture-source-boundary.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +74 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/{use-pre-transition-measurement.js → use-refresh-boundary.js} +24 -25
- package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -0
- package/lib/module/shared/components/create-transition-aware-component.js +4 -13
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/float-overlay.js +1 -0
- package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +8 -11
- package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js +3 -3
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +4 -5
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +4 -3
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/surface-container.js +3 -3
- package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js +24 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/history/navigator-route-registry.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/{use-screen-events.js → history/use-screen-history.js} +16 -10
- package/lib/module/shared/components/screen-lifecycle/hooks/history/use-screen-history.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +134 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/{use-open-transition.js → use-open-transition-intent.js} +13 -24
- package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition-intent.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +48 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/index.js +18 -15
- package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -1
- package/lib/module/shared/constants.js +5 -16
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/providers/register-bounds.provider.js +6 -9
- package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/animation.provider.js +22 -43
- package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js +19 -35
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +65 -39
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/resolve-screen-animation-target.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -2
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/types.js +2 -0
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js +19 -5
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +1 -0
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/components/maybe-floating-container.js +25 -0
- package/lib/module/shared/providers/screen/styles/components/maybe-floating-container.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/constants.js +31 -0
- package/lib/module/shared/providers/screen/styles/constants.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js +45 -0
- package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles.js +132 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +70 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +44 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +26 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/styles.provider.js +34 -108
- package/lib/module/shared/providers/screen/styles/styles.provider.js.map +1 -1
- package/lib/module/shared/stores/bounds/helpers/apply-measured-bounds-writes.js +13 -7
- package/lib/module/shared/stores/bounds/helpers/apply-measured-bounds-writes.js.map +1 -1
- package/lib/module/shared/stores/bounds/helpers/keys.js +8 -0
- package/lib/module/shared/stores/bounds/helpers/keys.js.map +1 -1
- package/lib/module/shared/stores/bounds/index.js +27 -26
- package/lib/module/shared/stores/bounds/index.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/clear.js +14 -52
- package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/groups.js +23 -0
- package/lib/module/shared/stores/bounds/internals/groups.js.map +1 -0
- package/lib/module/shared/stores/bounds/internals/registry.js +204 -178
- package/lib/module/shared/stores/bounds/internals/registry.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +2 -6
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/state.js +1 -2
- package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/module/shared/stores/system.store.js +43 -10
- package/lib/module/shared/stores/system.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js +4 -0
- package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-interpolators.js +6 -6
- package/lib/module/shared/utils/bounds/helpers/create-interpolators.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +9 -3
- 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 +5 -8
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js +3 -9
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/module/shared/utils/bounds/index.js +7 -5
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/zoom/build.js +46 -146
- package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/create-store.js +13 -4
- package/lib/module/shared/utils/create-store.js.map +1 -1
- package/lib/module/shared/utils/platform.js +1 -0
- package/lib/module/shared/utils/platform.js.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts +4 -4
- package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +8 -8
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts +5 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.d.ts +13 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-source-boundary.d.ts +10 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-capture-source-boundary.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/{use-boundary-measure-and-store.d.ts → use-measurer.d.ts} +6 -4
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +14 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts +2 -2
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts +6 -3
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +2 -2
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.d.ts +2 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/history/navigator-route-registry.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/history/use-screen-history.d.ts +7 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/history/use-screen-history.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts +11 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition-intent.d.ts +8 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition-intent.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts +11 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/index.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +1 -14
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +4 -4
- package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +7 -8
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts +0 -8
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +3 -3
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts +4 -6
- package/lib/typescript/shared/providers/screen/animation/helpers/resolve-screen-animation-target.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/types.d.ts +7 -0
- package/lib/typescript/shared/providers/screen/animation/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts +7 -0
- package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/constants.d.ts +23 -0
- package/lib/typescript/shared/providers/screen/styles/constants.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.d.ts +3 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles.d.ts +17 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +3 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +9 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts +9 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts +2 -2
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts +1 -7
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/helpers/apply-measured-bounds-writes.d.ts +1 -1
- package/lib/typescript/shared/stores/bounds/helpers/apply-measured-bounds-writes.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/helpers/keys.d.ts +1 -0
- package/lib/typescript/shared/stores/bounds/helpers/keys.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/index.d.ts +28 -27
- package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/groups.d.ts +4 -0
- package/lib/typescript/shared/stores/bounds/internals/groups.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/internals/registry.d.ts +12 -11
- package/lib/typescript/shared/stores/bounds/internals/registry.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 +1 -2
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +21 -19
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/stores/gesture.store.d.ts +1 -7
- package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/system.store.d.ts +33 -8
- package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +5 -25
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +7 -5
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +20 -0
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts +6 -2
- package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts +3 -2
- 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 +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/create-store.d.ts +13 -8
- package/lib/typescript/shared/utils/create-store.d.ts.map +1 -1
- package/lib/typescript/shared/utils/platform.d.ts +0 -3
- package/lib/typescript/shared/utils/platform.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/components/create-boundary-component/create-boundary-component.tsx +21 -39
- package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +3 -6
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +12 -12
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement.ts +43 -0
- package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +3 -8
- package/src/shared/components/create-boundary-component/hooks/use-capture-destination-boundary.ts +149 -0
- package/src/shared/components/create-boundary-component/hooks/use-capture-source-boundary.ts +42 -0
- package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +144 -0
- package/src/shared/components/create-boundary-component/hooks/{use-pre-transition-measurement.ts → use-refresh-boundary.ts} +35 -30
- package/src/shared/components/create-boundary-component/types.ts +7 -3
- package/src/shared/components/create-transition-aware-component.tsx +4 -13
- package/src/shared/components/overlay/variations/float-overlay.tsx +1 -1
- package/src/shared/components/screen-container/hooks/use-content-layout.ts +14 -11
- package/src/shared/components/screen-container/layers/backdrop.tsx +3 -3
- package/src/shared/components/screen-container/layers/content.tsx +4 -7
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +4 -5
- package/src/shared/components/screen-container/layers/surface-container.tsx +3 -3
- package/src/shared/components/screen-lifecycle/hooks/helpers/reset-stores-for-screen.ts +29 -0
- package/src/shared/components/screen-lifecycle/hooks/{use-screen-events.ts → history/use-screen-history.ts} +25 -9
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition-intent.ts +160 -0
- package/src/shared/components/screen-lifecycle/hooks/{use-open-transition.ts → use-open-transition-intent.ts} +19 -23
- package/src/shared/components/screen-lifecycle/hooks/use-transition-start-controller.ts +71 -0
- package/src/shared/components/screen-lifecycle/index.tsx +17 -17
- package/src/shared/constants.ts +3 -11
- package/src/shared/providers/register-bounds.provider.tsx +7 -12
- package/src/shared/providers/screen/animation/animation.provider.tsx +30 -68
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state.ts +20 -33
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +96 -69
- package/src/shared/providers/screen/animation/helpers/resolve-screen-animation-target.ts +5 -7
- package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +14 -2
- package/src/shared/providers/screen/animation/types.ts +9 -0
- package/src/shared/providers/screen/animation/use-screen-animation.tsx +25 -7
- package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +2 -0
- package/src/shared/providers/screen/styles/components/maybe-floating-container.tsx +29 -0
- package/src/shared/providers/screen/styles/constants.ts +34 -0
- package/src/shared/providers/screen/styles/helpers/normalize-slots.ts +61 -0
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles.ts +190 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +85 -0
- package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +51 -0
- package/src/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.tsx +40 -0
- package/src/shared/providers/screen/styles/styles.provider.tsx +42 -146
- package/src/shared/stores/bounds/helpers/apply-measured-bounds-writes.ts +15 -13
- package/src/shared/stores/bounds/helpers/keys.ts +8 -0
- package/src/shared/stores/bounds/index.ts +37 -44
- package/src/shared/stores/bounds/internals/clear.ts +22 -86
- package/src/shared/stores/bounds/internals/groups.ts +20 -0
- package/src/shared/stores/bounds/internals/registry.ts +280 -234
- package/src/shared/stores/bounds/internals/resolver.ts +1 -5
- package/src/shared/stores/bounds/internals/state.ts +2 -3
- package/src/shared/stores/bounds/types.ts +23 -21
- package/src/shared/stores/system.store.ts +77 -9
- package/src/shared/types/animation.types.ts +5 -25
- package/src/shared/types/bounds.types.ts +7 -8
- package/src/shared/types/screen.types.ts +21 -0
- package/src/shared/utils/bounds/helpers/create-bound-tag.ts +6 -2
- package/src/shared/utils/bounds/helpers/create-interpolators.ts +10 -7
- package/src/shared/utils/bounds/helpers/create-link-accessor.ts +12 -5
- package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +4 -7
- package/src/shared/utils/bounds/helpers/styles/compute.ts +2 -10
- package/src/shared/utils/bounds/index.ts +7 -6
- package/src/shared/utils/bounds/zoom/build.ts +53 -162
- package/src/shared/utils/bounds/zoom/types.ts +1 -1
- package/src/shared/utils/create-store.ts +39 -13
- package/src/shared/utils/platform.ts +2 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +0 -44
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +0 -84
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +0 -149
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js.map +0 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +0 -29
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +0 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js +0 -47
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js.map +0 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +0 -158
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +0 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js +0 -36
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js.map +0 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +0 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-screen-events.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/build-resolved-style-map.js +0 -144
- package/lib/commonjs/shared/providers/screen/styles/helpers/build-resolved-style-map.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js +0 -28
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/split-normalized-style-maps.js +0 -39
- package/lib/commonjs/shared/providers/screen/styles/helpers/split-normalized-style-maps.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/internals/presence.js +0 -125
- package/lib/commonjs/shared/stores/bounds/internals/presence.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +0 -39
- package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +0 -78
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +0 -145
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.js.map +0 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.js.map +0 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js +0 -24
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.js.map +0 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js +0 -42
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.js.map +0 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js +0 -153
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition/index.js.map +0 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js +0 -30
- package/lib/module/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.js.map +0 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-open-transition.js.map +0 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-screen-events.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/helpers/build-resolved-style-map.js +0 -139
- package/lib/module/shared/providers/screen/styles/helpers/build-resolved-style-map.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js +0 -23
- package/lib/module/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/helpers/split-normalized-style-maps.js +0 -34
- package/lib/module/shared/providers/screen/styles/helpers/split-normalized-style-maps.js.map +0 -1
- package/lib/module/shared/stores/bounds/internals/presence.js +0 -115
- package/lib/module/shared/stores/bounds/internals/presence.js.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts +0 -10
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts +0 -27
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.d.ts +0 -12
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/navigator-route-registry.d.ts.map +0 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts +0 -2
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.d.ts.map +0 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.d.ts +0 -2
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.d.ts.map +0 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts +0 -8
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition/index.d.ts.map +0 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.d.ts +0 -13
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.d.ts.map +0 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts +0 -12
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-open-transition.d.ts.map +0 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-screen-events.d.ts +0 -7
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-screen-events.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/build-resolved-style-map.d.ts +0 -11
- package/lib/typescript/shared/providers/screen/styles/helpers/build-resolved-style-map.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.d.ts +0 -7
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/split-normalized-style-maps.d.ts +0 -6
- package/lib/typescript/shared/providers/screen/styles/helpers/split-normalized-style-maps.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/internals/presence.d.ts +0 -12
- package/lib/typescript/shared/stores/bounds/internals/presence.d.ts.map +0 -1
- package/src/shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts +0 -56
- package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +0 -154
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +0 -223
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/reset-stores-for-screen.ts +0 -29
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition/helpers/use-navigator-history-registry.ts +0 -58
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition/index.ts +0 -183
- package/src/shared/components/screen-lifecycle/hooks/use-high-refresh-rate.ts +0 -34
- package/src/shared/providers/screen/styles/helpers/build-resolved-style-map.ts +0 -185
- package/src/shared/providers/screen/styles/helpers/resolve-interpolated-style-output.ts +0 -31
- package/src/shared/providers/screen/styles/helpers/split-normalized-style-maps.ts +0 -44
- package/src/shared/stores/bounds/internals/presence.ts +0 -145
- /package/lib/commonjs/shared/components/screen-lifecycle/hooks/{use-close-transition/helpers → history}/navigator-route-registry.js +0 -0
- /package/lib/module/shared/components/screen-lifecycle/hooks/{use-close-transition/helpers → history}/navigator-route-registry.js +0 -0
- /package/lib/typescript/shared/components/screen-lifecycle/hooks/{use-close-transition/helpers → history}/navigator-route-registry.d.ts +0 -0
- /package/src/shared/components/screen-lifecycle/hooks/{use-close-transition/helpers → history}/navigator-route-registry.ts +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/** biome-ignore-all lint/correctness/useHookAtTopLevel: STACK_TYPE is stable per navigator */
|
|
2
|
+
import { useLayoutEffect, useMemo, useRef } from "react";
|
|
3
|
+
import { useAnimatedReaction } from "react-native-reanimated";
|
|
4
|
+
import useStableCallback from "../../../hooks/use-stable-callback";
|
|
5
|
+
import {
|
|
6
|
+
type BaseDescriptor,
|
|
7
|
+
useDescriptorDerivations,
|
|
8
|
+
} from "../../../providers/screen/descriptors";
|
|
9
|
+
import { useStackCoreContext } from "../../../providers/stack/core.provider";
|
|
10
|
+
import { useManagedStackContext } from "../../../providers/stack/managed.provider";
|
|
11
|
+
import type { AnimationStoreMap } from "../../../stores/animation.store";
|
|
12
|
+
import { GestureStore } from "../../../stores/gesture.store";
|
|
13
|
+
import {
|
|
14
|
+
LifecycleTransitionRequestKind,
|
|
15
|
+
type SystemStoreActions,
|
|
16
|
+
type SystemStoreMap,
|
|
17
|
+
} from "../../../stores/system.store";
|
|
18
|
+
import { StackType } from "../../../types/stack.types";
|
|
19
|
+
import { resetStoresForScreen } from "./helpers/reset-stores-for-screen";
|
|
20
|
+
|
|
21
|
+
interface CloseHookParams {
|
|
22
|
+
current: BaseDescriptor;
|
|
23
|
+
animations: AnimationStoreMap;
|
|
24
|
+
requestLifecycleTransition: SystemStoreActions["requestLifecycleTransition"];
|
|
25
|
+
resetStores: () => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Managed close - reacts to closingRouteKeysShared from ManagedStackContext.
|
|
30
|
+
* Used by blank-stack and component-stack.
|
|
31
|
+
*/
|
|
32
|
+
const useManagedClose = ({
|
|
33
|
+
current,
|
|
34
|
+
requestLifecycleTransition,
|
|
35
|
+
resetStores,
|
|
36
|
+
}: CloseHookParams) => {
|
|
37
|
+
const { handleCloseRoute, closingRouteKeysShared } = useManagedStackContext();
|
|
38
|
+
const routeKey = current.route.key;
|
|
39
|
+
|
|
40
|
+
const handleManagedCloseEnd = useStableCallback((finished: boolean) => {
|
|
41
|
+
if (!finished) return;
|
|
42
|
+
handleCloseRoute({ route: current.route });
|
|
43
|
+
requestAnimationFrame(() => {
|
|
44
|
+
resetStores();
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
useAnimatedReaction(
|
|
49
|
+
() => {
|
|
50
|
+
const keys = closingRouteKeysShared.value;
|
|
51
|
+
return keys?.includes(routeKey) ?? false;
|
|
52
|
+
},
|
|
53
|
+
(isClosing, wasClosing) => {
|
|
54
|
+
if (!isClosing || wasClosing) return;
|
|
55
|
+
|
|
56
|
+
requestLifecycleTransition(
|
|
57
|
+
LifecycleTransitionRequestKind.ManagedClose,
|
|
58
|
+
0,
|
|
59
|
+
);
|
|
60
|
+
},
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
return { handleManagedCloseEnd };
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Native stack close - listens to beforeRemove navigation event.
|
|
68
|
+
*/
|
|
69
|
+
const useNativeStackClose = ({
|
|
70
|
+
current,
|
|
71
|
+
animations,
|
|
72
|
+
requestLifecycleTransition,
|
|
73
|
+
resetStores,
|
|
74
|
+
}: CloseHookParams) => {
|
|
75
|
+
const { parentScreenKey } = useDescriptorDerivations();
|
|
76
|
+
const pendingActionRef = useRef<any>(null);
|
|
77
|
+
|
|
78
|
+
const nearestAncestorDismissing = useMemo(() => {
|
|
79
|
+
if (!parentScreenKey) return null;
|
|
80
|
+
|
|
81
|
+
return GestureStore.peekBag(parentScreenKey)?.dismissing ?? null;
|
|
82
|
+
}, [parentScreenKey]);
|
|
83
|
+
|
|
84
|
+
const handleNativeCloseEnd = useStableCallback((finished: boolean) => {
|
|
85
|
+
if (!finished || !pendingActionRef.current) {
|
|
86
|
+
pendingActionRef.current = null;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
current.navigation.dispatch(pendingActionRef.current);
|
|
91
|
+
pendingActionRef.current = null;
|
|
92
|
+
requestAnimationFrame(() => {
|
|
93
|
+
resetStores();
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const handleBeforeRemove = useStableCallback((e: any) => {
|
|
98
|
+
const options = current.options as { enableTransitions?: boolean };
|
|
99
|
+
const isEnabled = options.enableTransitions;
|
|
100
|
+
const navigation = current.navigation;
|
|
101
|
+
const routeKey = current.route.key;
|
|
102
|
+
const state = navigation.getState();
|
|
103
|
+
const routeIndex = state.routes.findIndex(
|
|
104
|
+
(route) => route.key === routeKey,
|
|
105
|
+
);
|
|
106
|
+
const isFirstScreen = routeIndex <= 0;
|
|
107
|
+
|
|
108
|
+
if (!isEnabled || nearestAncestorDismissing?.get() || isFirstScreen) {
|
|
109
|
+
animations.closing.set(1);
|
|
110
|
+
resetStores();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
e.preventDefault();
|
|
115
|
+
pendingActionRef.current = e.data.action;
|
|
116
|
+
requestLifecycleTransition(LifecycleTransitionRequestKind.NativeClose, 0);
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: navigation listener should only rebind when the navigator instance changes
|
|
120
|
+
useLayoutEffect(() => {
|
|
121
|
+
return current.navigation.addListener?.("beforeRemove", handleBeforeRemove);
|
|
122
|
+
}, [current.navigation]);
|
|
123
|
+
|
|
124
|
+
return { handleNativeCloseEnd };
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Handles close transition intent and returns finish callbacks for cleanup.
|
|
129
|
+
*/
|
|
130
|
+
export function useCloseTransitionIntent(
|
|
131
|
+
current: BaseDescriptor,
|
|
132
|
+
animations: AnimationStoreMap,
|
|
133
|
+
system: SystemStoreMap,
|
|
134
|
+
): {
|
|
135
|
+
handleManagedCloseEnd?: (finished: boolean) => void;
|
|
136
|
+
handleNativeCloseEnd?: (finished: boolean) => void;
|
|
137
|
+
} {
|
|
138
|
+
const routeKey = current.route.key;
|
|
139
|
+
const { flags } = useStackCoreContext();
|
|
140
|
+
const { isBranchScreen, branchNavigatorKey } = useDescriptorDerivations();
|
|
141
|
+
const isNativeStack = flags.STACK_TYPE === StackType.NATIVE;
|
|
142
|
+
const { requestLifecycleTransition } = system.actions;
|
|
143
|
+
|
|
144
|
+
const resetStores = useStableCallback(() => {
|
|
145
|
+
resetStoresForScreen(routeKey, isBranchScreen, branchNavigatorKey);
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
const closeParams: CloseHookParams = {
|
|
149
|
+
current,
|
|
150
|
+
animations,
|
|
151
|
+
requestLifecycleTransition,
|
|
152
|
+
resetStores,
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
if (isNativeStack) {
|
|
156
|
+
return useNativeStackClose(closeParams);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return useManagedClose(closeParams);
|
|
160
|
+
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { useLayoutEffect } from "react";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
type BaseDescriptor,
|
|
4
|
+
useDescriptorDerivations,
|
|
5
|
+
} from "../../../providers/screen/descriptors";
|
|
4
6
|
import type { AnimationStoreMap } from "../../../stores/animation.store";
|
|
7
|
+
import {
|
|
8
|
+
LifecycleTransitionRequestKind,
|
|
9
|
+
type SystemStoreMap,
|
|
10
|
+
} from "../../../stores/system.store";
|
|
5
11
|
import type { SnapPoint } from "../../../types/screen.types";
|
|
6
|
-
import { animateToProgress } from "../../../utils/animation/animate-to-progress";
|
|
7
|
-
import { useHighRefreshRate } from "./use-high-refresh-rate";
|
|
8
12
|
|
|
9
13
|
/**
|
|
10
14
|
* Calculates the initial progress value based on snap points configuration.
|
|
@@ -30,17 +34,15 @@ function getInitialProgress({
|
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
/**
|
|
33
|
-
* Handles opening
|
|
34
|
-
* Returns activate/deactivate functions for high refresh rate.
|
|
37
|
+
* Handles opening transition intent on mount.
|
|
35
38
|
*/
|
|
36
|
-
export function
|
|
39
|
+
export function useOpenTransitionIntent(
|
|
37
40
|
current: BaseDescriptor,
|
|
38
41
|
animations: AnimationStoreMap,
|
|
39
|
-
|
|
40
|
-
isFirstKey: boolean,
|
|
42
|
+
system: SystemStoreMap,
|
|
41
43
|
) {
|
|
42
|
-
const {
|
|
43
|
-
|
|
44
|
+
const { isFirstKey } = useDescriptorDerivations();
|
|
45
|
+
const { requestLifecycleTransition } = system.actions;
|
|
44
46
|
|
|
45
47
|
// biome-ignore lint/correctness/useExhaustiveDependencies: Must only run once on mount
|
|
46
48
|
useLayoutEffect(() => {
|
|
@@ -57,11 +59,11 @@ export function useOpenTransition(
|
|
|
57
59
|
|
|
58
60
|
if (isFirstKey && !experimental_animateOnInitialMount) {
|
|
59
61
|
if (initialProgress === "auto") {
|
|
60
|
-
|
|
62
|
+
system.targetProgress.set(0);
|
|
61
63
|
animations.progress.set(0);
|
|
62
64
|
} else {
|
|
63
65
|
const target = initialProgress ?? 1;
|
|
64
|
-
|
|
66
|
+
system.targetProgress.set(target);
|
|
65
67
|
animations.progress.set(target);
|
|
66
68
|
}
|
|
67
69
|
animations.animating.set(0);
|
|
@@ -76,15 +78,9 @@ export function useOpenTransition(
|
|
|
76
78
|
return;
|
|
77
79
|
}
|
|
78
80
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
animations,
|
|
84
|
-
targetProgress: targetProgressValue,
|
|
85
|
-
onAnimationFinish: deactivateHighRefreshRate,
|
|
86
|
-
});
|
|
81
|
+
requestLifecycleTransition(
|
|
82
|
+
LifecycleTransitionRequestKind.Open,
|
|
83
|
+
initialProgress ?? 1,
|
|
84
|
+
);
|
|
87
85
|
}, []);
|
|
88
|
-
|
|
89
|
-
return { activateHighRefreshRate, deactivateHighRefreshRate };
|
|
90
86
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { useAnimatedReaction } from "react-native-reanimated";
|
|
2
|
+
import type { BaseDescriptor } from "../../../providers/screen/descriptors";
|
|
3
|
+
import type { AnimationStoreMap } from "../../../stores/animation.store";
|
|
4
|
+
import {
|
|
5
|
+
LifecycleTransitionRequestKind,
|
|
6
|
+
type SystemStoreMap,
|
|
7
|
+
} from "../../../stores/system.store";
|
|
8
|
+
import { animateToProgress } from "../../../utils/animation/animate-to-progress";
|
|
9
|
+
|
|
10
|
+
export const useTransitionStartController = ({
|
|
11
|
+
current,
|
|
12
|
+
animations,
|
|
13
|
+
system,
|
|
14
|
+
onManagedCloseFinish,
|
|
15
|
+
onNativeCloseFinish,
|
|
16
|
+
}: {
|
|
17
|
+
current: BaseDescriptor;
|
|
18
|
+
animations: AnimationStoreMap;
|
|
19
|
+
system: SystemStoreMap;
|
|
20
|
+
onManagedCloseFinish?: (finished: boolean) => void;
|
|
21
|
+
onNativeCloseFinish?: (finished: boolean) => void;
|
|
22
|
+
}) => {
|
|
23
|
+
const {
|
|
24
|
+
targetProgress,
|
|
25
|
+
pendingLifecycleRequestKind,
|
|
26
|
+
pendingLifecycleRequestTarget,
|
|
27
|
+
pendingLifecycleStartBlockCount,
|
|
28
|
+
} = system;
|
|
29
|
+
const { clearLifecycleTransitionRequest } = system.actions;
|
|
30
|
+
const transitionSpec = current.options.transitionSpec;
|
|
31
|
+
|
|
32
|
+
useAnimatedReaction(
|
|
33
|
+
() => {
|
|
34
|
+
"worklet";
|
|
35
|
+
return [
|
|
36
|
+
pendingLifecycleRequestKind.get(),
|
|
37
|
+
pendingLifecycleRequestTarget.get(),
|
|
38
|
+
pendingLifecycleStartBlockCount.get(),
|
|
39
|
+
] as const;
|
|
40
|
+
},
|
|
41
|
+
(next) => {
|
|
42
|
+
"worklet";
|
|
43
|
+
const [kind, target, blockCount] = next;
|
|
44
|
+
|
|
45
|
+
if (kind === LifecycleTransitionRequestKind.None) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (blockCount > 0) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const onAnimationFinish =
|
|
54
|
+
kind === LifecycleTransitionRequestKind.ManagedClose
|
|
55
|
+
? onManagedCloseFinish
|
|
56
|
+
: kind === LifecycleTransitionRequestKind.NativeClose
|
|
57
|
+
? onNativeCloseFinish
|
|
58
|
+
: undefined;
|
|
59
|
+
|
|
60
|
+
animateToProgress({
|
|
61
|
+
target,
|
|
62
|
+
spec: transitionSpec,
|
|
63
|
+
animations,
|
|
64
|
+
targetProgress,
|
|
65
|
+
onAnimationFinish,
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
clearLifecycleTransitionRequest();
|
|
69
|
+
},
|
|
70
|
+
);
|
|
71
|
+
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useDescriptorDerivations,
|
|
3
|
-
useDescriptors,
|
|
4
|
-
} from "../../providers/screen/descriptors";
|
|
1
|
+
import { useDescriptors } from "../../providers/screen/descriptors";
|
|
5
2
|
import { AnimationStore } from "../../stores/animation.store";
|
|
6
3
|
import { SystemStore } from "../../stores/system.store";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { useScreenHistory } from "./hooks/history/use-screen-history";
|
|
5
|
+
import { useCloseTransitionIntent } from "./hooks/use-close-transition-intent";
|
|
6
|
+
import { useOpenTransitionIntent } from "./hooks/use-open-transition-intent";
|
|
7
|
+
import { useTransitionStartController } from "./hooks/use-transition-start-controller";
|
|
10
8
|
|
|
11
9
|
interface Props {
|
|
12
10
|
children: React.ReactNode;
|
|
@@ -18,22 +16,24 @@ interface Props {
|
|
|
18
16
|
*/
|
|
19
17
|
export const ScreenLifecycle = ({ children }: Props) => {
|
|
20
18
|
const { current, previous } = useDescriptors();
|
|
21
|
-
|
|
19
|
+
|
|
22
20
|
const animations = AnimationStore.getBag(current.route.key);
|
|
23
|
-
const
|
|
21
|
+
const system = SystemStore.getBag(current.route.key);
|
|
22
|
+
|
|
23
|
+
const { handleManagedCloseEnd, handleNativeCloseEnd } =
|
|
24
|
+
useCloseTransitionIntent(current, animations, system);
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
useOpenTransition(current, animations, targetProgress, isFirstKey);
|
|
26
|
+
useOpenTransitionIntent(current, animations, system);
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
useTransitionStartController({
|
|
29
29
|
current,
|
|
30
30
|
animations,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
);
|
|
31
|
+
system,
|
|
32
|
+
onManagedCloseFinish: handleManagedCloseEnd,
|
|
33
|
+
onNativeCloseFinish: handleNativeCloseEnd,
|
|
34
|
+
});
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
useScreenHistory(current, previous, animations);
|
|
37
37
|
|
|
38
38
|
return children;
|
|
39
39
|
};
|
package/src/shared/constants.ts
CHANGED
|
@@ -25,7 +25,6 @@ export const NAVIGATION_MASK_CONTAINER_STYLE_ID =
|
|
|
25
25
|
* Styles
|
|
26
26
|
*/
|
|
27
27
|
export const NO_STYLES = Object.freeze({});
|
|
28
|
-
export const HIDDEN_STYLE = Object.freeze({ opacity: 0 });
|
|
29
28
|
export const VISIBLE_STYLE = Object.freeze({ opacity: 1 });
|
|
30
29
|
export const NO_PROPS = Object.freeze({});
|
|
31
30
|
|
|
@@ -54,6 +53,7 @@ const DEFAULT_GESTURE_VALUES = {
|
|
|
54
53
|
export const createScreenTransitionState = (
|
|
55
54
|
route: BaseStackRoute,
|
|
56
55
|
meta?: Record<string, unknown>,
|
|
56
|
+
navigationMaskEnabled = false,
|
|
57
57
|
): ScreenTransitionState => ({
|
|
58
58
|
progress: 0,
|
|
59
59
|
closing: 0,
|
|
@@ -70,6 +70,7 @@ export const createScreenTransitionState = (
|
|
|
70
70
|
width: 0,
|
|
71
71
|
height: 0,
|
|
72
72
|
},
|
|
73
|
+
navigationMaskEnabled,
|
|
73
74
|
},
|
|
74
75
|
snapIndex: -1,
|
|
75
76
|
});
|
|
@@ -93,6 +94,7 @@ export const DEFAULT_SCREEN_TRANSITION_STATE: ScreenTransitionState =
|
|
|
93
94
|
width: 0,
|
|
94
95
|
height: 0,
|
|
95
96
|
},
|
|
97
|
+
navigationMaskEnabled: false,
|
|
96
98
|
},
|
|
97
99
|
snapIndex: -1,
|
|
98
100
|
});
|
|
@@ -100,16 +102,6 @@ export const DEFAULT_SCREEN_TRANSITION_STATE: ScreenTransitionState =
|
|
|
100
102
|
/**
|
|
101
103
|
* Bounds API Defaults
|
|
102
104
|
*/
|
|
103
|
-
export const EMPTY_BOUND_HELPER_RESULT = Object.freeze({});
|
|
104
|
-
export const EMPTY_BOUND_HELPER_RESULT_RAW = Object.freeze({
|
|
105
|
-
scaleX: 1,
|
|
106
|
-
scaleY: 1,
|
|
107
|
-
scale: 1,
|
|
108
|
-
translateX: 0,
|
|
109
|
-
translateY: 0,
|
|
110
|
-
width: 0,
|
|
111
|
-
height: 0,
|
|
112
|
-
});
|
|
113
105
|
export const TRANSFORM_RESET = Object.freeze({
|
|
114
106
|
transform: [
|
|
115
107
|
{ translateX: 0 },
|
|
@@ -18,7 +18,6 @@ import { BoundStore } from "../stores/bounds";
|
|
|
18
18
|
import { applyMeasuredBoundsWrites } from "../stores/bounds/helpers/apply-measured-bounds-writes";
|
|
19
19
|
import { prepareStyleForBounds } from "../utils/bounds/helpers/styles/styles";
|
|
20
20
|
import createProvider from "../utils/create-provider";
|
|
21
|
-
import { useLayoutAnchorContext } from "./layout-anchor.provider";
|
|
22
21
|
import { useDescriptorDerivations, useDescriptors } from "./screen/descriptors";
|
|
23
22
|
|
|
24
23
|
interface MaybeMeasureAndStoreParams {
|
|
@@ -246,7 +245,6 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
|
|
|
246
245
|
useDescriptorDerivations();
|
|
247
246
|
const currentScreenKey = current.route.key;
|
|
248
247
|
const selectedNextRouteId = getRouteParamId(next?.route);
|
|
249
|
-
const layoutAnchor = useLayoutAnchorContext();
|
|
250
248
|
|
|
251
249
|
// Context & signals
|
|
252
250
|
const parentContext = useRegisterBoundsContext();
|
|
@@ -278,7 +276,7 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
|
|
|
278
276
|
}
|
|
279
277
|
|
|
280
278
|
if (shouldSetSource && isAnimating.get()) {
|
|
281
|
-
const existing = BoundStore.
|
|
279
|
+
const existing = BoundStore.entry.getMeasured(
|
|
282
280
|
sharedBoundTag,
|
|
283
281
|
currentScreenKey,
|
|
284
282
|
);
|
|
@@ -299,12 +297,13 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
|
|
|
299
297
|
return;
|
|
300
298
|
}
|
|
301
299
|
|
|
302
|
-
const hasPendingLink =
|
|
303
|
-
|
|
300
|
+
const hasPendingLink =
|
|
301
|
+
BoundStore.link.getPending(sharedBoundTag) !== null;
|
|
302
|
+
const hasSourceLink = BoundStore.link.hasSource(
|
|
304
303
|
sharedBoundTag,
|
|
305
304
|
currentScreenKey,
|
|
306
305
|
);
|
|
307
|
-
const hasDestinationLink = BoundStore.
|
|
306
|
+
const hasDestinationLink = BoundStore.link.hasDestination(
|
|
308
307
|
sharedBoundTag,
|
|
309
308
|
currentScreenKey,
|
|
310
309
|
);
|
|
@@ -338,21 +337,17 @@ const registerBoundsBundle = createProvider("RegisterBounds", {
|
|
|
338
337
|
return;
|
|
339
338
|
}
|
|
340
339
|
|
|
341
|
-
const correctedMeasured = layoutAnchor
|
|
342
|
-
? layoutAnchor.correctMeasurement(measured)
|
|
343
|
-
: measured;
|
|
344
|
-
|
|
345
340
|
emitUpdate();
|
|
346
341
|
|
|
347
342
|
applyMeasuredBoundsWrites({
|
|
348
343
|
sharedBoundTag,
|
|
349
344
|
currentScreenKey,
|
|
350
|
-
measured
|
|
345
|
+
measured,
|
|
351
346
|
preparedStyles,
|
|
352
347
|
ancestorKeys,
|
|
353
348
|
navigatorKey,
|
|
354
349
|
ancestorNavigatorKeys,
|
|
355
|
-
|
|
350
|
+
shouldWriteEntry: true,
|
|
356
351
|
shouldSetSource: canSetSource,
|
|
357
352
|
shouldUpdateSource: canUpdateSource,
|
|
358
353
|
shouldSetDestination: canSetDestination,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import type { ScreenInterpolationProps } from "../../../types/animation.types";
|
|
1
|
+
import { type ReactNode, useContext } from "react";
|
|
2
|
+
import createProvider from "../../../utils/create-provider";
|
|
4
3
|
import { useScreenAnimationPipeline } from "./helpers/pipeline";
|
|
4
|
+
import type { ScreenAnimationSource } from "./types";
|
|
5
5
|
|
|
6
6
|
type Props = {
|
|
7
7
|
children: ReactNode;
|
|
@@ -10,15 +10,20 @@ type Props = {
|
|
|
10
10
|
export type ScreenAnimationContextValue = ReturnType<
|
|
11
11
|
typeof useScreenAnimationPipeline
|
|
12
12
|
> & {
|
|
13
|
-
|
|
14
|
-
ancestorScreenAnimations: DerivedValue<ScreenInterpolationProps>[];
|
|
13
|
+
ancestorScreenAnimationSources: ScreenAnimationSource[];
|
|
15
14
|
};
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
export type ScreenAnimationContextResult = {
|
|
17
|
+
value: ScreenAnimationContextValue;
|
|
18
|
+
};
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
export const {
|
|
21
|
+
ScreenAnimationProvider,
|
|
22
|
+
ScreenAnimationContext,
|
|
23
|
+
useScreenAnimationContext,
|
|
24
|
+
} = createProvider("ScreenAnimation", {
|
|
25
|
+
guarded: true,
|
|
26
|
+
})<Props, ScreenAnimationContextValue>((): ScreenAnimationContextResult => {
|
|
22
27
|
const parentContext = useContext(ScreenAnimationContext);
|
|
23
28
|
|
|
24
29
|
const {
|
|
@@ -28,66 +33,23 @@ function ScreenAnimationProvider({ children }: Props) {
|
|
|
28
33
|
boundsAccessor,
|
|
29
34
|
} = useScreenAnimationPipeline();
|
|
30
35
|
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return [
|
|
46
|
-
parentContext.screenAnimation,
|
|
47
|
-
...parentContext.ancestorScreenAnimations,
|
|
48
|
-
];
|
|
49
|
-
}, [parentContext]);
|
|
50
|
-
|
|
51
|
-
const value = useMemo(
|
|
52
|
-
() => ({
|
|
53
|
-
screenInterpolatorProps,
|
|
54
|
-
nextInterpolator,
|
|
55
|
-
currentInterpolator,
|
|
56
|
-
boundsAccessor,
|
|
57
|
-
screenAnimation,
|
|
58
|
-
ancestorScreenAnimations,
|
|
59
|
-
}),
|
|
60
|
-
[
|
|
36
|
+
const ancestorScreenAnimationSources = parentContext
|
|
37
|
+
? [
|
|
38
|
+
{
|
|
39
|
+
screenInterpolatorProps: parentContext.screenInterpolatorProps,
|
|
40
|
+
boundsAccessor: parentContext.boundsAccessor,
|
|
41
|
+
},
|
|
42
|
+
...parentContext.ancestorScreenAnimationSources,
|
|
43
|
+
]
|
|
44
|
+
: [];
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
value: {
|
|
61
48
|
screenInterpolatorProps,
|
|
62
49
|
nextInterpolator,
|
|
63
50
|
currentInterpolator,
|
|
64
51
|
boundsAccessor,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return (
|
|
71
|
-
<ScreenAnimationContext.Provider value={value}>
|
|
72
|
-
{children}
|
|
73
|
-
</ScreenAnimationContext.Provider>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function useScreenAnimationContext(): ScreenAnimationContextValue {
|
|
78
|
-
const context = useContext(ScreenAnimationContext);
|
|
79
|
-
|
|
80
|
-
if (!context) {
|
|
81
|
-
throw new Error(
|
|
82
|
-
"ScreenAnimation context must be used within a ScreenAnimationProvider",
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return context;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export {
|
|
90
|
-
ScreenAnimationContext,
|
|
91
|
-
ScreenAnimationProvider,
|
|
92
|
-
useScreenAnimationContext,
|
|
93
|
-
};
|
|
52
|
+
ancestorScreenAnimationSources,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
});
|