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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { interpolate
|
|
1
|
+
import { interpolate } from "react-native-reanimated";
|
|
2
2
|
import {
|
|
3
3
|
EPSILON,
|
|
4
4
|
NAVIGATION_MASK_CONTAINER_STYLE_ID,
|
|
@@ -14,7 +14,6 @@ import type { Layout } from "../../../types/screen.types";
|
|
|
14
14
|
import { prepareBoundStyles } from "../helpers/prepare-bound-styles";
|
|
15
15
|
import type { BoundsOptions } from "../types/options";
|
|
16
16
|
import {
|
|
17
|
-
getZoomAnchor,
|
|
18
17
|
toNumber,
|
|
19
18
|
ZOOM_BACKGROUND_SCALE,
|
|
20
19
|
ZOOM_DRAG_DIRECTIONAL_SCALE_EXPONENT,
|
|
@@ -42,16 +41,6 @@ import {
|
|
|
42
41
|
import type { BuildZoomStylesParams, ZoomInterpolatedStyle } from "./types";
|
|
43
42
|
|
|
44
43
|
const IDENTITY_DRAG_SCALE_OUTPUT = [1, 1] as const;
|
|
45
|
-
const presentedZoomTagByRoute = makeMutable<Record<string, string>>({});
|
|
46
|
-
|
|
47
|
-
function cachePresentedZoomTag(routeKey: string, resolvedTag: string) {
|
|
48
|
-
"worklet";
|
|
49
|
-
|
|
50
|
-
presentedZoomTagByRoute.value = {
|
|
51
|
-
...presentedZoomTagByRoute.value,
|
|
52
|
-
[routeKey]: resolvedTag,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
44
|
|
|
56
45
|
/* -------------------------------------------------------------------------- */
|
|
57
46
|
/* LOCAL HELPERS */
|
|
@@ -168,115 +157,58 @@ function interpolateOpacityRange(params: {
|
|
|
168
157
|
);
|
|
169
158
|
}
|
|
170
159
|
|
|
171
|
-
function resolveEffectiveZoomTag(params: {
|
|
172
|
-
resolvedTag: string;
|
|
173
|
-
activeRouteKey?: string;
|
|
174
|
-
entering: boolean;
|
|
175
|
-
animating: boolean;
|
|
176
|
-
activeProgress: number;
|
|
177
|
-
livePairReady: boolean;
|
|
178
|
-
}) {
|
|
179
|
-
"worklet";
|
|
180
|
-
|
|
181
|
-
const {
|
|
182
|
-
resolvedTag,
|
|
183
|
-
activeRouteKey,
|
|
184
|
-
entering,
|
|
185
|
-
animating,
|
|
186
|
-
activeProgress,
|
|
187
|
-
livePairReady,
|
|
188
|
-
} = params;
|
|
189
|
-
|
|
190
|
-
// Only grouped ids need retarget stabilization. Plain ids should keep their
|
|
191
|
-
// normal behavior with no route-level caching.
|
|
192
|
-
if (!activeRouteKey || !resolvedTag.includes(":")) {
|
|
193
|
-
return resolvedTag;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
const cachedTag = presentedZoomTagByRoute.value[activeRouteKey];
|
|
197
|
-
const isFreshOpenFrame = entering && activeProgress <= 0.05;
|
|
198
|
-
const shouldFreezeDuringEnter = entering && animating && !isFreshOpenFrame;
|
|
199
|
-
|
|
200
|
-
if (!cachedTag || isFreshOpenFrame) {
|
|
201
|
-
cachePresentedZoomTag(activeRouteKey, resolvedTag);
|
|
202
|
-
return resolvedTag;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
if (shouldFreezeDuringEnter) {
|
|
206
|
-
return cachedTag;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
// After the enter animation, grouped retargeting can still briefly point at a
|
|
210
|
-
// new active id before that tag has usable bounds. Keep presenting the last
|
|
211
|
-
// good tag until the next one is transition-ready.
|
|
212
|
-
if (cachedTag !== resolvedTag && !livePairReady) {
|
|
213
|
-
return cachedTag;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
if (cachedTag !== resolvedTag) {
|
|
217
|
-
cachePresentedZoomTag(activeRouteKey, resolvedTag);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
return resolvedTag;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
160
|
/* -------------------------------------------------------------------------- */
|
|
224
161
|
/* BUILD ZOOM STYLES */
|
|
225
162
|
/* -------------------------------------------------------------------------- */
|
|
226
163
|
|
|
227
164
|
export function buildZoomStyles({
|
|
228
|
-
|
|
165
|
+
tag,
|
|
229
166
|
zoomOptions,
|
|
230
167
|
props,
|
|
231
168
|
}: BuildZoomStylesParams): ZoomInterpolatedStyle {
|
|
232
169
|
"worklet";
|
|
233
170
|
|
|
234
|
-
if (!
|
|
171
|
+
if (!tag) {
|
|
172
|
+
return {};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const isGroup = tag.includes(":");
|
|
176
|
+
let buildEffectiveTag = tag;
|
|
177
|
+
if (isGroup) {
|
|
178
|
+
const group = tag.split(":")[0];
|
|
179
|
+
const groupActiveTag = BoundStore.group.getActiveId(group)?.split(":")[0];
|
|
180
|
+
buildEffectiveTag = `${group}:${groupActiveTag ?? tag.split(":")[1]}`;
|
|
181
|
+
}
|
|
235
182
|
|
|
236
183
|
/* ------------------------------ Shared Setup ------------------------------ */
|
|
237
184
|
|
|
238
|
-
const
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
|
|
185
|
+
const target = zoomOptions?.target;
|
|
186
|
+
const {
|
|
187
|
+
focused,
|
|
188
|
+
progress,
|
|
189
|
+
layouts: { screen: screenLayout },
|
|
190
|
+
} = props;
|
|
242
191
|
const isEnteringTransition = !props.next;
|
|
243
|
-
const activeRouteKey = props.active.route.key;
|
|
244
192
|
const currentRouteKey = props.current?.route.key;
|
|
245
193
|
const previousRouteKey = props.previous?.route.key;
|
|
246
194
|
const nextRouteKey = props.next?.route.key;
|
|
247
|
-
|
|
248
|
-
const
|
|
249
|
-
currentScreenKey: currentRouteKey,
|
|
250
|
-
previousScreenKey: previousRouteKey,
|
|
251
|
-
nextScreenKey: nextRouteKey,
|
|
252
|
-
entering: isEnteringTransition,
|
|
253
|
-
});
|
|
254
|
-
const effectiveTag = resolveEffectiveZoomTag({
|
|
255
|
-
resolvedTag,
|
|
256
|
-
activeRouteKey,
|
|
257
|
-
entering: !!props.active.entering,
|
|
258
|
-
animating: !!props.active.animating,
|
|
259
|
-
activeProgress: props.active.progress,
|
|
260
|
-
livePairReady: !!liveResolvedPair.sourceBounds,
|
|
261
|
-
});
|
|
195
|
+
|
|
196
|
+
const zoomAnchor = target === "bound" ? "center" : ZOOM_SHARED_OPTIONS.anchor;
|
|
262
197
|
|
|
263
198
|
const baseRawOptions = {
|
|
264
|
-
id:
|
|
199
|
+
id: buildEffectiveTag,
|
|
265
200
|
raw: true,
|
|
266
201
|
scaleMode: ZOOM_SHARED_OPTIONS.scaleMode,
|
|
267
202
|
} as const;
|
|
268
203
|
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
nextScreenKey: nextRouteKey,
|
|
276
|
-
entering: isEnteringTransition,
|
|
277
|
-
});
|
|
204
|
+
const linkPair = BoundStore.link.getPair(buildEffectiveTag, {
|
|
205
|
+
currentScreenKey: currentRouteKey,
|
|
206
|
+
previousScreenKey: previousRouteKey,
|
|
207
|
+
nextScreenKey: nextRouteKey,
|
|
208
|
+
entering: isEnteringTransition,
|
|
209
|
+
});
|
|
278
210
|
|
|
279
|
-
const sourceBorderRadius = getSourceBorderRadius(
|
|
211
|
+
const sourceBorderRadius = getSourceBorderRadius(linkPair);
|
|
280
212
|
const targetBorderRadius = zoomOptions?.borderRadius ?? sourceBorderRadius;
|
|
281
213
|
const focusedElementOpacity = {
|
|
282
214
|
open: resolveOpacityRangeTuple({
|
|
@@ -299,9 +231,11 @@ export function buildZoomStyles({
|
|
|
299
231
|
}),
|
|
300
232
|
};
|
|
301
233
|
const sourceVisibilityStyle = {
|
|
302
|
-
[
|
|
234
|
+
[buildEffectiveTag]: {
|
|
235
|
+
style: VISIBLE_STYLE,
|
|
236
|
+
},
|
|
303
237
|
} satisfies TransitionInterpolatedStyle;
|
|
304
|
-
const focusedContentSlot = props.navigationMaskEnabled
|
|
238
|
+
const focusedContentSlot = props.current.layouts.navigationMaskEnabled
|
|
305
239
|
? NAVIGATION_MASK_CONTAINER_STYLE_ID
|
|
306
240
|
: "content";
|
|
307
241
|
|
|
@@ -318,49 +252,10 @@ export function buildZoomStyles({
|
|
|
318
252
|
return prepareBoundStyles({
|
|
319
253
|
props,
|
|
320
254
|
options,
|
|
321
|
-
resolvedPair,
|
|
322
|
-
syncGroupActiveId: false,
|
|
255
|
+
resolvedPair: linkPair,
|
|
323
256
|
});
|
|
324
257
|
};
|
|
325
258
|
|
|
326
|
-
/* --------------------------- Missing Source Guard -------------------------- */
|
|
327
|
-
|
|
328
|
-
// Only the focused entering route should be hidden when source bounds are
|
|
329
|
-
// missing. During rapid chained pushes, source measurement can briefly race
|
|
330
|
-
// the focused destination. In that case, degrading to a fullscreen destination
|
|
331
|
-
// is safer than blanking the entire screen until another gesture/animation
|
|
332
|
-
// re-runs the pipeline.
|
|
333
|
-
if (focused && !resolvedPair.sourceBounds && props.active.entering) {
|
|
334
|
-
const fallbackStyles: ZoomInterpolatedStyle = {
|
|
335
|
-
[focusedContentSlot]: {
|
|
336
|
-
style: {
|
|
337
|
-
opacity: zoomOptions?.debug ? 0.5 : 1,
|
|
338
|
-
transform: [{ translateX: 0 }, { translateY: 0 }, { scale: 1 }],
|
|
339
|
-
borderRadius: 0,
|
|
340
|
-
overflow: "hidden",
|
|
341
|
-
},
|
|
342
|
-
},
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
if (props.navigationMaskEnabled) {
|
|
346
|
-
const { top, right, bottom, left } = ZOOM_MASK_OUTSET;
|
|
347
|
-
fallbackStyles[NAVIGATION_MASK_ELEMENT_STYLE_ID] = {
|
|
348
|
-
style: {
|
|
349
|
-
width: Math.max(1, screenLayout.width + left + right),
|
|
350
|
-
height: Math.max(1, screenLayout.height + top + bottom),
|
|
351
|
-
borderRadius: 0,
|
|
352
|
-
transform: [
|
|
353
|
-
{ translateX: -left },
|
|
354
|
-
{ translateY: -top },
|
|
355
|
-
{ scale: 1 },
|
|
356
|
-
],
|
|
357
|
-
},
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
return fallbackStyles;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
259
|
/* --------------------------- Gesture / Drag Values ------------------------- */
|
|
365
260
|
|
|
366
261
|
const normX = props.active.gesture.normX;
|
|
@@ -428,15 +323,15 @@ export function buildZoomStyles({
|
|
|
428
323
|
|
|
429
324
|
if (focused) {
|
|
430
325
|
const focusedContentTarget = getZoomContentTarget({
|
|
431
|
-
explicitTarget,
|
|
326
|
+
explicitTarget: target,
|
|
432
327
|
screenLayout,
|
|
433
328
|
anchor: ZOOM_SHARED_OPTIONS.anchor,
|
|
434
|
-
resolvedPair,
|
|
329
|
+
resolvedPair: linkPair,
|
|
435
330
|
});
|
|
436
331
|
|
|
437
332
|
const contentRaw = bounds({
|
|
438
333
|
...baseRawOptions,
|
|
439
|
-
anchor:
|
|
334
|
+
anchor: zoomAnchor,
|
|
440
335
|
method: "content",
|
|
441
336
|
target: focusedContentTarget,
|
|
442
337
|
} as const);
|
|
@@ -474,6 +369,7 @@ export function buildZoomStyles({
|
|
|
474
369
|
const { top, right, bottom, left } = ZOOM_MASK_OUTSET;
|
|
475
370
|
const maskWidth = Math.max(1, toNumber(maskRaw.width) + left + right);
|
|
476
371
|
const maskHeight = Math.max(1, toNumber(maskRaw.height) + top + bottom);
|
|
372
|
+
|
|
477
373
|
const contentTranslateX = toNumber(contentRaw.translateX) + dragX;
|
|
478
374
|
const contentTranslateY = toNumber(contentRaw.translateY) + dragY;
|
|
479
375
|
const contentScale = toNumber(contentRaw.scale, 1) * dragScale;
|
|
@@ -498,7 +394,7 @@ export function buildZoomStyles({
|
|
|
498
394
|
...sourceVisibilityStyle,
|
|
499
395
|
};
|
|
500
396
|
|
|
501
|
-
if (props.navigationMaskEnabled) {
|
|
397
|
+
if (props.current.layouts.navigationMaskEnabled) {
|
|
502
398
|
focusedStyles[NAVIGATION_MASK_ELEMENT_STYLE_ID] = {
|
|
503
399
|
style: {
|
|
504
400
|
width: maskWidth,
|
|
@@ -533,39 +429,34 @@ export function buildZoomStyles({
|
|
|
533
429
|
[1, backgroundScale],
|
|
534
430
|
"clamp",
|
|
535
431
|
);
|
|
536
|
-
const isUnfocusedIdle = props.active.settled === 1;
|
|
537
|
-
const shouldHideUnfocusedIdle = isUnfocusedIdle;
|
|
538
432
|
const didSourceComponentVisiblyHide =
|
|
539
433
|
!props.active.closing && unfocusedFade <= EPSILON;
|
|
540
434
|
|
|
541
435
|
const shouldResetUnfocusedElement =
|
|
542
|
-
!props.active.closing &&
|
|
543
|
-
(!!props.active.logicallySettled || didSourceComponentVisiblyHide);
|
|
436
|
+
!props.active.closing && didSourceComponentVisiblyHide;
|
|
544
437
|
|
|
545
438
|
const unfocusedElementTarget = getZoomContentTarget({
|
|
546
|
-
explicitTarget,
|
|
439
|
+
explicitTarget: target,
|
|
547
440
|
screenLayout,
|
|
548
441
|
anchor: ZOOM_SHARED_OPTIONS.anchor,
|
|
549
|
-
resolvedPair,
|
|
442
|
+
resolvedPair: linkPair,
|
|
550
443
|
});
|
|
551
444
|
|
|
552
445
|
const elementRaw = bounds({
|
|
553
446
|
...baseRawOptions,
|
|
554
|
-
anchor:
|
|
447
|
+
anchor: zoomAnchor,
|
|
555
448
|
method: "transform",
|
|
556
449
|
space: "relative",
|
|
557
450
|
target: unfocusedElementTarget,
|
|
558
451
|
} as const);
|
|
559
452
|
|
|
560
453
|
const boundTargetCenterX =
|
|
561
|
-
|
|
562
|
-
?
|
|
563
|
-
resolvedPair.destinationBounds.width / 2
|
|
454
|
+
target === "bound" && linkPair.destinationBounds
|
|
455
|
+
? linkPair.destinationBounds.pageX + linkPair.destinationBounds.width / 2
|
|
564
456
|
: undefined;
|
|
565
457
|
const boundTargetCenterY =
|
|
566
|
-
|
|
567
|
-
?
|
|
568
|
-
resolvedPair.destinationBounds.height / 2
|
|
458
|
+
target === "bound" && linkPair.destinationBounds
|
|
459
|
+
? linkPair.destinationBounds.pageY + linkPair.destinationBounds.height / 2
|
|
569
460
|
: undefined;
|
|
570
461
|
|
|
571
462
|
const elementCenterX =
|
|
@@ -610,7 +501,7 @@ export function buildZoomStyles({
|
|
|
610
501
|
const elementScaleX = toNumber(elementRaw.scaleX, 1) * dragScale;
|
|
611
502
|
const elementScaleY = toNumber(elementRaw.scaleY, 1) * dragScale;
|
|
612
503
|
|
|
613
|
-
const resolvedElementStyle =
|
|
504
|
+
const resolvedElementStyle = shouldResetUnfocusedElement
|
|
614
505
|
? {
|
|
615
506
|
transform: [
|
|
616
507
|
{ translateX: 0 },
|
|
@@ -625,16 +516,16 @@ export function buildZoomStyles({
|
|
|
625
516
|
: {
|
|
626
517
|
transform: [
|
|
627
518
|
{
|
|
628
|
-
translateX:
|
|
519
|
+
translateX: elementTranslateX,
|
|
629
520
|
},
|
|
630
521
|
{
|
|
631
|
-
translateY:
|
|
522
|
+
translateY: elementTranslateY,
|
|
632
523
|
},
|
|
633
524
|
{
|
|
634
|
-
scaleX:
|
|
525
|
+
scaleX: elementScaleX,
|
|
635
526
|
},
|
|
636
527
|
{
|
|
637
|
-
scaleY:
|
|
528
|
+
scaleY: elementScaleY,
|
|
638
529
|
},
|
|
639
530
|
],
|
|
640
531
|
opacity: zoomOptions?.debug ? 1 : unfocusedFade,
|
|
@@ -648,7 +539,7 @@ export function buildZoomStyles({
|
|
|
648
539
|
transform: [{ scale: unfocusedScale }],
|
|
649
540
|
},
|
|
650
541
|
},
|
|
651
|
-
[
|
|
542
|
+
[buildEffectiveTag]: {
|
|
652
543
|
style: resolvedElementStyle,
|
|
653
544
|
},
|
|
654
545
|
};
|
|
@@ -1,34 +1,59 @@
|
|
|
1
1
|
import type { ScreenKey } from "../types/screen.types";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
type BagWithActions<TBag, TActions extends object = never> = TBag &
|
|
4
|
+
([TActions] extends [never] ? {} : { actions: TActions });
|
|
5
|
+
|
|
6
|
+
export interface StoreApi<TBag> {
|
|
7
|
+
peekBag(routeKey: ScreenKey): TBag | undefined;
|
|
8
|
+
getBag(routeKey: ScreenKey): TBag;
|
|
9
|
+
getValue<K extends keyof TBag>(routeKey: ScreenKey, key: K): TBag[K];
|
|
10
|
+
getCachedBag(): TBag;
|
|
11
|
+
clearBag(routeKey: ScreenKey): void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface CreateStoreOptions<TBag, TActions extends object = never> {
|
|
4
15
|
createBag: () => TBag;
|
|
5
16
|
disposeBag: (bag: TBag) => void;
|
|
17
|
+
actions?: (bag: TBag) => TActions;
|
|
6
18
|
}
|
|
7
19
|
|
|
8
|
-
export function createStore<TBag>({
|
|
20
|
+
export function createStore<TBag, TActions extends object = never>({
|
|
9
21
|
createBag,
|
|
10
22
|
disposeBag,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
23
|
+
actions: createActions,
|
|
24
|
+
}: CreateStoreOptions<TBag, TActions>): StoreApi<
|
|
25
|
+
BagWithActions<TBag, TActions>
|
|
26
|
+
> {
|
|
27
|
+
const store: Record<ScreenKey, BagWithActions<TBag, TActions>> = {};
|
|
28
|
+
let cachedBag: BagWithActions<TBag, TActions> | undefined;
|
|
14
29
|
|
|
15
|
-
function
|
|
30
|
+
function createFullBag(): BagWithActions<TBag, TActions> {
|
|
31
|
+
const bag = createBag();
|
|
32
|
+
const actions = createActions?.(bag);
|
|
33
|
+
return (
|
|
34
|
+
actions ? Object.assign({}, bag, { actions }) : Object.assign({}, bag)
|
|
35
|
+
) as BagWithActions<TBag, TActions>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function peekBag(
|
|
39
|
+
routeKey: ScreenKey,
|
|
40
|
+
): BagWithActions<TBag, TActions> | undefined {
|
|
16
41
|
return store[routeKey];
|
|
17
42
|
}
|
|
18
43
|
|
|
19
|
-
function getBag(routeKey: ScreenKey): TBag {
|
|
44
|
+
function getBag(routeKey: ScreenKey): BagWithActions<TBag, TActions> {
|
|
20
45
|
let bag = store[routeKey];
|
|
21
46
|
if (!bag) {
|
|
22
|
-
bag =
|
|
47
|
+
bag = createFullBag();
|
|
23
48
|
store[routeKey] = bag;
|
|
24
49
|
}
|
|
25
50
|
return bag;
|
|
26
51
|
}
|
|
27
52
|
|
|
28
|
-
function getValue<K extends keyof TBag
|
|
53
|
+
function getValue<K extends keyof BagWithActions<TBag, TActions>>(
|
|
29
54
|
routeKey: ScreenKey,
|
|
30
55
|
key: K,
|
|
31
|
-
): TBag[K] {
|
|
56
|
+
): BagWithActions<TBag, TActions>[K] {
|
|
32
57
|
return getBag(routeKey)[key];
|
|
33
58
|
}
|
|
34
59
|
|
|
@@ -37,9 +62,9 @@ export function createStore<TBag>({
|
|
|
37
62
|
* useful for stable fallback state, such as neutral gesture values for screens
|
|
38
63
|
* that should not own live route-specific state.
|
|
39
64
|
*/
|
|
40
|
-
function getCachedBag(): TBag {
|
|
65
|
+
function getCachedBag(): BagWithActions<TBag, TActions> {
|
|
41
66
|
if (!cachedBag) {
|
|
42
|
-
cachedBag =
|
|
67
|
+
cachedBag = createFullBag();
|
|
43
68
|
}
|
|
44
69
|
return cachedBag;
|
|
45
70
|
}
|
|
@@ -52,11 +77,12 @@ export function createStore<TBag>({
|
|
|
52
77
|
delete store[routeKey];
|
|
53
78
|
}
|
|
54
79
|
|
|
55
|
-
|
|
80
|
+
const baseStore: StoreApi<BagWithActions<TBag, TActions>> = {
|
|
56
81
|
peekBag,
|
|
57
82
|
getBag,
|
|
58
83
|
getValue,
|
|
59
84
|
getCachedBag,
|
|
60
85
|
clearBag,
|
|
61
86
|
};
|
|
87
|
+
return baseStore;
|
|
62
88
|
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useAutoSourceMeasurement = void 0;
|
|
7
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
var _bounds = require("../../../stores/bounds");
|
|
9
|
-
var _measurementRules = require("./helpers/measurement-rules");
|
|
10
|
-
const useAutoSourceMeasurement = params => {
|
|
11
|
-
const {
|
|
12
|
-
enabled,
|
|
13
|
-
sharedBoundTag,
|
|
14
|
-
id,
|
|
15
|
-
group,
|
|
16
|
-
nextScreenKey,
|
|
17
|
-
maybeMeasureAndStore
|
|
18
|
-
} = params;
|
|
19
|
-
const boundaryPresence = _bounds.BoundStore.getBoundaryPresence();
|
|
20
|
-
(0, _reactNativeReanimated.useAnimatedReaction)(() => {
|
|
21
|
-
"worklet";
|
|
22
|
-
|
|
23
|
-
return (0, _measurementRules.resolveAutoSourceCaptureSignal)({
|
|
24
|
-
enabled,
|
|
25
|
-
nextScreenKey,
|
|
26
|
-
tagPresence: boundaryPresence.value[sharedBoundTag]
|
|
27
|
-
});
|
|
28
|
-
}, (captureSignal, previousCaptureSignal) => {
|
|
29
|
-
"worklet";
|
|
30
|
-
|
|
31
|
-
if (!enabled) return;
|
|
32
|
-
if (!nextScreenKey) return;
|
|
33
|
-
if (!captureSignal || captureSignal === previousCaptureSignal) return;
|
|
34
|
-
const currentGroupActiveId = group ? _bounds.BoundStore.getGroupActiveId(group) : null;
|
|
35
|
-
if (group && currentGroupActiveId !== String(id)) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
maybeMeasureAndStore({
|
|
39
|
-
intent: "capture-source"
|
|
40
|
-
});
|
|
41
|
-
}, [enabled, id, group, nextScreenKey, sharedBoundTag, boundaryPresence, maybeMeasureAndStore]);
|
|
42
|
-
};
|
|
43
|
-
exports.useAutoSourceMeasurement = useAutoSourceMeasurement;
|
|
44
|
-
//# sourceMappingURL=use-auto-source-measurement.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_bounds","_measurementRules","useAutoSourceMeasurement","params","enabled","sharedBoundTag","id","group","nextScreenKey","maybeMeasureAndStore","boundaryPresence","BoundStore","getBoundaryPresence","useAnimatedReaction","resolveAutoSourceCaptureSignal","tagPresence","value","captureSignal","previousCaptureSignal","currentGroupActiveId","getGroupActiveId","String","intent","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAF,OAAA;AAEO,MAAMG,wBAAwB,GAAIC,MAOxC,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,cAAc;IACdC,EAAE;IACFC,KAAK;IACLC,aAAa;IACbC;EACD,CAAC,GAAGN,MAAM;EACV,MAAMO,gBAAgB,GAAGC,kBAAU,CAACC,mBAAmB,CAAC,CAAC;EAEzD,IAAAC,0CAAmB,EAClB,MAAM;IACL,SAAS;;IACT,OAAO,IAAAC,gDAA8B,EAAC;MACrCV,OAAO;MACPI,aAAa;MACbO,WAAW,EAAEL,gBAAgB,CAACM,KAAK,CAACX,cAAc;IACnD,CAAC,CAAC;EACH,CAAC,EACD,CAACY,aAAa,EAAEC,qBAAqB,KAAK;IACzC,SAAS;;IACT,IAAI,CAACd,OAAO,EAAE;IACd,IAAI,CAACI,aAAa,EAAE;IACpB,IAAI,CAACS,aAAa,IAAIA,aAAa,KAAKC,qBAAqB,EAAE;IAC/D,MAAMC,oBAAoB,GAAGZ,KAAK,GAC/BI,kBAAU,CAACS,gBAAgB,CAACb,KAAK,CAAC,GAClC,IAAI;IACP,IAAIA,KAAK,IAAIY,oBAAoB,KAAKE,MAAM,CAACf,EAAE,CAAC,EAAE;MACjD;IACD;IACAG,oBAAoB,CAAC;MAAEa,MAAM,EAAE;IAAiB,CAAC,CAAC;EACnD,CAAC,EACD,CACClB,OAAO,EACPE,EAAE,EACFC,KAAK,EACLC,aAAa,EACbH,cAAc,EACdK,gBAAgB,EAChBD,oBAAoB,CAEtB,CAAC;AACF,CAAC;AAACc,OAAA,CAAArB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useBoundaryMeasureAndStore = void 0;
|
|
7
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
var _useStableCallbackValue = _interopRequireDefault(require("../../../hooks/use-stable-callback-value"));
|
|
9
|
-
var _layoutAnchor = require("../../../providers/layout-anchor.provider");
|
|
10
|
-
var _bounds = require("../../../stores/bounds");
|
|
11
|
-
var _applyMeasuredBoundsWrites = require("../../../stores/bounds/helpers/apply-measured-bounds-writes");
|
|
12
|
-
var _resolvePendingSourceKey = require("../helpers/resolve-pending-source-key");
|
|
13
|
-
var _measurementRules = require("./helpers/measurement-rules");
|
|
14
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
const SNAPSHOT_EPSILON = 0.5;
|
|
16
|
-
const areMeasurementsEqual = (a, b) => {
|
|
17
|
-
"worklet";
|
|
18
|
-
|
|
19
|
-
return Math.abs(a.x - b.x) <= SNAPSHOT_EPSILON && Math.abs(a.y - b.y) <= SNAPSHOT_EPSILON && Math.abs(a.pageX - b.pageX) <= SNAPSHOT_EPSILON && Math.abs(a.pageY - b.pageY) <= SNAPSHOT_EPSILON && Math.abs(a.width - b.width) <= SNAPSHOT_EPSILON && Math.abs(a.height - b.height) <= SNAPSHOT_EPSILON;
|
|
20
|
-
};
|
|
21
|
-
const useBoundaryMeasureAndStore = params => {
|
|
22
|
-
const {
|
|
23
|
-
enabled,
|
|
24
|
-
sharedBoundTag,
|
|
25
|
-
preferredSourceScreenKey,
|
|
26
|
-
currentScreenKey,
|
|
27
|
-
ancestorKeys,
|
|
28
|
-
navigatorKey,
|
|
29
|
-
ancestorNavigatorKeys,
|
|
30
|
-
preparedStyles,
|
|
31
|
-
measuredAnimatedRef
|
|
32
|
-
} = params;
|
|
33
|
-
const layoutAnchor = (0, _layoutAnchor.useLayoutAnchorContext)();
|
|
34
|
-
return (0, _useStableCallbackValue.default)(({
|
|
35
|
-
intent
|
|
36
|
-
} = {}) => {
|
|
37
|
-
"worklet";
|
|
38
|
-
|
|
39
|
-
if (!enabled) return;
|
|
40
|
-
const intents = (0, _measurementRules.getMeasurementIntentFlags)(intent);
|
|
41
|
-
const expectedSourceScreenKey = (0, _resolvePendingSourceKey.resolvePendingSourceKey)(sharedBoundTag, preferredSourceScreenKey) || undefined;
|
|
42
|
-
const hasPendingLink = expectedSourceScreenKey ? _bounds.BoundStore.hasPendingLinkFromSource(sharedBoundTag, expectedSourceScreenKey) : _bounds.BoundStore.hasPendingLink(sharedBoundTag);
|
|
43
|
-
const hasAttachableSourceLink = expectedSourceScreenKey ? _bounds.BoundStore.hasSourceLink(sharedBoundTag, expectedSourceScreenKey) : false;
|
|
44
|
-
const hasSourceLink = _bounds.BoundStore.hasSourceLink(sharedBoundTag, currentScreenKey);
|
|
45
|
-
const hasDestinationLink = _bounds.BoundStore.hasDestinationLink(sharedBoundTag, currentScreenKey);
|
|
46
|
-
const writePlan = (0, _measurementRules.resolveMeasurementWritePlan)({
|
|
47
|
-
intents,
|
|
48
|
-
hasPendingLink,
|
|
49
|
-
hasSourceLink,
|
|
50
|
-
hasDestinationLink,
|
|
51
|
-
hasAttachableSourceLink
|
|
52
|
-
});
|
|
53
|
-
if (!writePlan.writesAny) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
const measured = (0, _reactNativeReanimated.measure)(measuredAnimatedRef);
|
|
57
|
-
if (!measured) return;
|
|
58
|
-
const correctedMeasured = layoutAnchor ? layoutAnchor.correctMeasurement(measured) : measured;
|
|
59
|
-
const destinationInViewport = !writePlan.wantsDestinationWrite || !layoutAnchor || !layoutAnchor.isMeasurementInViewport || layoutAnchor.isMeasurementInViewport(correctedMeasured);
|
|
60
|
-
if (!destinationInViewport && !writePlan.captureSource && !writePlan.refreshSource) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
const existingSnapshot = _bounds.BoundStore.getSnapshot(sharedBoundTag, currentScreenKey);
|
|
64
|
-
const hasSnapshotChanged = !existingSnapshot || !areMeasurementsEqual(existingSnapshot.bounds, correctedMeasured);
|
|
65
|
-
const shouldWriteSnapshot = hasSnapshotChanged;
|
|
66
|
-
(0, _applyMeasuredBoundsWrites.applyMeasuredBoundsWrites)({
|
|
67
|
-
sharedBoundTag,
|
|
68
|
-
currentScreenKey,
|
|
69
|
-
measured: correctedMeasured,
|
|
70
|
-
preparedStyles,
|
|
71
|
-
ancestorKeys,
|
|
72
|
-
navigatorKey,
|
|
73
|
-
ancestorNavigatorKeys,
|
|
74
|
-
expectedSourceScreenKey,
|
|
75
|
-
shouldRegisterSnapshot: shouldWriteSnapshot,
|
|
76
|
-
shouldSetSource: writePlan.captureSource,
|
|
77
|
-
shouldUpdateSource: writePlan.refreshSource && hasSnapshotChanged,
|
|
78
|
-
shouldUpdateDestination: writePlan.refreshDestination && destinationInViewport && hasSnapshotChanged,
|
|
79
|
-
shouldSetDestination: writePlan.completeDestination && destinationInViewport
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
exports.useBoundaryMeasureAndStore = useBoundaryMeasureAndStore;
|
|
84
|
-
//# sourceMappingURL=use-boundary-measure-and-store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_useStableCallbackValue","_interopRequireDefault","_layoutAnchor","_bounds","_applyMeasuredBoundsWrites","_resolvePendingSourceKey","_measurementRules","e","__esModule","default","SNAPSHOT_EPSILON","areMeasurementsEqual","a","b","Math","abs","x","y","pageX","pageY","width","height","useBoundaryMeasureAndStore","params","enabled","sharedBoundTag","preferredSourceScreenKey","currentScreenKey","ancestorKeys","navigatorKey","ancestorNavigatorKeys","preparedStyles","measuredAnimatedRef","layoutAnchor","useLayoutAnchorContext","useStableCallbackValue","intent","intents","getMeasurementIntentFlags","expectedSourceScreenKey","resolvePendingSourceKey","undefined","hasPendingLink","BoundStore","hasPendingLinkFromSource","hasAttachableSourceLink","hasSourceLink","hasDestinationLink","writePlan","resolveMeasurementWritePlan","writesAny","measured","measure","correctedMeasured","correctMeasurement","destinationInViewport","wantsDestinationWrite","isMeasurementInViewport","captureSource","refreshSource","existingSnapshot","getSnapshot","hasSnapshotChanged","bounds","shouldWriteSnapshot","applyMeasuredBoundsWrites","shouldRegisterSnapshot","shouldSetSource","shouldUpdateSource","shouldUpdateDestination","refreshDestination","shouldSetDestination","completeDestination","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts"],"mappings":";;;;;;AACA,IAAAA,sBAAA,GAAAC,OAAA;AAMA,IAAAC,uBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,0BAAA,GAAAL,OAAA;AACA,IAAAM,wBAAA,GAAAN,OAAA;AAEA,IAAAO,iBAAA,GAAAP,OAAA;AAGqC,SAAAE,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAErC,MAAMG,gBAAgB,GAAG,GAAG;AAE5B,MAAMC,oBAAoB,GAAGA,CAC5BC,CAAqB,EACrBC,CAAqB,KACR;EACb,SAAS;;EAET,OACCC,IAAI,CAACC,GAAG,CAACH,CAAC,CAACI,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC,IAAIN,gBAAgB,IACvCI,IAAI,CAACC,GAAG,CAACH,CAAC,CAACK,CAAC,GAAGJ,CAAC,CAACI,CAAC,CAAC,IAAIP,gBAAgB,IACvCI,IAAI,CAACC,GAAG,CAACH,CAAC,CAACM,KAAK,GAAGL,CAAC,CAACK,KAAK,CAAC,IAAIR,gBAAgB,IAC/CI,IAAI,CAACC,GAAG,CAACH,CAAC,CAACO,KAAK,GAAGN,CAAC,CAACM,KAAK,CAAC,IAAIT,gBAAgB,IAC/CI,IAAI,CAACC,GAAG,CAACH,CAAC,CAACQ,KAAK,GAAGP,CAAC,CAACO,KAAK,CAAC,IAAIV,gBAAgB,IAC/CI,IAAI,CAACC,GAAG,CAACH,CAAC,CAACS,MAAM,GAAGR,CAAC,CAACQ,MAAM,CAAC,IAAIX,gBAAgB;AAEnD,CAAC;AAEM,MAAMY,0BAA0B,GAAIC,MAU1C,IAAK;EACL,MAAM;IACLC,OAAO;IACPC,cAAc;IACdC,wBAAwB;IACxBC,gBAAgB;IAChBC,YAAY;IACZC,YAAY;IACZC,qBAAqB;IACrBC,cAAc;IACdC;EACD,CAAC,GAAGT,MAAM;EAEV,MAAMU,YAAY,GAAG,IAAAC,oCAAsB,EAAC,CAAC;EAE7C,OAAO,IAAAC,+BAAsB,EAC5B,CAAC;IAAEC;EAAmC,CAAC,GAAG,CAAC,CAAC,KAAK;IAChD,SAAS;;IACT,IAAI,CAACZ,OAAO,EAAE;IAEd,MAAMa,OAAO,GAAG,IAAAC,2CAAyB,EAACF,MAAM,CAAC;IAEjD,MAAMG,uBAA2C,GAChD,IAAAC,gDAAuB,EAACf,cAAc,EAAEC,wBAAwB,CAAC,IACjEe,SAAS;IAEV,MAAMC,cAAc,GAAGH,uBAAuB,GAC3CI,kBAAU,CAACC,wBAAwB,CACnCnB,cAAc,EACdc,uBACD,CAAC,GACAI,kBAAU,CAACD,cAAc,CAACjB,cAAc,CAAC;IAC5C,MAAMoB,uBAAuB,GAAGN,uBAAuB,GACpDI,kBAAU,CAACG,aAAa,CAACrB,cAAc,EAAEc,uBAAuB,CAAC,GACjE,KAAK;IACR,MAAMO,aAAa,GAAGH,kBAAU,CAACG,aAAa,CAC7CrB,cAAc,EACdE,gBACD,CAAC;IACD,MAAMoB,kBAAkB,GAAGJ,kBAAU,CAACI,kBAAkB,CACvDtB,cAAc,EACdE,gBACD,CAAC;IAED,MAAMqB,SAAS,GAAG,IAAAC,6CAA2B,EAAC;MAC7CZ,OAAO;MACPK,cAAc;MACdI,aAAa;MACbC,kBAAkB;MAClBF;IACD,CAAC,CAAC;IAEF,IAAI,CAACG,SAAS,CAACE,SAAS,EAAE;MACzB;IACD;IAEA,MAAMC,QAAQ,GAAG,IAAAC,8BAAO,EAACpB,mBAAmB,CAAC;IAC7C,IAAI,CAACmB,QAAQ,EAAE;IAEf,MAAME,iBAAiB,GAAGpB,YAAY,GACnCA,YAAY,CAACqB,kBAAkB,CAACH,QAAQ,CAAC,GACzCA,QAAQ;IAEX,MAAMI,qBAAqB,GAC1B,CAACP,SAAS,CAACQ,qBAAqB,IAChC,CAACvB,YAAY,IACb,CAACA,YAAY,CAACwB,uBAAuB,IACrCxB,YAAY,CAACwB,uBAAuB,CAACJ,iBAAiB,CAAC;IAExD,IACC,CAACE,qBAAqB,IACtB,CAACP,SAAS,CAACU,aAAa,IACxB,CAACV,SAAS,CAACW,aAAa,EACvB;MACD;IACD;IAEA,MAAMC,gBAAgB,GAAGjB,kBAAU,CAACkB,WAAW,CAC9CpC,cAAc,EACdE,gBACD,CAAC;IACD,MAAMmC,kBAAkB,GACvB,CAACF,gBAAgB,IACjB,CAACjD,oBAAoB,CAACiD,gBAAgB,CAACG,MAAM,EAAEV,iBAAiB,CAAC;IAClE,MAAMW,mBAAmB,GAAGF,kBAAkB;IAE9C,IAAAG,oDAAyB,EAAC;MACzBxC,cAAc;MACdE,gBAAgB;MAChBwB,QAAQ,EAAEE,iBAAiB;MAC3BtB,cAAc;MACdH,YAAY;MACZC,YAAY;MACZC,qBAAqB;MACrBS,uBAAuB;MACvB2B,sBAAsB,EAAEF,mBAAmB;MAC3CG,eAAe,EAAEnB,SAAS,CAACU,aAAa;MACxCU,kBAAkB,EAAEpB,SAAS,CAACW,aAAa,IAAIG,kBAAkB;MACjEO,uBAAuB,EACtBrB,SAAS,CAACsB,kBAAkB,IAC5Bf,qBAAqB,IACrBO,kBAAkB;MACnBS,oBAAoB,EACnBvB,SAAS,CAACwB,mBAAmB,IAAIjB;IACnC,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC;AAACkB,OAAA,CAAAnD,0BAAA,GAAAA,0BAAA","ignoreList":[]}
|