react-native-screen-transitions 3.4.0-alpha.7 → 3.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/shared/components/create-boundary-component/components/boundary-target.js +6 -4
- package/lib/commonjs/shared/components/create-boundary-component/components/boundary-target.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +22 -60
- 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 +1 -1
- 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 +56 -41
- 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/use-auto-source-measurement.js +7 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +4 -23
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +111 -2
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.js +69 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/index.js +10 -5
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/commonjs/shared/components/create-transition-aware-component.js +8 -32
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +11 -9
- 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 +7 -5
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/index.js +3 -1
- package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -1
- package/lib/commonjs/shared/constants.js +17 -3
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/hooks/reanimated/use-animated-debounce.js +43 -0
- package/lib/commonjs/shared/hooks/reanimated/use-animated-debounce.js.map +1 -0
- package/lib/commonjs/shared/index.js +6 -0
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js +7 -0
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/commonjs/shared/providers/register-bounds.provider.js +9 -1
- package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js +23 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js +1 -11
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +1 -1
- package/lib/commonjs/shared/stores/animation.store.js +9 -3
- package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/clear.js +23 -167
- package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/presence.js +0 -3
- package/lib/commonjs/shared/stores/bounds/internals/presence.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/registry.js +18 -7
- package/lib/commonjs/shared/stores/bounds/internals/registry.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +7 -51
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/state.js +1 -83
- package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js +10 -0
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/constants.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/{resolve-bound-tag.js → create-bound-tag.js} +5 -5
- package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/{interpolators.js → create-interpolators.js} +6 -6
- package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/{link-accessor.js → create-link-accessor.js} +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +70 -0
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/{style-composers.js → styles/composers.js} +22 -22
- package/lib/commonjs/shared/utils/bounds/helpers/styles/composers.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/{compute-bounds-styles.js → styles/compute.js} +14 -20
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/{interpolate-style.js → styles/interpolate-link-style.js} +4 -4
- package/lib/commonjs/shared/utils/bounds/helpers/styles/interpolate-link-style.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/helpers/styles/styles.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/index.js +16 -44
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/zoom/build.js +234 -50
- package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/zoom/config.js +10 -1
- package/lib/commonjs/shared/utils/bounds/zoom/config.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/zoom/math.js +34 -1
- package/lib/commonjs/shared/utils/bounds/zoom/math.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/components/boundary-target.js +6 -4
- package/lib/module/shared/components/create-boundary-component/components/boundary-target.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +23 -61
- 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 +1 -1
- 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 +54 -39
- 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/use-auto-source-measurement.js +7 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +4 -23
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +114 -4
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.js +64 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/index.js +10 -5
- package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/module/shared/components/create-transition-aware-component.js +10 -34
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +11 -9
- 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 +7 -5
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/index.js +3 -1
- package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -1
- package/lib/module/shared/constants.js +16 -2
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/hooks/reanimated/use-animated-debounce.js +39 -0
- package/lib/module/shared/hooks/reanimated/use-animated-debounce.js.map +1 -0
- package/lib/module/shared/index.js +1 -1
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js +7 -0
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/module/shared/providers/register-bounds.provider.js +9 -1
- package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js +23 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -0
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/styles.provider.js +1 -11
- package/lib/module/shared/providers/screen/styles/styles.provider.js.map +1 -1
- package/lib/module/shared/stores/animation.store.js +9 -3
- package/lib/module/shared/stores/animation.store.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/clear.js +24 -168
- package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/presence.js +1 -4
- package/lib/module/shared/stores/bounds/internals/presence.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/registry.js +19 -8
- package/lib/module/shared/stores/bounds/internals/registry.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +8 -52
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/state.js +0 -78
- package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/module/shared/utils/animation/animate-to-progress.js +10 -0
- package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/module/shared/utils/bounds/constants.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/{resolve-bound-tag.js → create-bound-tag.js} +3 -3
- package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/{interpolators.js → create-interpolators.js} +5 -5
- package/lib/module/shared/utils/bounds/helpers/create-interpolators.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/{link-accessor.js → create-link-accessor.js} +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +64 -0
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/{style-composers.js → styles/composers.js} +22 -22
- package/lib/module/shared/utils/bounds/helpers/styles/composers.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/{compute-bounds-styles.js → styles/compute.js} +12 -18
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/{interpolate-style.js → styles/interpolate-link-style.js} +4 -4
- package/lib/module/shared/utils/bounds/helpers/styles/interpolate-link-style.js.map +1 -0
- package/lib/module/shared/utils/bounds/helpers/styles/styles.js.map +1 -0
- package/lib/module/shared/utils/bounds/index.js +14 -42
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/zoom/build.js +238 -54
- package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/zoom/config.js +9 -0
- package/lib/module/shared/utils/bounds/zoom/config.js.map +1 -1
- package/lib/module/shared/utils/bounds/zoom/math.js +31 -0
- package/lib/module/shared/utils/bounds/zoom/math.js.map +1 -1
- 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 +17 -11
- 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/use-auto-source-measurement.d.ts +3 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts +1 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts +20 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.d.ts +12 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts +10 -4
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts +1 -1
- 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/screen-container/hooks/use-content-layout.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/index.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +33 -1
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/reanimated/use-animated-debounce.d.ts +13 -0
- package/lib/typescript/shared/hooks/reanimated/use-animated-debounce.d.ts.map +1 -0
- package/lib/typescript/shared/index.d.ts +3 -3
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/register-bounds.provider.d.ts +7 -0
- package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts +3 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +3 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts +5 -2
- package/lib/typescript/shared/stores/animation.store.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/presence.d.ts.map +1 -1
- 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 +0 -3
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +0 -2
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +11 -0
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +106 -1
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +1 -1
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts +2 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/constants.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts +7 -0
- package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/{interpolators.d.ts → create-interpolators.d.ts} +3 -3
- package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/{link-accessor.d.ts → create-link-accessor.d.ts} +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +20 -0
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/{style-composers.d.ts → styles/composers.d.ts} +4 -4
- package/lib/typescript/shared/utils/bounds/helpers/styles/composers.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/{compute-bounds-styles.d.ts → styles/compute.d.ts} +3 -3
- package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/{interpolate-style.d.ts → styles/interpolate-link-style.d.ts} +2 -2
- package/lib/typescript/shared/utils/bounds/helpers/styles/interpolate-link-style.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/helpers/styles/styles.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/options.d.ts +3 -2
- package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/config.d.ts +9 -0
- package/lib/typescript/shared/utils/bounds/zoom/config.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/math.d.ts +17 -0
- package/lib/typescript/shared/utils/bounds/zoom/math.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/components/create-boundary-component/components/boundary-target.tsx +6 -4
- package/src/shared/components/create-boundary-component/create-boundary-component.tsx +28 -60
- package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +5 -1
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +72 -53
- package/src/shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts +19 -3
- package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +5 -34
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +180 -6
- package/src/shared/components/create-boundary-component/hooks/use-pre-transition-measurement.ts +110 -0
- package/src/shared/components/create-boundary-component/index.tsx +10 -5
- package/src/shared/components/create-boundary-component/types.ts +1 -2
- package/src/shared/components/create-transition-aware-component.tsx +10 -47
- package/src/shared/components/screen-container/hooks/use-content-layout.ts +10 -17
- package/src/shared/components/screen-container/layers/backdrop.tsx +6 -9
- package/src/shared/components/screen-lifecycle/index.tsx +1 -4
- package/src/shared/constants.ts +11 -1
- package/src/shared/hooks/reanimated/use-animated-debounce.ts +56 -0
- package/src/shared/index.ts +3 -0
- package/src/shared/providers/gestures/handlers/use-handlers.ts +9 -0
- package/src/shared/providers/register-bounds.provider.tsx +8 -1
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state.ts +27 -1
- package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +6 -0
- package/src/shared/providers/screen/styles/styles.provider.tsx +1 -12
- package/src/shared/stores/animation.store.ts +11 -2
- package/src/shared/stores/bounds/internals/clear.ts +47 -220
- package/src/shared/stores/bounds/internals/presence.ts +1 -4
- package/src/shared/stores/bounds/internals/registry.ts +25 -14
- package/src/shared/stores/bounds/internals/resolver.ts +7 -84
- package/src/shared/stores/bounds/internals/state.ts +0 -98
- package/src/shared/stores/bounds/types.ts +0 -2
- package/src/shared/types/animation.types.ts +13 -0
- package/src/shared/types/bounds.types.ts +108 -1
- package/src/shared/types/index.ts +2 -0
- package/src/shared/utils/animation/animate-to-progress.ts +11 -1
- package/src/shared/utils/bounds/{helpers/constants.ts → constants.ts} +1 -1
- package/src/shared/utils/bounds/helpers/{resolve-bound-tag.ts → create-bound-tag.ts} +2 -2
- package/src/shared/utils/bounds/helpers/{interpolators.ts → create-interpolators.ts} +19 -12
- package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +100 -0
- package/src/shared/utils/bounds/helpers/{style-composers.ts → styles/composers.ts} +119 -53
- package/src/shared/utils/bounds/helpers/{compute-bounds-styles.ts → styles/compute.ts} +10 -20
- package/src/shared/utils/bounds/helpers/{interpolate-style.ts → styles/interpolate-link-style.ts} +9 -4
- package/src/shared/utils/bounds/index.ts +13 -53
- package/src/shared/utils/bounds/types/options.ts +3 -2
- package/src/shared/utils/bounds/zoom/build.ts +316 -95
- package/src/shared/utils/bounds/zoom/config.ts +11 -0
- package/src/shared/utils/bounds/zoom/math.ts +57 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +0 -54
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +0 -122
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +0 -72
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +0 -66
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +0 -58
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +0 -53
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/build-bounds-options.js +0 -41
- package/lib/commonjs/shared/utils/bounds/helpers/build-bounds-options.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/constants.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/interpolate-style.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/interpolate.js +0 -20
- package/lib/commonjs/shared/utils/bounds/helpers/interpolate.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/interpolators.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/link-accessor.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/style-composers.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +0 -49
- package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +0 -118
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +0 -67
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +0 -61
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +0 -53
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +0 -48
- package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/build-bounds-options.js +0 -36
- package/lib/module/shared/utils/bounds/helpers/build-bounds-options.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/constants.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/interpolate-style.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/interpolate.js +0 -16
- package/lib/module/shared/utils/bounds/helpers/interpolate.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/interpolators.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/link-accessor.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/style-composers.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/styles.js.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts +0 -11
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts +0 -17
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts +0 -11
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts +0 -10
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts +0 -11
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts +0 -10
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts +0 -14
- package/lib/typescript/shared/utils/bounds/helpers/build-bounds-options.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/constants.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/interpolate-style.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/interpolate.d.ts +0 -2
- package/lib/typescript/shared/utils/bounds/helpers/interpolate.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/interpolators.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/link-accessor.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts +0 -7
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/style-composers.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles.d.ts.map +0 -1
- package/src/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.ts +0 -58
- package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +0 -162
- package/src/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.ts +0 -82
- package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +0 -92
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.ts +0 -87
- package/src/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.ts +0 -49
- package/src/shared/utils/bounds/helpers/build-bounds-options.ts +0 -48
- package/src/shared/utils/bounds/helpers/interpolate.ts +0 -19
- /package/lib/commonjs/shared/utils/bounds/{helpers/constants.js → constants.js} +0 -0
- /package/lib/commonjs/shared/utils/bounds/helpers/{styles.js → styles/styles.js} +0 -0
- /package/lib/module/shared/utils/bounds/{helpers/constants.js → constants.js} +0 -0
- /package/lib/module/shared/utils/bounds/helpers/{styles.js → styles/styles.js} +0 -0
- /package/lib/typescript/shared/utils/bounds/{helpers/constants.d.ts → constants.d.ts} +0 -0
- /package/lib/typescript/shared/utils/bounds/helpers/{styles.d.ts → styles/styles.d.ts} +0 -0
- /package/src/shared/utils/bounds/helpers/{link-accessor.ts → create-link-accessor.ts} +0 -0
- /package/src/shared/utils/bounds/helpers/{styles.ts → styles/styles.ts} +0 -0
package/lib/commonjs/shared/components/create-boundary-component/components/boundary-target.js
CHANGED
|
@@ -16,19 +16,21 @@ const BoundaryTarget = exports.BoundaryTarget = /*#__PURE__*/(0, _react.memo)(fu
|
|
|
16
16
|
} = props;
|
|
17
17
|
const targetAnimatedRef = (0, _reactNativeReanimated.useAnimatedRef)();
|
|
18
18
|
const ownerContext = (0, _boundaryOwner.useBoundaryOwnerContext)();
|
|
19
|
+
const registerTargetRef = ownerContext?.registerTargetRef;
|
|
20
|
+
const unregisterTargetRef = ownerContext?.unregisterTargetRef;
|
|
19
21
|
const isActiveTarget = ownerContext?.activeTargetRef === targetAnimatedRef;
|
|
20
22
|
(0, _react.useLayoutEffect)(() => {
|
|
21
|
-
if (!
|
|
23
|
+
if (!registerTargetRef || !unregisterTargetRef) {
|
|
22
24
|
if (__DEV__) {
|
|
23
25
|
console.warn(_boundaryOwner.TARGET_OUTSIDE_OWNER_WARNING);
|
|
24
26
|
}
|
|
25
27
|
return;
|
|
26
28
|
}
|
|
27
|
-
|
|
29
|
+
registerTargetRef(targetAnimatedRef);
|
|
28
30
|
return () => {
|
|
29
|
-
|
|
31
|
+
unregisterTargetRef(targetAnimatedRef);
|
|
30
32
|
};
|
|
31
|
-
}, [
|
|
33
|
+
}, [registerTargetRef, unregisterTargetRef, targetAnimatedRef]);
|
|
32
34
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
33
35
|
...rest,
|
|
34
36
|
ref: targetAnimatedRef,
|
package/lib/commonjs/shared/components/create-boundary-component/components/boundary-target.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_boundaryOwner","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BoundaryTarget","exports","memo","props","style","rest","targetAnimatedRef","useAnimatedRef","ownerContext","useBoundaryOwnerContext","isActiveTarget","activeTargetRef","useLayoutEffect","__DEV__","console","warn","TARGET_OUTSIDE_OWNER_WARNING","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_boundaryOwner","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BoundaryTarget","exports","memo","props","style","rest","targetAnimatedRef","useAnimatedRef","ownerContext","useBoundaryOwnerContext","registerTargetRef","unregisterTargetRef","isActiveTarget","activeTargetRef","useLayoutEffect","__DEV__","console","warn","TARGET_OUTSIDE_OWNER_WARNING","jsx","View","ref","associatedTargetStyles","undefined","collapsable"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/components/boundary-target.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAG8C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SA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J,iBAAiB,IAAI,CAACC,mBAAmB,EAAE;MAC/C,IAAII,OAAO,EAAE;QACZC,OAAO,CAACC,IAAI,CAACC,2CAA4B,CAAC;MAC3C;MACA;IACD;IAEAR,iBAAiB,CAACJ,iBAAiB,CAAC;IACpC,OAAO,MAAM;MACZK,mBAAmB,CAACL,iBAAiB,CAAC;IACvC,CAAC;EACF,CAAC,EAAE,CAACI,iBAAiB,EAAEC,mBAAmB,EAAEL,iBAAiB,CAAC,CAAC;EAE/D,oBACC,IAAA1B,WAAA,CAAAuC,GAAA,EAAC1C,sBAAA,CAAAc,OAAQ,CAAC6B,IAAI;IAAA,GACTf,IAAI;IACRgB,GAAG,EAAEf,iBAAkB;IACvBF,KAAK,EAAE,CACNA,KAAK,EACLQ,cAAc,GAAGJ,YAAY,CAACc,sBAAsB,GAAGC,SAAS,CAC/D;IACFC,WAAW,EAAE;EAAM,CACnB,CAAC;AAEJ,CAAC,CAAC","ignoreList":[]}
|
package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js
CHANGED
|
@@ -11,16 +11,12 @@ var _descriptors = require("../../providers/screen/descriptors");
|
|
|
11
11
|
var _styles = require("../../providers/screen/styles");
|
|
12
12
|
var _animation = require("../../stores/animation.store");
|
|
13
13
|
var _bounds = require("../../stores/bounds");
|
|
14
|
-
var _styles2 = require("../../utils/bounds/helpers/styles");
|
|
14
|
+
var _styles2 = require("../../utils/bounds/helpers/styles/styles");
|
|
15
15
|
var _useAutoSourceMeasurement = require("./hooks/use-auto-source-measurement");
|
|
16
16
|
var _useBoundaryMeasureAndStore = require("./hooks/use-boundary-measure-and-store");
|
|
17
17
|
var _useBoundaryPresence = require("./hooks/use-boundary-presence");
|
|
18
|
-
var _useGroupActiveMeasurement = require("./hooks/use-group-active-measurement");
|
|
19
|
-
var _useGroupActiveSourceMeasurement = require("./hooks/use-group-active-source-measurement");
|
|
20
|
-
var _useInitialLayoutHandler = require("./hooks/use-initial-layout-handler");
|
|
21
18
|
var _usePendingDestinationMeasurement = require("./hooks/use-pending-destination-measurement");
|
|
22
|
-
var
|
|
23
|
-
var _useScrollSettledMeasurement = require("./hooks/use-scroll-settled-measurement");
|
|
19
|
+
var _usePreTransitionMeasurement = require("./hooks/use-pre-transition-measurement");
|
|
24
20
|
var _boundaryOwner = require("./providers/boundary-owner.provider");
|
|
25
21
|
var _buildBoundaryMatchKey = require("./utils/build-boundary-match-key");
|
|
26
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -30,7 +26,7 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
30
26
|
alreadyAnimated = false
|
|
31
27
|
} = options;
|
|
32
28
|
const AnimatedComponent = alreadyAnimated ? Wrapped : _reactNativeReanimated.default.createAnimatedComponent(Wrapped);
|
|
33
|
-
const Inner = /*#__PURE__*/(0, _react.forwardRef)((props,
|
|
29
|
+
const Inner = /*#__PURE__*/(0, _react.forwardRef)((props, forwardedRef) => {
|
|
34
30
|
const ownerRef = (0, _reactNativeReanimated.useAnimatedRef)();
|
|
35
31
|
const {
|
|
36
32
|
enabled = true,
|
|
@@ -59,7 +55,6 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
59
55
|
} = (0, _descriptors.useDescriptorDerivations)();
|
|
60
56
|
const runtimeEnabled = enabled && hasConfiguredInterpolator;
|
|
61
57
|
const hasNextScreen = !!nextScreenKey;
|
|
62
|
-
const shouldUpdateDestination = !hasNextScreen;
|
|
63
58
|
const boundaryConfig = (0, _react.useMemo)(() => {
|
|
64
59
|
if (anchor === undefined && scaleMode === undefined && target === undefined && method === undefined) {
|
|
65
60
|
return undefined;
|
|
@@ -103,7 +98,7 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
103
98
|
hasActiveTarget
|
|
104
99
|
} = (0, _boundaryOwner.useBoundaryOwner)({
|
|
105
100
|
ownerRef,
|
|
106
|
-
associatedTargetStyles:
|
|
101
|
+
associatedTargetStyles: runtimeEnabled ? associatedStyles : undefined
|
|
107
102
|
});
|
|
108
103
|
const maybeMeasureAndStore = (0, _useBoundaryMeasureAndStore.useBoundaryMeasureAndStore)({
|
|
109
104
|
enabled,
|
|
@@ -113,7 +108,6 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
113
108
|
ancestorKeys,
|
|
114
109
|
navigatorKey,
|
|
115
110
|
ancestorNavigatorKeys,
|
|
116
|
-
isAnimating,
|
|
117
111
|
preparedStyles,
|
|
118
112
|
measuredAnimatedRef: measuredRef
|
|
119
113
|
});
|
|
@@ -136,71 +130,38 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
136
130
|
(0, _useAutoSourceMeasurement.useAutoSourceMeasurement)({
|
|
137
131
|
enabled: runtimeEnabled,
|
|
138
132
|
sharedBoundTag,
|
|
133
|
+
id,
|
|
134
|
+
group,
|
|
139
135
|
nextScreenKey,
|
|
140
136
|
maybeMeasureAndStore
|
|
141
137
|
});
|
|
142
138
|
|
|
143
|
-
//
|
|
144
|
-
//
|
|
139
|
+
// Destination completion path: do one immediate completion attempt when a
|
|
140
|
+
// pending source link appears, then retry during transition progress if the
|
|
141
|
+
// first attempt races layout readiness.
|
|
145
142
|
(0, _usePendingDestinationMeasurement.usePendingDestinationMeasurement)({
|
|
146
143
|
sharedBoundTag,
|
|
147
144
|
enabled: shouldRunDestinationEffects,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
// Reliability fallback: retry destination capture during transition progress
|
|
153
|
-
// when the initial pending-destination attempt happens before layout is ready.
|
|
154
|
-
(0, _usePendingDestinationRetryMeasurement.usePendingDestinationRetryMeasurement)({
|
|
155
|
-
sharedBoundTag,
|
|
156
|
-
enabled: shouldRunDestinationEffects,
|
|
145
|
+
id,
|
|
146
|
+
group,
|
|
157
147
|
currentScreenKey,
|
|
158
148
|
expectedSourceScreenKey: preferredSourceScreenKey,
|
|
159
149
|
animating: isAnimating,
|
|
160
150
|
maybeMeasureAndStore
|
|
161
151
|
});
|
|
162
152
|
|
|
163
|
-
//
|
|
164
|
-
//
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
id,
|
|
169
|
-
currentScreenKey,
|
|
170
|
-
shouldUpdateDestination,
|
|
171
|
-
maybeMeasureAndStore
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
// Source-side grouped retargeting: when an unfocused/source boundary
|
|
175
|
-
// becomes the active member, refresh its snapshot and source link so
|
|
176
|
-
// close transitions do not use stale pre-scroll geometry.
|
|
177
|
-
(0, _useGroupActiveSourceMeasurement.useGroupActiveSourceMeasurement)({
|
|
153
|
+
// Pre-transition measurement path: when this route or its next sibling is
|
|
154
|
+
// about to animate, capture or refresh the measurements needed before
|
|
155
|
+
// progress or transform state mutates. Grouped sources refresh existing
|
|
156
|
+
// links; plain sources only backfill when missing.
|
|
157
|
+
(0, _usePreTransitionMeasurement.usePreTransitionMeasurement)({
|
|
178
158
|
enabled: runtimeEnabled,
|
|
179
|
-
|
|
159
|
+
sharedBoundTag,
|
|
180
160
|
id,
|
|
181
|
-
hasNextScreen,
|
|
182
|
-
isAnimating,
|
|
183
|
-
maybeMeasureAndStore
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
// While idle on source screens, re-measure after scroll settles so a later
|
|
187
|
-
// close transition starts from up-to-date source geometry.
|
|
188
|
-
(0, _useScrollSettledMeasurement.useScrollSettledMeasurement)({
|
|
189
|
-
enabled: runtimeEnabled,
|
|
190
161
|
group,
|
|
191
|
-
hasNextScreen,
|
|
192
|
-
isAnimating,
|
|
193
|
-
maybeMeasureAndStore
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
// Destination mount-time capture path: onLayout schedules a one-time UI-thread
|
|
197
|
-
// initial measurement when transitions are active.
|
|
198
|
-
(0, _useInitialLayoutHandler.useInitialLayoutHandler)({
|
|
199
|
-
enabled: runtimeEnabled,
|
|
200
|
-
sharedBoundTag,
|
|
201
162
|
currentScreenKey,
|
|
202
|
-
|
|
203
|
-
|
|
163
|
+
nextScreenKey,
|
|
164
|
+
hasNextScreen,
|
|
204
165
|
maybeMeasureAndStore
|
|
205
166
|
});
|
|
206
167
|
const handlePress = (0, _react.useCallback)((...args) => {
|
|
@@ -216,17 +177,18 @@ function createBoundaryComponent(Wrapped, options = {}) {
|
|
|
216
177
|
}
|
|
217
178
|
}, [group, id, maybeMeasureAndStore, onPress]);
|
|
218
179
|
const resolvedOnPress = typeof onPress === "function" ? handlePress : undefined;
|
|
180
|
+
(0, _react.useImperativeHandle)(forwardedRef, () => ownerRef.current, [ownerRef]);
|
|
219
181
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_boundaryOwner.BoundaryOwnerProvider, {
|
|
220
182
|
value: contextValue,
|
|
221
183
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedComponent, {
|
|
222
184
|
...rest,
|
|
223
185
|
ref: ownerRef,
|
|
224
|
-
style: [style,
|
|
186
|
+
style: [style, runtimeEnabled ? hasActiveTarget ? associatedStackingStyles : associatedStyles : undefined],
|
|
225
187
|
onPress: resolvedOnPress,
|
|
226
188
|
collapsable: false
|
|
227
189
|
})
|
|
228
190
|
});
|
|
229
191
|
});
|
|
230
|
-
return /*#__PURE__*/(0, _react.memo)(Inner);
|
|
192
|
+
return /*#__PURE__*/(0, _react.memo)(_reactNativeReanimated.default.createAnimatedComponent(Inner));
|
|
231
193
|
}
|
|
232
194
|
//# sourceMappingURL=create-boundary-component.js.map
|
package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_constants","_descriptors","_styles","_animation","_bounds","_styles2","_useAutoSourceMeasurement","_useBoundaryMeasureAndStore","_useBoundaryPresence","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_constants","_descriptors","_styles","_animation","_bounds","_styles2","_useAutoSourceMeasurement","_useBoundaryMeasureAndStore","_useBoundaryPresence","_usePendingDestinationMeasurement","_usePreTransitionMeasurement","_boundaryOwner","_buildBoundaryMatchKey","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","createBoundaryComponent","Wrapped","options","alreadyAnimated","AnimatedComponent","Animated","createAnimatedComponent","Inner","forwardRef","props","forwardedRef","ownerRef","useAnimatedRef","enabled","group","id","anchor","scaleMode","target","method","style","onPress","rest","sharedBoundTag","buildBoundaryMatchKey","previousScreenKey","preferredSourceScreenKey","currentScreenKey","nextScreenKey","ancestorKeys","navigatorKey","ancestorNavigatorKeys","hasConfiguredInterpolator","useDescriptorDerivations","runtimeEnabled","hasNextScreen","boundaryConfig","useMemo","undefined","isAnimating","AnimationStore","getValue","preparedStyles","prepareStyleForBounds","elementStylesMap","useScreenStyles","associatedStyles","useAnimatedStyle","baseStyle","value","NO_STYLES","opacity","associatedStackingStyles","zIndex","elevation","contextValue","measuredRef","hasActiveTarget","useBoundaryOwner","associatedTargetStyles","maybeMeasureAndStore","useBoundaryMeasureAndStore","measuredAnimatedRef","shouldRunDestinationEffects","useBoundaryPresence","useAutoSourceMeasurement","usePendingDestinationMeasurement","expectedSourceScreenKey","animating","usePreTransitionMeasurement","handlePress","useCallback","args","runOnUI","BoundStore","setGroupActiveId","String","intent","resolvedOnPress","useImperativeHandle","current","jsx","BoundaryOwnerProvider","children","ref","collapsable","memo"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/create-boundary-component.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,sBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAKA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OA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O,CAC1C,CAAC;IAED,MAAMyD,eAAe,GACpB,OAAOzD,OAAO,KAAK,UAAU,GAAGiD,WAAW,GAAGhC,SAAS;IAExD,IAAAyC,0BAAmB,EAACrE,YAAY,EAAE,MAAMC,QAAQ,CAACqE,OAAc,EAAE,CAChErE,QAAQ,CACR,CAAC;IAEF,oBACC,IAAA/B,WAAA,CAAAqG,GAAA,EAACvG,cAAA,CAAAwG,qBAAqB;MAACjC,KAAK,EAAEM,YAAa;MAAA4B,QAAA,eAC1C,IAAAvG,WAAA,CAAAqG,GAAA,EAAC7E,iBAAiB;QAAA,GACbkB,IAAI;QACR8D,GAAG,EAAEzE,QAAS;QACdS,KAAK,EAAE,CACNA,KAAK,EACLc,cAAc,GACXuB,eAAe,GACdL,wBAAwB,GACxBN,gBAAgB,GACjBR,SAAS,CACX;QACFjB,OAAO,EAAEyD,eAAgB;QACzBO,WAAW,EAAE;MAAM,CACnB;IAAC,CACoB,CAAC;EAE1B,CAAC,CAAC;EAEF,oBAAO,IAAAC,WAAI,EACVjF,8BAAQ,CAACC,uBAAuB,CAACC,KAAK,CACvC,CAAC;AAMF","ignoreList":[]}
|
|
@@ -8,7 +8,7 @@ var _bounds = require("../../../stores/bounds");
|
|
|
8
8
|
const resolvePendingSourceKey = (sharedBoundTag, expectedSourceScreenKey) => {
|
|
9
9
|
"worklet";
|
|
10
10
|
|
|
11
|
-
if (expectedSourceScreenKey && _bounds.BoundStore.hasPendingLinkFromSource(sharedBoundTag, expectedSourceScreenKey)) {
|
|
11
|
+
if (expectedSourceScreenKey && (_bounds.BoundStore.hasPendingLinkFromSource(sharedBoundTag, expectedSourceScreenKey) || _bounds.BoundStore.hasSourceLink(sharedBoundTag, expectedSourceScreenKey))) {
|
|
12
12
|
return expectedSourceScreenKey;
|
|
13
13
|
}
|
|
14
14
|
return _bounds.BoundStore.getLatestPendingSourceScreenKey(sharedBoundTag);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_bounds","require","resolvePendingSourceKey","sharedBoundTag","expectedSourceScreenKey","BoundStore","hasPendingLinkFromSource","getLatestPendingSourceScreenKey","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEO,MAAMC,uBAAuB,GAAGA,CACtCC,cAAsB,EACtBC,uBAAgC,KACb;EACnB,SAAS;;EACT,IACCA,uBAAuB,
|
|
1
|
+
{"version":3,"names":["_bounds","require","resolvePendingSourceKey","sharedBoundTag","expectedSourceScreenKey","BoundStore","hasPendingLinkFromSource","hasSourceLink","getLatestPendingSourceScreenKey","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEO,MAAMC,uBAAuB,GAAGA,CACtCC,cAAsB,EACtBC,uBAAgC,KACb;EACnB,SAAS;;EACT,IACCA,uBAAuB,KACtBC,kBAAU,CAACC,wBAAwB,CACnCH,cAAc,EACdC,uBACD,CAAC,IACAC,kBAAU,CAACE,aAAa,CAACJ,cAAc,EAAEC,uBAAuB,CAAC,CAAC,EAClE;IACD,OAAOA,uBAAuB;EAC/B;EAEA,OAAOC,kBAAU,CAACG,+BAA+B,CAACL,cAAc,CAAC;AAClE,CAAC;AAACM,OAAA,CAAAP,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.shouldTriggerScrollSettledRefresh = exports.
|
|
6
|
+
exports.shouldTriggerScrollSettledRefresh = exports.resolvePrepareSourceMeasurementIntent = exports.resolvePendingDestinationRetrySignal = exports.resolvePendingDestinationCaptureSignal = exports.resolveMeasurementWritePlan = exports.resolveGroupActiveMeasurementAction = exports.resolveAutoSourceCaptureSignal = exports.getMeasurementIntentFlags = exports.canFlushGroupActiveMeasurement = exports.PREPARE_DESTINATION_MEASUREMENT_INTENT = void 0;
|
|
7
7
|
const getMeasurementIntentFlags = intent => {
|
|
8
8
|
"worklet";
|
|
9
9
|
|
|
@@ -11,8 +11,7 @@ const getMeasurementIntentFlags = intent => {
|
|
|
11
11
|
captureSource: false,
|
|
12
12
|
completeDestination: false,
|
|
13
13
|
refreshSource: false,
|
|
14
|
-
refreshDestination: false
|
|
15
|
-
snapshotOnly: false
|
|
14
|
+
refreshDestination: false
|
|
16
15
|
};
|
|
17
16
|
if (!intent) {
|
|
18
17
|
return flags;
|
|
@@ -32,9 +31,6 @@ const getMeasurementIntentFlags = intent => {
|
|
|
32
31
|
case "refresh-destination":
|
|
33
32
|
flags.refreshDestination = true;
|
|
34
33
|
break;
|
|
35
|
-
case "snapshot-only":
|
|
36
|
-
flags.snapshotOnly = true;
|
|
37
|
-
break;
|
|
38
34
|
}
|
|
39
35
|
}
|
|
40
36
|
return flags;
|
|
@@ -47,45 +43,67 @@ const resolveMeasurementWritePlan = params => {
|
|
|
47
43
|
intents,
|
|
48
44
|
hasPendingLink,
|
|
49
45
|
hasSourceLink,
|
|
50
|
-
hasDestinationLink
|
|
46
|
+
hasDestinationLink,
|
|
47
|
+
hasAttachableSourceLink
|
|
51
48
|
} = params;
|
|
52
49
|
const captureSource = intents.captureSource;
|
|
53
|
-
const completeDestination = intents.completeDestination && hasPendingLink;
|
|
50
|
+
const completeDestination = intents.completeDestination && (hasPendingLink || hasAttachableSourceLink);
|
|
54
51
|
const refreshSource = intents.refreshSource && hasSourceLink;
|
|
55
|
-
const refreshDestination = intents.refreshDestination && (hasDestinationLink || hasPendingLink);
|
|
56
|
-
const
|
|
57
|
-
const writesAny = registerSnapshot || captureSource || completeDestination || refreshSource || refreshDestination;
|
|
52
|
+
const refreshDestination = intents.refreshDestination && (hasDestinationLink || hasPendingLink || hasAttachableSourceLink);
|
|
53
|
+
const writesAny = captureSource || completeDestination || refreshSource || refreshDestination;
|
|
58
54
|
return {
|
|
59
55
|
captureSource,
|
|
60
56
|
completeDestination,
|
|
61
57
|
refreshSource,
|
|
62
58
|
refreshDestination,
|
|
63
|
-
registerSnapshot,
|
|
64
59
|
writesAny,
|
|
65
60
|
wantsDestinationWrite: completeDestination || refreshDestination
|
|
66
61
|
};
|
|
67
62
|
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Temporarily removed destination-match gating for auto source capture.
|
|
66
|
+
*
|
|
67
|
+
* For now, any enabled boundary on a source screen will eagerly capture when a
|
|
68
|
+
* next screen exists, even if no matching destination boundary has registered
|
|
69
|
+
* presence yet. The previous behavior waited for an explicit destination match
|
|
70
|
+
* before allowing source capture.
|
|
71
|
+
*/
|
|
68
72
|
exports.resolveMeasurementWritePlan = resolveMeasurementWritePlan;
|
|
69
73
|
const resolveAutoSourceCaptureSignal = params => {
|
|
70
74
|
"worklet";
|
|
71
75
|
|
|
72
76
|
const {
|
|
73
77
|
enabled,
|
|
74
|
-
nextScreenKey
|
|
75
|
-
tagPresence
|
|
78
|
+
nextScreenKey
|
|
76
79
|
} = params;
|
|
77
80
|
if (!enabled) return 0;
|
|
78
81
|
if (!nextScreenKey) return 0;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Temporarily removed destination-match gating for auto source capture.
|
|
85
|
+
*
|
|
86
|
+
* For now, any enabled boundary on a source screen will eagerly capture when
|
|
87
|
+
* a next screen exists, even if no matching destination boundary has
|
|
88
|
+
* registered presence yet. The previous behavior waited for an explicit
|
|
89
|
+
* destination match before allowing source capture.
|
|
90
|
+
*/
|
|
91
|
+
// const tagPresence = params.tagPresence;
|
|
92
|
+
// if (!tagPresence) return 0;
|
|
93
|
+
//
|
|
94
|
+
// const direct = tagPresence[nextScreenKey];
|
|
95
|
+
// if (direct && direct.count > 0) return nextScreenKey;
|
|
96
|
+
//
|
|
97
|
+
// for (const screenKey in tagPresence) {
|
|
98
|
+
// const entry = tagPresence[screenKey];
|
|
99
|
+
// if (entry.ancestorKeys?.includes(nextScreenKey)) {
|
|
100
|
+
// return nextScreenKey;
|
|
101
|
+
// }
|
|
102
|
+
// }
|
|
103
|
+
//
|
|
104
|
+
// return 0;
|
|
105
|
+
|
|
106
|
+
return nextScreenKey;
|
|
89
107
|
};
|
|
90
108
|
exports.resolveAutoSourceCaptureSignal = resolveAutoSourceCaptureSignal;
|
|
91
109
|
const resolvePendingDestinationCaptureSignal = params => {
|
|
@@ -94,11 +112,14 @@ const resolvePendingDestinationCaptureSignal = params => {
|
|
|
94
112
|
const {
|
|
95
113
|
enabled,
|
|
96
114
|
resolvedSourceKey,
|
|
97
|
-
|
|
115
|
+
hasAttachableSourceLink,
|
|
116
|
+
hasDestinationLink
|
|
98
117
|
} = params;
|
|
99
118
|
if (!enabled) return 0;
|
|
100
119
|
if (!resolvedSourceKey) return 0;
|
|
101
|
-
|
|
120
|
+
if (!hasAttachableSourceLink) return 0;
|
|
121
|
+
if (hasDestinationLink) return 0;
|
|
122
|
+
return resolvedSourceKey;
|
|
102
123
|
};
|
|
103
124
|
exports.resolvePendingDestinationCaptureSignal = resolvePendingDestinationCaptureSignal;
|
|
104
125
|
const resolvePendingDestinationRetrySignal = params => {
|
|
@@ -114,7 +135,7 @@ const resolvePendingDestinationRetrySignal = params => {
|
|
|
114
135
|
retryProgressMax,
|
|
115
136
|
retryProgressBuckets,
|
|
116
137
|
resolvedSourceKey,
|
|
117
|
-
|
|
138
|
+
hasAttachableSourceLink
|
|
118
139
|
} = params;
|
|
119
140
|
if (!enabled) return 0;
|
|
120
141
|
if (retryCount >= maxRetries) return 0;
|
|
@@ -122,26 +143,20 @@ const resolvePendingDestinationRetrySignal = params => {
|
|
|
122
143
|
if (hasDestinationLink) return 0;
|
|
123
144
|
if (progress <= 0 || progress >= retryProgressMax) return 0;
|
|
124
145
|
if (!resolvedSourceKey) return 0;
|
|
125
|
-
if (!
|
|
146
|
+
if (!hasAttachableSourceLink) return 0;
|
|
126
147
|
return Math.floor(progress * retryProgressBuckets) + 1;
|
|
127
148
|
};
|
|
128
149
|
exports.resolvePendingDestinationRetrySignal = resolvePendingDestinationRetrySignal;
|
|
129
|
-
const
|
|
150
|
+
const resolvePrepareSourceMeasurementIntent = params => {
|
|
130
151
|
"worklet";
|
|
131
152
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
isAnyAnimating,
|
|
137
|
-
hasPendingLinkFromSource
|
|
138
|
-
} = params;
|
|
139
|
-
if (!enabled) return null;
|
|
140
|
-
if (!hasSharedBoundTag || hasMeasuredOnLayout) return null;
|
|
141
|
-
if (!isAnyAnimating) return null;
|
|
142
|
-
return hasPendingLinkFromSource ? "complete-destination" : null;
|
|
153
|
+
if (!params.hasSourceLink) {
|
|
154
|
+
return "capture-source";
|
|
155
|
+
}
|
|
156
|
+
return params.shouldRefreshExistingSource ? "refresh-source" : null;
|
|
143
157
|
};
|
|
144
|
-
exports.
|
|
158
|
+
exports.resolvePrepareSourceMeasurementIntent = resolvePrepareSourceMeasurementIntent;
|
|
159
|
+
const PREPARE_DESTINATION_MEASUREMENT_INTENT = exports.PREPARE_DESTINATION_MEASUREMENT_INTENT = ["complete-destination", "refresh-destination"];
|
|
145
160
|
const resolveGroupActiveMeasurementAction = params => {
|
|
146
161
|
"worklet";
|
|
147
162
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getMeasurementIntentFlags","intent","flags","captureSource","completeDestination","refreshSource","refreshDestination","
|
|
1
|
+
{"version":3,"names":["getMeasurementIntentFlags","intent","flags","captureSource","completeDestination","refreshSource","refreshDestination","intents","Array","isArray","i","length","exports","resolveMeasurementWritePlan","params","hasPendingLink","hasSourceLink","hasDestinationLink","hasAttachableSourceLink","writesAny","wantsDestinationWrite","resolveAutoSourceCaptureSignal","enabled","nextScreenKey","resolvePendingDestinationCaptureSignal","resolvedSourceKey","resolvePendingDestinationRetrySignal","retryCount","maxRetries","isAnimating","progress","retryProgressMax","retryProgressBuckets","Math","floor","resolvePrepareSourceMeasurementIntent","shouldRefreshExistingSource","PREPARE_DESTINATION_MEASUREMENT_INTENT","resolveGroupActiveMeasurementAction","isEligible","memberId","activeId","previousActiveId","canFlushGroupActiveMeasurement","shouldTriggerScrollSettledRefresh","group","hasNextScreen","hasSettledSignal","signal","previousSignal"],"sourceRoot":"../../../../../../../src","sources":["shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts"],"mappings":";;;;;;AA4BO,MAAMA,yBAAyB,GACrCC,MAAyD,IAC7B;EAC5B,SAAS;;EACT,MAAMC,KAA6B,GAAG;IACrCC,aAAa,EAAE,KAAK;IACpBC,mBAAmB,EAAE,KAAK;IAC1BC,aAAa,EAAE,KAAK;IACpBC,kBAAkB,EAAE;EACrB,CAAC;EAED,IAAI,CAACL,MAAM,EAAE;IACZ,OAAOC,KAAK;EACb;EAEA,MAAMK,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACR,MAAM,CAAC,GAAGA,MAAM,GAAG,CAACA,MAAM,CAAC;EAEzD,KAAK,IAAIS,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,OAAO,CAACI,MAAM,EAAED,CAAC,EAAE,EAAE;IACxC,QAAQH,OAAO,CAACG,CAAC,CAAC;MACjB,KAAK,gBAAgB;QACpBR,KAAK,CAACC,aAAa,GAAG,IAAI;QAC1B;MACD,KAAK,sBAAsB;QAC1BD,KAAK,CAACE,mBAAmB,GAAG,IAAI;QAChC;MACD,KAAK,gBAAgB;QACpBF,KAAK,CAACG,aAAa,GAAG,IAAI;QAC1B;MACD,KAAK,qBAAqB;QACzBH,KAAK,CAACI,kBAAkB,GAAG,IAAI;QAC/B;IACF;EACD;EAEA,OAAOJ,KAAK;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AM,KAAKC,cAAc,EAAE,OAAO,KAAK;EAC3D,OAAO,IAAI;AACZ,CAAC;AAACrC,OAAA,CAAAgC,iCAAA,GAAAA,iCAAA","ignoreList":[]}
|
|
@@ -11,6 +11,8 @@ const useAutoSourceMeasurement = params => {
|
|
|
11
11
|
const {
|
|
12
12
|
enabled,
|
|
13
13
|
sharedBoundTag,
|
|
14
|
+
id,
|
|
15
|
+
group,
|
|
14
16
|
nextScreenKey,
|
|
15
17
|
maybeMeasureAndStore
|
|
16
18
|
} = params;
|
|
@@ -29,10 +31,14 @@ const useAutoSourceMeasurement = params => {
|
|
|
29
31
|
if (!enabled) return;
|
|
30
32
|
if (!nextScreenKey) return;
|
|
31
33
|
if (!captureSignal || captureSignal === previousCaptureSignal) return;
|
|
34
|
+
const currentGroupActiveId = group ? _bounds.BoundStore.getGroupActiveId(group) : null;
|
|
35
|
+
if (group && currentGroupActiveId !== String(id)) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
32
38
|
maybeMeasureAndStore({
|
|
33
39
|
intent: "capture-source"
|
|
34
40
|
});
|
|
35
|
-
}, [enabled, nextScreenKey, sharedBoundTag, boundaryPresence, maybeMeasureAndStore]);
|
|
41
|
+
}, [enabled, id, group, nextScreenKey, sharedBoundTag, boundaryPresence, maybeMeasureAndStore]);
|
|
36
42
|
};
|
|
37
43
|
exports.useAutoSourceMeasurement = useAutoSourceMeasurement;
|
|
38
44
|
//# sourceMappingURL=use-auto-source-measurement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_bounds","_measurementRules","useAutoSourceMeasurement","params","enabled","sharedBoundTag","nextScreenKey","maybeMeasureAndStore","boundaryPresence","BoundStore","getBoundaryPresence","useAnimatedReaction","resolveAutoSourceCaptureSignal","tagPresence","value","captureSignal","previousCaptureSignal","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,
|
|
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":[]}
|
|
@@ -27,7 +27,6 @@ const useBoundaryMeasureAndStore = params => {
|
|
|
27
27
|
ancestorKeys,
|
|
28
28
|
navigatorKey,
|
|
29
29
|
ancestorNavigatorKeys,
|
|
30
|
-
isAnimating,
|
|
31
30
|
preparedStyles,
|
|
32
31
|
measuredAnimatedRef
|
|
33
32
|
} = params;
|
|
@@ -40,34 +39,16 @@ const useBoundaryMeasureAndStore = params => {
|
|
|
40
39
|
if (!enabled) return;
|
|
41
40
|
const intents = (0, _measurementRules.getMeasurementIntentFlags)(intent);
|
|
42
41
|
const expectedSourceScreenKey = (0, _resolvePendingSourceKey.resolvePendingSourceKey)(sharedBoundTag, preferredSourceScreenKey) || undefined;
|
|
43
|
-
if (intents.captureSource && isAnimating.get()) {
|
|
44
|
-
const existing = _bounds.BoundStore.getSnapshot(sharedBoundTag, currentScreenKey);
|
|
45
|
-
if (existing) {
|
|
46
|
-
(0, _applyMeasuredBoundsWrites.applyMeasuredBoundsWrites)({
|
|
47
|
-
sharedBoundTag,
|
|
48
|
-
ancestorKeys,
|
|
49
|
-
navigatorKey,
|
|
50
|
-
ancestorNavigatorKeys,
|
|
51
|
-
currentScreenKey,
|
|
52
|
-
measured: existing.bounds,
|
|
53
|
-
preparedStyles,
|
|
54
|
-
shouldSetSource: true
|
|
55
|
-
});
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// No cached snapshot while animating.
|
|
60
|
-
// Fall through to a live measurement so rapid retargeting still
|
|
61
|
-
// captures a valid source link.
|
|
62
|
-
}
|
|
63
42
|
const hasPendingLink = expectedSourceScreenKey ? _bounds.BoundStore.hasPendingLinkFromSource(sharedBoundTag, expectedSourceScreenKey) : _bounds.BoundStore.hasPendingLink(sharedBoundTag);
|
|
43
|
+
const hasAttachableSourceLink = expectedSourceScreenKey ? _bounds.BoundStore.hasSourceLink(sharedBoundTag, expectedSourceScreenKey) : false;
|
|
64
44
|
const hasSourceLink = _bounds.BoundStore.hasSourceLink(sharedBoundTag, currentScreenKey);
|
|
65
45
|
const hasDestinationLink = _bounds.BoundStore.hasDestinationLink(sharedBoundTag, currentScreenKey);
|
|
66
46
|
const writePlan = (0, _measurementRules.resolveMeasurementWritePlan)({
|
|
67
47
|
intents,
|
|
68
48
|
hasPendingLink,
|
|
69
49
|
hasSourceLink,
|
|
70
|
-
hasDestinationLink
|
|
50
|
+
hasDestinationLink,
|
|
51
|
+
hasAttachableSourceLink
|
|
71
52
|
});
|
|
72
53
|
if (!writePlan.writesAny) {
|
|
73
54
|
return;
|
|
@@ -81,7 +62,7 @@ const useBoundaryMeasureAndStore = params => {
|
|
|
81
62
|
}
|
|
82
63
|
const existingSnapshot = _bounds.BoundStore.getSnapshot(sharedBoundTag, currentScreenKey);
|
|
83
64
|
const hasSnapshotChanged = !existingSnapshot || !areMeasurementsEqual(existingSnapshot.bounds, correctedMeasured);
|
|
84
|
-
const shouldWriteSnapshot = hasSnapshotChanged
|
|
65
|
+
const shouldWriteSnapshot = hasSnapshotChanged;
|
|
85
66
|
(0, _applyMeasuredBoundsWrites.applyMeasuredBoundsWrites)({
|
|
86
67
|
sharedBoundTag,
|
|
87
68
|
currentScreenKey,
|
|
@@ -1 +1 @@
|
|
|
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","
|
|
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,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