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,144 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import type { View } from "react-native";
|
|
3
|
+
import { useWindowDimensions } from "react-native";
|
|
4
|
+
import {
|
|
5
|
+
type AnimatedRef,
|
|
6
|
+
measure,
|
|
7
|
+
type StyleProps,
|
|
8
|
+
} from "react-native-reanimated";
|
|
9
|
+
import { BoundStore } from "../../../stores/bounds";
|
|
10
|
+
import { applyMeasuredBoundsWrites } from "../../../stores/bounds/helpers/apply-measured-bounds-writes";
|
|
11
|
+
import { resolvePendingSourceKey } from "../helpers/resolve-pending-source-key";
|
|
12
|
+
import type { MeasureParams } from "../types";
|
|
13
|
+
import {
|
|
14
|
+
areMeasurementsEqual,
|
|
15
|
+
isMeasurementInViewport,
|
|
16
|
+
} from "./helpers/measurement";
|
|
17
|
+
import {
|
|
18
|
+
getMeasureIntentFlags,
|
|
19
|
+
resolveMeasureWritePlan,
|
|
20
|
+
} from "./helpers/measurement-rules";
|
|
21
|
+
|
|
22
|
+
interface UseMeasurerParams {
|
|
23
|
+
enabled: boolean;
|
|
24
|
+
sharedBoundTag: string;
|
|
25
|
+
preferredSourceScreenKey?: string;
|
|
26
|
+
currentScreenKey: string;
|
|
27
|
+
ancestorKeys: string[];
|
|
28
|
+
navigatorKey?: string;
|
|
29
|
+
ancestorNavigatorKeys?: string[];
|
|
30
|
+
preparedStyles: StyleProps;
|
|
31
|
+
measuredAnimatedRef: AnimatedRef<View>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const useMeasurer = ({
|
|
35
|
+
enabled,
|
|
36
|
+
sharedBoundTag,
|
|
37
|
+
preferredSourceScreenKey,
|
|
38
|
+
currentScreenKey,
|
|
39
|
+
ancestorKeys,
|
|
40
|
+
navigatorKey,
|
|
41
|
+
ancestorNavigatorKeys,
|
|
42
|
+
preparedStyles,
|
|
43
|
+
measuredAnimatedRef,
|
|
44
|
+
}: UseMeasurerParams) => {
|
|
45
|
+
const { width: viewportWidth, height: viewportHeight } =
|
|
46
|
+
useWindowDimensions();
|
|
47
|
+
|
|
48
|
+
return useCallback(
|
|
49
|
+
({ intent }: MeasureParams = {}) => {
|
|
50
|
+
"worklet";
|
|
51
|
+
if (!enabled) return;
|
|
52
|
+
|
|
53
|
+
const intents = getMeasureIntentFlags(intent);
|
|
54
|
+
|
|
55
|
+
const expectedSourceScreenKey: string | undefined =
|
|
56
|
+
resolvePendingSourceKey(sharedBoundTag, preferredSourceScreenKey) ||
|
|
57
|
+
undefined;
|
|
58
|
+
|
|
59
|
+
const pendingLink = expectedSourceScreenKey
|
|
60
|
+
? BoundStore.link.getPending(sharedBoundTag, expectedSourceScreenKey)
|
|
61
|
+
: BoundStore.link.getPending(sharedBoundTag);
|
|
62
|
+
const hasPendingLink = pendingLink !== null;
|
|
63
|
+
const hasAttachableSourceLink = expectedSourceScreenKey
|
|
64
|
+
? BoundStore.link.hasSource(sharedBoundTag, expectedSourceScreenKey)
|
|
65
|
+
: false;
|
|
66
|
+
const hasSourceLink = BoundStore.link.hasSource(
|
|
67
|
+
sharedBoundTag,
|
|
68
|
+
currentScreenKey,
|
|
69
|
+
);
|
|
70
|
+
const hasDestinationLink = BoundStore.link.hasDestination(
|
|
71
|
+
sharedBoundTag,
|
|
72
|
+
currentScreenKey,
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
const writePlan = resolveMeasureWritePlan({
|
|
76
|
+
intents,
|
|
77
|
+
hasPendingLink,
|
|
78
|
+
hasSourceLink,
|
|
79
|
+
hasDestinationLink,
|
|
80
|
+
hasAttachableSourceLink,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
if (!writePlan.writesAny) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const measured = measure(measuredAnimatedRef);
|
|
88
|
+
if (!measured) return;
|
|
89
|
+
|
|
90
|
+
const destinationInViewport =
|
|
91
|
+
!writePlan.wantsDestinationWrite ||
|
|
92
|
+
isMeasurementInViewport(measured, viewportWidth, viewportHeight);
|
|
93
|
+
|
|
94
|
+
if (
|
|
95
|
+
!destinationInViewport &&
|
|
96
|
+
!writePlan.captureSource &&
|
|
97
|
+
!writePlan.refreshSource
|
|
98
|
+
) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const existingMeasuredEntry = BoundStore.entry.getMeasured(
|
|
103
|
+
sharedBoundTag,
|
|
104
|
+
currentScreenKey,
|
|
105
|
+
);
|
|
106
|
+
const hasMeasuredEntryChanged =
|
|
107
|
+
!existingMeasuredEntry ||
|
|
108
|
+
!areMeasurementsEqual(existingMeasuredEntry.bounds, measured);
|
|
109
|
+
|
|
110
|
+
applyMeasuredBoundsWrites({
|
|
111
|
+
sharedBoundTag,
|
|
112
|
+
currentScreenKey,
|
|
113
|
+
measured,
|
|
114
|
+
preparedStyles,
|
|
115
|
+
ancestorKeys,
|
|
116
|
+
navigatorKey,
|
|
117
|
+
ancestorNavigatorKeys,
|
|
118
|
+
expectedSourceScreenKey,
|
|
119
|
+
shouldWriteEntry: hasMeasuredEntryChanged,
|
|
120
|
+
shouldSetSource: writePlan.captureSource,
|
|
121
|
+
shouldUpdateSource: writePlan.refreshSource && hasMeasuredEntryChanged,
|
|
122
|
+
shouldUpdateDestination:
|
|
123
|
+
writePlan.refreshDestination &&
|
|
124
|
+
destinationInViewport &&
|
|
125
|
+
hasMeasuredEntryChanged,
|
|
126
|
+
shouldSetDestination:
|
|
127
|
+
writePlan.completeDestination && destinationInViewport,
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
[
|
|
131
|
+
enabled,
|
|
132
|
+
sharedBoundTag,
|
|
133
|
+
preferredSourceScreenKey,
|
|
134
|
+
currentScreenKey,
|
|
135
|
+
ancestorKeys,
|
|
136
|
+
navigatorKey,
|
|
137
|
+
ancestorNavigatorKeys,
|
|
138
|
+
preparedStyles,
|
|
139
|
+
measuredAnimatedRef,
|
|
140
|
+
viewportWidth,
|
|
141
|
+
viewportHeight,
|
|
142
|
+
],
|
|
143
|
+
);
|
|
144
|
+
};
|
|
@@ -2,13 +2,9 @@ import { useAnimatedReaction } from "react-native-reanimated";
|
|
|
2
2
|
import { AnimationStore } from "../../../stores/animation.store";
|
|
3
3
|
import { BoundStore } from "../../../stores/bounds";
|
|
4
4
|
import { GestureStore } from "../../../stores/gesture.store";
|
|
5
|
-
import type { BoundaryId,
|
|
6
|
-
import {
|
|
7
|
-
PREPARE_DESTINATION_MEASUREMENT_INTENT,
|
|
8
|
-
resolvePrepareSourceMeasurementIntent,
|
|
9
|
-
} from "./helpers/measurement-rules";
|
|
5
|
+
import type { BoundaryId, MeasureParams } from "../types";
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
interface UseRefreshBoundaryParams {
|
|
12
8
|
enabled: boolean;
|
|
13
9
|
sharedBoundTag: string;
|
|
14
10
|
id: BoundaryId;
|
|
@@ -16,19 +12,19 @@ export const usePreTransitionMeasurement = (params: {
|
|
|
16
12
|
currentScreenKey: string;
|
|
17
13
|
nextScreenKey?: string;
|
|
18
14
|
hasNextScreen: boolean;
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
const {
|
|
22
|
-
enabled,
|
|
23
|
-
sharedBoundTag,
|
|
24
|
-
id,
|
|
25
|
-
group,
|
|
26
|
-
currentScreenKey,
|
|
27
|
-
nextScreenKey,
|
|
28
|
-
hasNextScreen,
|
|
29
|
-
maybeMeasureAndStore,
|
|
30
|
-
} = params;
|
|
15
|
+
measureBoundary: (options: MeasureParams) => void;
|
|
16
|
+
}
|
|
31
17
|
|
|
18
|
+
export const useRefreshBoundary = ({
|
|
19
|
+
enabled,
|
|
20
|
+
sharedBoundTag,
|
|
21
|
+
id,
|
|
22
|
+
group,
|
|
23
|
+
currentScreenKey,
|
|
24
|
+
nextScreenKey,
|
|
25
|
+
hasNextScreen,
|
|
26
|
+
measureBoundary,
|
|
27
|
+
}: UseRefreshBoundaryParams) => {
|
|
32
28
|
const currentWillAnimate = AnimationStore.getValue(
|
|
33
29
|
currentScreenKey,
|
|
34
30
|
"willAnimate",
|
|
@@ -56,7 +52,7 @@ export const usePreTransitionMeasurement = (params: {
|
|
|
56
52
|
if (nextValue === 0 || nextValue === previousValue) return;
|
|
57
53
|
|
|
58
54
|
const currentGroupActiveId = group
|
|
59
|
-
? BoundStore.
|
|
55
|
+
? BoundStore.group.getActiveId(group)
|
|
60
56
|
: null;
|
|
61
57
|
|
|
62
58
|
if (group && currentGroupActiveId !== String(id)) {
|
|
@@ -65,25 +61,27 @@ export const usePreTransitionMeasurement = (params: {
|
|
|
65
61
|
|
|
66
62
|
const shouldCancelMeasurement =
|
|
67
63
|
!!nextAnimating?.get() && !!nextDragging?.get();
|
|
64
|
+
|
|
68
65
|
if (shouldCancelMeasurement) {
|
|
69
66
|
return;
|
|
70
67
|
}
|
|
71
68
|
|
|
72
|
-
const hasSourceLink = BoundStore.
|
|
69
|
+
const hasSourceLink = BoundStore.link.hasSource(
|
|
73
70
|
sharedBoundTag,
|
|
74
71
|
currentScreenKey,
|
|
75
72
|
);
|
|
76
73
|
|
|
77
|
-
const intent =
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
const intent = !hasSourceLink
|
|
75
|
+
? "capture-source"
|
|
76
|
+
: group
|
|
77
|
+
? "refresh-source"
|
|
78
|
+
: null;
|
|
81
79
|
|
|
82
80
|
if (!intent) {
|
|
83
81
|
return;
|
|
84
82
|
}
|
|
85
83
|
|
|
86
|
-
|
|
84
|
+
measureBoundary({ intent });
|
|
87
85
|
},
|
|
88
86
|
);
|
|
89
87
|
|
|
@@ -93,17 +91,24 @@ export const usePreTransitionMeasurement = (params: {
|
|
|
93
91
|
"worklet";
|
|
94
92
|
if (!enabled || hasNextScreen) return;
|
|
95
93
|
if (nextValue === 0 || nextValue === previousValue) return;
|
|
94
|
+
|
|
96
95
|
const currentGroupActiveId = group
|
|
97
|
-
? BoundStore.
|
|
96
|
+
? BoundStore.group.getActiveId(group)
|
|
98
97
|
: null;
|
|
99
|
-
|
|
98
|
+
|
|
99
|
+
if (group && currentGroupActiveId !== String(id)) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
100
102
|
|
|
101
103
|
const shouldCancelMeasurement =
|
|
102
104
|
!!currentAnimating.get() && !!currentDragging.get();
|
|
103
|
-
if (shouldCancelMeasurement) return;
|
|
104
105
|
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
if (shouldCancelMeasurement) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
measureBoundary({
|
|
111
|
+
intent: ["complete-destination", "refresh-destination"] as const,
|
|
107
112
|
});
|
|
108
113
|
},
|
|
109
114
|
);
|
|
@@ -39,12 +39,16 @@ export type BoundaryComponentProps<P extends object> = Omit<P, "id"> &
|
|
|
39
39
|
/** Convenience alias for a View-based boundary (the most common case). */
|
|
40
40
|
export type BoundaryProps = BoundaryComponentProps<ViewProps>;
|
|
41
41
|
|
|
42
|
-
export type
|
|
42
|
+
export type MeasureIntent =
|
|
43
43
|
| "capture-source"
|
|
44
44
|
| "complete-destination"
|
|
45
45
|
| "refresh-source"
|
|
46
46
|
| "refresh-destination";
|
|
47
47
|
|
|
48
|
-
export
|
|
49
|
-
|
|
48
|
+
export type MeasurementIntent = MeasureIntent;
|
|
49
|
+
|
|
50
|
+
export interface MeasureParams {
|
|
51
|
+
intent?: MeasureIntent | readonly MeasureIntent[];
|
|
50
52
|
}
|
|
53
|
+
|
|
54
|
+
export interface MaybeMeasureAndStoreParams extends MeasureParams {}
|
|
@@ -101,26 +101,17 @@ export function createTransitionAwareComponent<P extends object>(
|
|
|
101
101
|
} = props as any;
|
|
102
102
|
|
|
103
103
|
const animatedRef = useAnimatedRef<View>();
|
|
104
|
-
const {
|
|
104
|
+
const { stylesMap } = useScreenStyles();
|
|
105
105
|
const associatedId = sharedBoundTag || styleId;
|
|
106
106
|
|
|
107
107
|
const associatedStyles = useAnimatedStyle(() => {
|
|
108
108
|
"worklet";
|
|
109
109
|
|
|
110
110
|
if (!associatedId) {
|
|
111
|
-
return
|
|
111
|
+
return NO_STYLES;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
(elementStylesMap.value[associatedId]?.style as
|
|
116
|
-
| Record<string, any>
|
|
117
|
-
| undefined) ?? (NO_STYLES as Record<string, any>);
|
|
118
|
-
|
|
119
|
-
if ("opacity" in baseStyle) {
|
|
120
|
-
return baseStyle;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return { ...baseStyle, opacity: 1 };
|
|
114
|
+
return stylesMap.get()[associatedId]?.style ?? NO_STYLES;
|
|
124
115
|
});
|
|
125
116
|
|
|
126
117
|
const associatedProps = useAnimatedProps(() => {
|
|
@@ -130,7 +121,7 @@ export function createTransitionAwareComponent<P extends object>(
|
|
|
130
121
|
return NO_PROPS;
|
|
131
122
|
}
|
|
132
123
|
|
|
133
|
-
return
|
|
124
|
+
return stylesMap.get()[associatedId]?.props ?? NO_PROPS;
|
|
134
125
|
});
|
|
135
126
|
|
|
136
127
|
return (
|
|
@@ -71,7 +71,7 @@ export function FloatOverlay() {
|
|
|
71
71
|
return (
|
|
72
72
|
<DescriptorsProvider current={current} previous={previous} next={next}>
|
|
73
73
|
<ScreenAnimationProvider>
|
|
74
|
-
<ScreenStylesProvider>
|
|
74
|
+
<ScreenStylesProvider isFloatingOverlay>
|
|
75
75
|
<OverlayHost scene={scene} overlayScreenState={overlayScreenState} />
|
|
76
76
|
</ScreenStylesProvider>
|
|
77
77
|
</ScreenAnimationProvider>
|
|
@@ -6,8 +6,10 @@ import {
|
|
|
6
6
|
useDescriptors,
|
|
7
7
|
} from "../../../providers/screen/descriptors";
|
|
8
8
|
import { AnimationStore } from "../../../stores/animation.store";
|
|
9
|
-
import {
|
|
10
|
-
|
|
9
|
+
import {
|
|
10
|
+
LifecycleTransitionRequestKind,
|
|
11
|
+
SystemStore,
|
|
12
|
+
} from "../../../stores/system.store";
|
|
11
13
|
|
|
12
14
|
export function useContentLayout() {
|
|
13
15
|
const { current } = useDescriptors();
|
|
@@ -15,11 +17,14 @@ export function useContentLayout() {
|
|
|
15
17
|
const { height: screenHeight } = useWindowDimensions();
|
|
16
18
|
const routeKey = current.route.key;
|
|
17
19
|
const animations = AnimationStore.getBag(routeKey);
|
|
20
|
+
const system = SystemStore.getBag(routeKey);
|
|
21
|
+
|
|
18
22
|
const { targetProgress, resolvedAutoSnapPoint, measuredContentLayout } =
|
|
19
|
-
|
|
23
|
+
system;
|
|
24
|
+
const { requestLifecycleTransition } = system.actions;
|
|
25
|
+
|
|
20
26
|
const experimental_animateOnInitialMount =
|
|
21
27
|
current.options.experimental_animateOnInitialMount;
|
|
22
|
-
const transitionSpec = current.options.transitionSpec;
|
|
23
28
|
|
|
24
29
|
return useCallback(
|
|
25
30
|
(event: LayoutChangeEvent) => {
|
|
@@ -52,12 +57,10 @@ export function useContentLayout() {
|
|
|
52
57
|
return;
|
|
53
58
|
}
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
targetProgress,
|
|
60
|
-
});
|
|
60
|
+
requestLifecycleTransition(
|
|
61
|
+
LifecycleTransitionRequestKind.Open,
|
|
62
|
+
nextFraction,
|
|
63
|
+
);
|
|
61
64
|
})(width, height, fraction);
|
|
62
65
|
},
|
|
63
66
|
[
|
|
@@ -68,7 +71,7 @@ export function useContentLayout() {
|
|
|
68
71
|
isFirstKey,
|
|
69
72
|
screenHeight,
|
|
70
73
|
experimental_animateOnInitialMount,
|
|
71
|
-
|
|
74
|
+
requestLifecycleTransition,
|
|
72
75
|
],
|
|
73
76
|
);
|
|
74
77
|
}
|
|
@@ -24,7 +24,7 @@ export const BackdropLayer = memo(function BackdropLayer({
|
|
|
24
24
|
backdropBehavior: BackdropBehavior;
|
|
25
25
|
isBackdropActive: boolean;
|
|
26
26
|
}) {
|
|
27
|
-
const {
|
|
27
|
+
const { stylesMap } = useScreenStyles();
|
|
28
28
|
const { current } = useDescriptors();
|
|
29
29
|
const { dismissScreen } = useNavigationHelpers();
|
|
30
30
|
|
|
@@ -108,12 +108,12 @@ export const BackdropLayer = memo(function BackdropLayer({
|
|
|
108
108
|
|
|
109
109
|
const animatedBackdropStyle = useAnimatedStyle(() => {
|
|
110
110
|
"worklet";
|
|
111
|
-
return
|
|
111
|
+
return stylesMap.get().backdrop?.style ?? NO_STYLES;
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
const animatedBackdropProps = useAnimatedProps(() => {
|
|
115
115
|
"worklet";
|
|
116
|
-
return
|
|
116
|
+
return stylesMap.get().backdrop?.props ?? NO_PROPS;
|
|
117
117
|
});
|
|
118
118
|
|
|
119
119
|
return (
|
|
@@ -10,7 +10,6 @@ import { NO_PROPS, NO_STYLES } from "../../../constants";
|
|
|
10
10
|
import { useGestureContext } from "../../../providers/gestures";
|
|
11
11
|
import { useDescriptors } from "../../../providers/screen/descriptors";
|
|
12
12
|
import { useScreenStyles } from "../../../providers/screen/styles";
|
|
13
|
-
import { resolveNavigationMaskEnabled } from "../../../utils/resolve-screen-transition-options";
|
|
14
13
|
import { useContentLayout } from "../hooks/use-content-layout";
|
|
15
14
|
import { MaybeMaskedNavigationContainer } from "./maybe-masked-navigation-container";
|
|
16
15
|
import { SurfaceContainer } from "./surface-container";
|
|
@@ -23,13 +22,11 @@ type Props = {
|
|
|
23
22
|
|
|
24
23
|
export const ContentLayer = memo(
|
|
25
24
|
({ children, pointerEvents, isBackdropActive }: Props) => {
|
|
26
|
-
const {
|
|
25
|
+
const { stylesMap } = useScreenStyles();
|
|
27
26
|
const { current } = useDescriptors();
|
|
28
27
|
|
|
29
28
|
const gestureContext = useGestureContext();
|
|
30
|
-
const isNavigationMaskEnabled =
|
|
31
|
-
current.options,
|
|
32
|
-
);
|
|
29
|
+
const isNavigationMaskEnabled = !!current.options.navigationMaskEnabled;
|
|
33
30
|
const contentPointerEvents = isBackdropActive ? "box-none" : pointerEvents;
|
|
34
31
|
|
|
35
32
|
const hasAutoSnapPoint =
|
|
@@ -39,12 +36,12 @@ export const ContentLayer = memo(
|
|
|
39
36
|
|
|
40
37
|
const animatedContentStyle = useAnimatedStyle(() => {
|
|
41
38
|
"worklet";
|
|
42
|
-
return
|
|
39
|
+
return stylesMap.get().content?.style || NO_STYLES;
|
|
43
40
|
});
|
|
44
41
|
|
|
45
42
|
const animatedContentProps = useAnimatedProps(() => {
|
|
46
43
|
"worklet";
|
|
47
|
-
return
|
|
44
|
+
return stylesMap.get().content?.props ?? NO_PROPS;
|
|
48
45
|
});
|
|
49
46
|
|
|
50
47
|
return (
|
|
@@ -27,21 +27,19 @@ let hasWarnedMissingMaskedView = false;
|
|
|
27
27
|
|
|
28
28
|
export const MaybeMaskedNavigationContainer = memo(
|
|
29
29
|
({ enabled, children, pointerEvents }: Props) => {
|
|
30
|
-
const {
|
|
30
|
+
const { stylesMap } = useScreenStyles();
|
|
31
31
|
|
|
32
32
|
const animatedNavigationMaskStyle = useAnimatedStyle(() => {
|
|
33
33
|
"worklet";
|
|
34
34
|
return (
|
|
35
|
-
|
|
36
|
-
NO_STYLES
|
|
35
|
+
stylesMap.get()[NAVIGATION_MASK_ELEMENT_STYLE_ID]?.style || NO_STYLES
|
|
37
36
|
);
|
|
38
37
|
});
|
|
39
38
|
|
|
40
39
|
const animatedNavigationMaskContainerStyle = useAnimatedStyle(() => {
|
|
41
40
|
"worklet";
|
|
42
41
|
return (
|
|
43
|
-
|
|
44
|
-
NO_STYLES
|
|
42
|
+
stylesMap.get()[NAVIGATION_MASK_CONTAINER_STYLE_ID]?.style || NO_STYLES
|
|
45
43
|
);
|
|
46
44
|
});
|
|
47
45
|
|
|
@@ -78,6 +76,7 @@ export const MaybeMaskedNavigationContainer = memo(
|
|
|
78
76
|
styles.navigationContainer,
|
|
79
77
|
animatedNavigationMaskContainerStyle,
|
|
80
78
|
]}
|
|
79
|
+
pointerEvents={pointerEvents}
|
|
81
80
|
collapsable={false}
|
|
82
81
|
>
|
|
83
82
|
{children}
|
|
@@ -14,7 +14,7 @@ type Props = {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export const SurfaceContainer = memo(({ children, pointerEvents }: Props) => {
|
|
17
|
-
const {
|
|
17
|
+
const { stylesMap } = useScreenStyles();
|
|
18
18
|
const { current } = useDescriptors();
|
|
19
19
|
|
|
20
20
|
const SurfaceComponent = current.options.surfaceComponent;
|
|
@@ -27,12 +27,12 @@ export const SurfaceContainer = memo(({ children, pointerEvents }: Props) => {
|
|
|
27
27
|
|
|
28
28
|
const animatedSurfaceStyle = useAnimatedStyle(() => {
|
|
29
29
|
"worklet";
|
|
30
|
-
return
|
|
30
|
+
return stylesMap.get().surface?.style ?? NO_STYLES;
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
const animatedSurfaceProps = useAnimatedProps(() => {
|
|
34
34
|
"worklet";
|
|
35
|
-
return
|
|
35
|
+
return stylesMap.get().surface?.props ?? NO_PROPS;
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
if (!AnimatedSurfaceComponent) return children;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { runOnUI } from "react-native-reanimated";
|
|
2
|
+
import { AnimationStore } from "../../../../stores/animation.store";
|
|
3
|
+
import { BoundStore } from "../../../../stores/bounds";
|
|
4
|
+
import { GestureStore } from "../../../../stores/gesture.store";
|
|
5
|
+
import { SystemStore } from "../../../../stores/system.store";
|
|
6
|
+
|
|
7
|
+
export function resetStoresForScreen(
|
|
8
|
+
routeKey: string,
|
|
9
|
+
isBranchScreen: boolean,
|
|
10
|
+
branchNavigatorKey?: string,
|
|
11
|
+
) {
|
|
12
|
+
AnimationStore.clearBag(routeKey);
|
|
13
|
+
GestureStore.clearBag(routeKey);
|
|
14
|
+
SystemStore.clearBag(routeKey);
|
|
15
|
+
|
|
16
|
+
runOnUI(() => {
|
|
17
|
+
"worklet";
|
|
18
|
+
if (!isBranchScreen) return;
|
|
19
|
+
|
|
20
|
+
BoundStore.cleanup.byScreen(routeKey);
|
|
21
|
+
|
|
22
|
+
if (branchNavigatorKey) {
|
|
23
|
+
BoundStore.cleanup.byBranch(branchNavigatorKey);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
BoundStore.cleanup.byAncestor(routeKey);
|
|
28
|
+
})();
|
|
29
|
+
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
2
|
import { runOnJS, useAnimatedReaction } from "react-native-reanimated";
|
|
3
|
-
import useStableCallback from "
|
|
4
|
-
import type { BaseDescriptor } from "
|
|
5
|
-
import type { AnimationStoreMap } from "
|
|
6
|
-
import { HistoryStore } from "
|
|
3
|
+
import useStableCallback from "../../../../hooks/use-stable-callback";
|
|
4
|
+
import type { BaseDescriptor } from "../../../../providers/screen/descriptors";
|
|
5
|
+
import type { AnimationStoreMap } from "../../../../stores/animation.store";
|
|
6
|
+
import { HistoryStore } from "../../../../stores/history.store";
|
|
7
|
+
import {
|
|
8
|
+
registerMountedRoute,
|
|
9
|
+
unregisterMountedRoute,
|
|
10
|
+
} from "./navigator-route-registry";
|
|
7
11
|
|
|
8
12
|
function hasSnapPoints(descriptor: BaseDescriptor): boolean {
|
|
9
13
|
const snapPoints = descriptor.options?.snapPoints;
|
|
@@ -27,24 +31,37 @@ function shouldTrackInHistory(descriptor: BaseDescriptor): boolean {
|
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
/**
|
|
30
|
-
*
|
|
34
|
+
* Keeps navigator route registration and screen history in sync.
|
|
31
35
|
*/
|
|
32
|
-
export function
|
|
36
|
+
export function useScreenHistory(
|
|
33
37
|
current: BaseDescriptor,
|
|
34
38
|
previous: BaseDescriptor | undefined,
|
|
35
39
|
animations: AnimationStoreMap,
|
|
36
40
|
) {
|
|
37
41
|
const navigatorKey = current.navigation.getState()?.key ?? "";
|
|
42
|
+
const routeKey = current.route.key;
|
|
43
|
+
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
registerMountedRoute(navigatorKey, routeKey);
|
|
46
|
+
|
|
47
|
+
return () => {
|
|
48
|
+
const shouldClearNavigator = unregisterMountedRoute(
|
|
49
|
+
navigatorKey,
|
|
50
|
+
routeKey,
|
|
51
|
+
);
|
|
52
|
+
if (shouldClearNavigator) {
|
|
53
|
+
HistoryStore.clearNavigator(navigatorKey);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}, [navigatorKey, routeKey]);
|
|
38
57
|
|
|
39
58
|
// Track history via focus listener - waits for nested navigators to initialize
|
|
40
59
|
// biome-ignore lint/correctness/useExhaustiveDependencies: Must only run once on mount
|
|
41
60
|
useEffect(() => {
|
|
42
|
-
// Check on mount (after paint, nested navs initialized)
|
|
43
61
|
if (shouldTrackInHistory(current)) {
|
|
44
62
|
HistoryStore.focus(current, navigatorKey);
|
|
45
63
|
}
|
|
46
64
|
|
|
47
|
-
// Also listen for focus events
|
|
48
65
|
const unsubscribe = current.navigation.addListener?.("focus", () => {
|
|
49
66
|
if (shouldTrackInHistory(current)) {
|
|
50
67
|
HistoryStore.focus(current, navigatorKey);
|
|
@@ -54,7 +71,6 @@ export function useScreenEvents(
|
|
|
54
71
|
return () => unsubscribe?.();
|
|
55
72
|
}, []);
|
|
56
73
|
|
|
57
|
-
// When closing starts, focus previous in history
|
|
58
74
|
const handleBlur = useStableCallback(() => {
|
|
59
75
|
if (previous && shouldTrackInHistory(previous)) {
|
|
60
76
|
const prevNavigatorKey = previous.navigation.getState()?.key ?? "";
|