react-native-screen-transitions 3.6.0-alpha.1 → 3.6.0-alpha.2
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/component-stack/components/component-screen.js +1 -7
- package/lib/commonjs/component-stack/components/component-screen.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +27 -34
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
- 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-initial-destination-measurement.js +17 -19
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +27 -7
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js +23 -51
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js +3 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js +75 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +15 -2
- package/lib/commonjs/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js +103 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js +52 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
- package/lib/commonjs/shared/components/native-screen.js +2 -13
- package/lib/commonjs/shared/components/native-screen.js.map +1 -1
- package/lib/commonjs/shared/constants.js +2 -7
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +35 -0
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
- package/lib/commonjs/shared/providers/register-bounds.provider.js +48 -55
- package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +1 -6
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js +9 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js +19 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js +18 -2
- package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +1 -5
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +125 -0
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/index.js +6 -12
- package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/clear.js +13 -21
- package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/entries.js +49 -9
- package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +143 -82
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +17 -43
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/state.js +26 -3
- package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/commonjs/shared/stores/gesture.store.js +2 -0
- package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
- package/lib/commonjs/shared/types/gesture.types.js +2 -2
- package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
- 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 +21 -8
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +23 -0
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +91 -199
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js +15 -2
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +155 -14
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
- package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
- package/lib/module/component-stack/components/component-screen.js +2 -8
- package/lib/module/component-stack/components/component-screen.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +27 -34
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
- 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-initial-destination-measurement.js +18 -20
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +28 -8
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +22 -50
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
- package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/index.js +3 -1
- package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js +70 -0
- package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +13 -1
- package/lib/module/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js +98 -0
- package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/utils/source-signals.js +47 -0
- package/lib/module/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
- package/lib/module/shared/components/native-screen.js +3 -14
- package/lib/module/shared/components/native-screen.js.map +1 -1
- package/lib/module/shared/constants.js +1 -6
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +30 -0
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
- package/lib/module/shared/providers/register-bounds.provider.js +48 -55
- package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
- package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js +10 -3
- package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-release.js +20 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
- package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js +3 -3
- package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js +3 -3
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +3 -3
- package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/physics.js +15 -0
- package/lib/module/shared/providers/screen/gestures/shared/physics.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/policy.js +3 -3
- package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +105 -0
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
- package/lib/module/shared/stores/bounds/index.js +7 -13
- package/lib/module/shared/stores/bounds/index.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/clear.js +14 -22
- package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/entries.js +49 -9
- package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +139 -80
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +17 -43
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/state.js +25 -2
- package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/module/shared/stores/gesture.store.js +2 -0
- package/lib/module/shared/stores/gesture.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js +0 -4
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/types/gesture.types.js +0 -1
- package/lib/module/shared/types/gesture.types.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +6 -5
- 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 +21 -8
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +18 -0
- package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js +90 -198
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/config.js +14 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js +144 -12
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
- package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
- package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts +1 -0
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts +1 -1
- 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-initial-destination-measurement.d.ts +5 -4
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts +6 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts +5 -4
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +7 -7
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +1 -1
- 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 +11 -7
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts +10 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.d.ts → utils/measured-bounds.d.ts} +3 -2
- package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts +22 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts +16 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +0 -5
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +1 -1
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +21 -0
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -0
- package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts +0 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts +7 -0
- package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +0 -10
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts +2 -0
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +18 -0
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/index.d.ts +6 -12
- 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/entries.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +13 -10
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts +26 -5
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +14 -7
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/stores/gesture.store.d.ts +1 -0
- package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +0 -18
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/gesture.types.d.ts +8 -1
- package/lib/typescript/shared/types/gesture.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/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
- 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/resolve-bounds-pair-key.d.ts +4 -0
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts +14 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts +48 -7
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/options.d.ts +2 -3
- package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
- package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts +3 -2
- package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/component-stack/components/component-screen.tsx +3 -11
- package/src/shared/components/create-boundary-component/create-boundary-component.tsx +30 -27
- package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +5 -5
- package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +25 -24
- package/src/shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts +41 -11
- package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +49 -64
- package/src/shared/components/create-boundary-component/hooks/use-refresh-boundary.ts +44 -83
- package/src/shared/components/create-boundary-component/index.tsx +3 -1
- package/src/shared/components/create-boundary-component/types.ts +13 -11
- package/src/shared/components/create-boundary-component/utils/destination-signals.ts +129 -0
- package/src/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.ts → utils/measured-bounds.ts} +25 -1
- package/src/shared/components/create-boundary-component/utils/refresh-signals.ts +164 -0
- package/src/shared/components/create-boundary-component/utils/source-signals.ts +72 -0
- package/src/shared/components/native-screen.tsx +3 -12
- package/src/shared/constants.ts +1 -6
- package/src/shared/index.ts +0 -3
- package/src/shared/providers/helpers/measured-bounds-writes.ts +67 -0
- package/src/shared/providers/register-bounds.provider.tsx +68 -91
- package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +0 -14
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +1 -2
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +1 -4
- package/src/shared/providers/screen/gestures/pan/pan-activation.ts +4 -1
- package/src/shared/providers/screen/gestures/pan/pan-lifecycle.ts +18 -2
- package/src/shared/providers/screen/gestures/pan/pan-release.ts +33 -0
- package/src/shared/providers/screen/gestures/pan/pan-reset.ts +3 -0
- package/src/shared/providers/screen/gestures/pan/use-pan-behavior.ts +9 -6
- package/src/shared/providers/screen/gestures/pinch/pinch-activation.ts +5 -2
- package/src/shared/providers/screen/gestures/pinch/pinch-lifecycle.ts +1 -0
- package/src/shared/providers/screen/gestures/pinch/use-pinch-behavior.ts +9 -6
- package/src/shared/providers/screen/gestures/shared/physics.ts +25 -0
- package/src/shared/providers/screen/gestures/shared/policy.ts +3 -5
- package/src/shared/providers/screen/gestures/types.ts +2 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +0 -3
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +161 -0
- package/src/shared/stores/bounds/index.ts +10 -20
- package/src/shared/stores/bounds/internals/clear.ts +17 -41
- package/src/shared/stores/bounds/internals/entries.ts +56 -13
- package/src/shared/stores/bounds/internals/links.ts +222 -113
- package/src/shared/stores/bounds/internals/resolver.ts +23 -87
- package/src/shared/stores/bounds/internals/state.ts +27 -5
- package/src/shared/stores/bounds/types.ts +17 -7
- package/src/shared/stores/gesture.store.ts +3 -0
- package/src/shared/types/animation.types.ts +0 -23
- package/src/shared/types/gesture.types.ts +8 -2
- package/src/shared/types/index.ts +0 -4
- package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +1 -0
- package/src/shared/utils/bounds/helpers/create-link-accessor.ts +6 -6
- package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +20 -11
- package/src/shared/utils/bounds/helpers/resolve-bounds-pair-key.ts +22 -0
- package/src/shared/utils/bounds/navigation/reveal/build.ts +153 -297
- package/src/shared/utils/bounds/navigation/reveal/config.ts +20 -1
- package/src/shared/utils/bounds/navigation/reveal/math.ts +234 -18
- package/src/shared/utils/bounds/types/options.ts +2 -3
- package/src/shared/utils/navigation/resolve-scene-neighbors.ts +36 -23
- package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -43
- package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -17
- package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -28
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -75
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -20
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -16
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
- package/lib/commonjs/shared/providers/layout-anchor.provider.js +0 -86
- package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js +0 -49
- package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js +0 -25
- package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js +0 -30
- package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js +0 -79
- package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/matching.js +0 -13
- package/lib/commonjs/shared/stores/bounds/helpers/matching.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js +0 -30
- package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/internals/groups.js +0 -102
- package/lib/commonjs/shared/stores/bounds/internals/groups.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -38
- package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -12
- package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -23
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -68
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -15
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -12
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
- package/lib/module/shared/providers/layout-anchor.provider.js +0 -80
- package/lib/module/shared/providers/layout-anchor.provider.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/entries.helpers.js +0 -42
- package/lib/module/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/find-latest.js +0 -19
- package/lib/module/shared/stores/bounds/helpers/find-latest.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/groups.helpers.js +0 -23
- package/lib/module/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/link.helpers.js +0 -69
- package/lib/module/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/matching.js +0 -9
- package/lib/module/shared/stores/bounds/helpers/matching.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js +0 -24
- package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/internals/groups.js +0 -95
- package/lib/module/shared/stores/bounds/internals/groups.js.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts +0 -15
- package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts +0 -2
- package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts +0 -22
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +0 -29
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts +0 -3
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -8
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +0 -1
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +0 -39
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts +0 -5
- package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts +0 -3
- package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts +0 -10
- package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts +0 -14
- package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts +0 -3
- package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts +0 -5
- package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/internals/groups.d.ts +0 -16
- package/lib/typescript/shared/stores/bounds/internals/groups.d.ts.map +0 -1
- package/src/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.ts +0 -83
- package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +0 -20
- package/src/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.ts +0 -48
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +0 -101
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement.ts +0 -25
- package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +0 -14
- package/src/shared/providers/layout-anchor.provider.tsx +0 -112
- package/src/shared/stores/bounds/helpers/entries.helpers.ts +0 -55
- package/src/shared/stores/bounds/helpers/find-latest.ts +0 -22
- package/src/shared/stores/bounds/helpers/groups.helpers.ts +0 -27
- package/src/shared/stores/bounds/helpers/link.helpers.ts +0 -131
- package/src/shared/stores/bounds/helpers/matching.ts +0 -11
- package/src/shared/stores/bounds/helpers/tag-state.helpers.ts +0 -24
- package/src/shared/stores/bounds/internals/groups.ts +0 -116
|
@@ -5,40 +5,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.clear = clear;
|
|
7
7
|
var _keys = require("../helpers/keys");
|
|
8
|
-
var
|
|
8
|
+
var _linkPairs = require("../helpers/link-pairs.helpers");
|
|
9
9
|
var _state = require("./state");
|
|
10
|
-
|
|
10
|
+
function clear(screenKey) {
|
|
11
11
|
"worklet";
|
|
12
12
|
|
|
13
|
-
_state.
|
|
13
|
+
_state.boundaryRegistry.modify(state => {
|
|
14
14
|
"worklet";
|
|
15
15
|
|
|
16
16
|
for (const tag in state) {
|
|
17
17
|
const tagState = state[tag];
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (shouldClearScreen(entryScreenKey, screenEntry)) {
|
|
21
|
-
delete tagState.screens[entryScreenKey];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
for (let i = tagState.linkStack.length - 1; i >= 0; i--) {
|
|
25
|
-
const link = tagState.linkStack[i];
|
|
26
|
-
if (shouldClearLink(link)) {
|
|
27
|
-
tagState.linkStack.splice(i, 1);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
if (!(0, _keys.hasAnyKeys)(tagState.screens) && tagState.linkStack.length === 0) {
|
|
18
|
+
delete tagState.screens[screenKey];
|
|
19
|
+
if (!(0, _keys.hasAnyKeys)(tagState.screens)) {
|
|
31
20
|
delete state[tag];
|
|
32
21
|
}
|
|
33
22
|
}
|
|
34
23
|
return state;
|
|
35
24
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"worklet";
|
|
25
|
+
_state.pairs.modify(state => {
|
|
26
|
+
"worklet";
|
|
39
27
|
|
|
40
|
-
|
|
41
|
-
|
|
28
|
+
for (const pairKey in state) {
|
|
29
|
+
if ((0, _linkPairs.isScreenPairKeyForScreen)(pairKey, screenKey)) {
|
|
30
|
+
delete state[pairKey];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return state;
|
|
42
34
|
});
|
|
43
35
|
}
|
|
44
36
|
//# sourceMappingURL=clear.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_keys","require","
|
|
1
|
+
{"version":3,"names":["_keys","require","_linkPairs","_state","clear","screenKey","boundaryRegistry","modify","state","tag","tagState","screens","hasAnyKeys","pairs","pairKey","isScreenPairKeyForScreen"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/clear.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEA,SAASG,KAAKA,CAACC,SAAoB,EAAE;EACpC,SAAS;;EAETC,uBAAgB,CAACC,MAAM,CAAkCC,KAAQ,IAAQ;IACxE,SAAS;;IACT,KAAK,MAAMC,GAAG,IAAID,KAAK,EAAE;MACxB,MAAME,QAAQ,GAAGF,KAAK,CAACC,GAAG,CAAC;MAC3B,OAAOC,QAAQ,CAACC,OAAO,CAACN,SAAS,CAAC;MAElC,IAAI,CAAC,IAAAO,gBAAU,EAACF,QAAQ,CAACC,OAAO,CAAC,EAAE;QAClC,OAAOH,KAAK,CAACC,GAAG,CAAC;MAClB;IACD;IAEA,OAAOD,KAAK;EACb,CAAC,CAAC;EAEFK,YAAK,CAACN,MAAM,CAA4BC,KAAQ,IAAQ;IACvD,SAAS;;IACT,KAAK,MAAMM,OAAO,IAAIN,KAAK,EAAE;MAC5B,IAAI,IAAAO,mCAAwB,EAACD,OAAO,EAAET,SAAS,CAAC,EAAE;QACjD,OAAOG,KAAK,CAACM,OAAO,CAAC;MACtB;IACD;IAEA,OAAON,KAAK;EACb,CAAC,CAAC;AACH","ignoreList":[]}
|
|
@@ -6,30 +6,68 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getEntry = getEntry;
|
|
7
7
|
exports.removeEntry = removeEntry;
|
|
8
8
|
exports.setEntry = setEntry;
|
|
9
|
-
var
|
|
10
|
-
var _tagState = require("../helpers/tag-state.helpers");
|
|
9
|
+
var _keys = require("../helpers/keys");
|
|
11
10
|
var _state = require("./state");
|
|
11
|
+
const ensureBoundaryState = (state, tag) => {
|
|
12
|
+
"worklet";
|
|
13
|
+
|
|
14
|
+
if (!state[tag]) {
|
|
15
|
+
state[tag] = {
|
|
16
|
+
screens: {}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return state[tag];
|
|
20
|
+
};
|
|
21
|
+
const ensureScreenEntry = (state, tag, screenKey) => {
|
|
22
|
+
"worklet";
|
|
23
|
+
|
|
24
|
+
const tagState = ensureBoundaryState(state, tag);
|
|
25
|
+
if (!tagState.screens[screenKey]) {
|
|
26
|
+
tagState.screens[screenKey] = {
|
|
27
|
+
bounds: null,
|
|
28
|
+
styles: {}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return tagState.screens[screenKey];
|
|
32
|
+
};
|
|
33
|
+
const applyEntryPatch = (entry, patch) => {
|
|
34
|
+
"worklet";
|
|
35
|
+
|
|
36
|
+
if (patch.bounds !== undefined) {
|
|
37
|
+
entry.bounds = patch.bounds;
|
|
38
|
+
}
|
|
39
|
+
if (patch.styles !== undefined) {
|
|
40
|
+
entry.styles = patch.styles ?? {};
|
|
41
|
+
}
|
|
42
|
+
if (patch.boundaryConfig === undefined) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (patch.boundaryConfig === null) {
|
|
46
|
+
delete entry.boundaryConfig;
|
|
47
|
+
} else {
|
|
48
|
+
entry.boundaryConfig = patch.boundaryConfig;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
12
51
|
function getEntry(tag, key) {
|
|
13
52
|
"worklet";
|
|
14
53
|
|
|
15
|
-
return
|
|
54
|
+
return _state.boundaryRegistry.get()[tag]?.screens[key] ?? null;
|
|
16
55
|
}
|
|
17
56
|
function setEntry(tag, screenKey, patch) {
|
|
18
57
|
"worklet";
|
|
19
58
|
|
|
20
|
-
_state.
|
|
59
|
+
_state.boundaryRegistry.modify(state => {
|
|
21
60
|
"worklet";
|
|
22
61
|
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
(0, _entries.applyEntryPatch)(entry, patch);
|
|
62
|
+
const entry = ensureScreenEntry(state, tag, screenKey);
|
|
63
|
+
applyEntryPatch(entry, patch);
|
|
26
64
|
return state;
|
|
27
65
|
});
|
|
28
66
|
}
|
|
29
67
|
function removeEntry(tag, screenKey) {
|
|
30
68
|
"worklet";
|
|
31
69
|
|
|
32
|
-
_state.
|
|
70
|
+
_state.boundaryRegistry.modify(state => {
|
|
33
71
|
"worklet";
|
|
34
72
|
|
|
35
73
|
const tagState = state[tag];
|
|
@@ -37,7 +75,9 @@ function removeEntry(tag, screenKey) {
|
|
|
37
75
|
return state;
|
|
38
76
|
}
|
|
39
77
|
delete tagState.screens[screenKey];
|
|
40
|
-
(0,
|
|
78
|
+
if (!(0, _keys.hasAnyKeys)(tagState.screens)) {
|
|
79
|
+
delete state[tag];
|
|
80
|
+
}
|
|
41
81
|
return state;
|
|
42
82
|
});
|
|
43
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_keys","require","_state","ensureBoundaryState","state","tag","screens","ensureScreenEntry","screenKey","tagState","bounds","styles","applyEntryPatch","entry","patch","undefined","boundaryConfig","getEntry","key","boundaryRegistry","get","setEntry","modify","removeEntry","hasAnyKeys"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/entries.ts"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,mBAAmB,GAAGA,CAACC,KAA2B,EAAEC,GAAU,KAAK;EACxE,SAAS;;EACT,IAAI,CAACD,KAAK,CAACC,GAAG,CAAC,EAAE;IAChBD,KAAK,CAACC,GAAG,CAAC,GAAG;MACZC,OAAO,EAAE,CAAC;IACX,CAAC;EACF;EACA,OAAOF,KAAK,CAACC,GAAG,CAAC;AAClB,CAAC;AAED,MAAME,iBAAiB,GAAGA,CACzBH,KAA2B,EAC3BC,GAAU,EACVG,SAAoB,KACH;EACjB,SAAS;;EACT,MAAMC,QAAQ,GAAGN,mBAAmB,CAACC,KAAK,EAAEC,GAAG,CAAC;EAChD,IAAI,CAACI,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC,EAAE;IACjCC,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC,GAAG;MAC7BE,MAAM,EAAE,IAAI;MACZC,MAAM,EAAE,CAAC;IACV,CAAC;EACF;EACA,OAAOF,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC;AACnC,CAAC;AAED,MAAMI,eAAe,GAAGA,CAACC,KAAkB,EAAEC,KAAiB,KAAK;EAClE,SAAS;;EACT,IAAIA,KAAK,CAACJ,MAAM,KAAKK,SAAS,EAAE;IAC/BF,KAAK,CAACH,MAAM,GAAGI,KAAK,CAACJ,MAAM;EAC5B;EAEA,IAAII,KAAK,CAACH,MAAM,KAA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IAClB;IAEA,OAAOD,KAAK;EACb,CAAC,CAAC;AACH","ignoreList":[]}
|
|
@@ -3,118 +3,179 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
6
|
+
exports.getActiveGroupId = getActiveGroupId;
|
|
7
|
+
exports.getDestination = getDestination;
|
|
8
|
+
exports.getLink = getLink;
|
|
9
|
+
exports.getResolvedLink = getResolvedLink;
|
|
10
|
+
exports.getSource = getSource;
|
|
11
|
+
exports.setActiveGroupId = setActiveGroupId;
|
|
10
12
|
exports.setDestination = setDestination;
|
|
11
13
|
exports.setSource = setSource;
|
|
12
|
-
var
|
|
13
|
-
var _tagState = require("../helpers/tag-state.helpers");
|
|
14
|
+
var _linkPairs = require("../helpers/link-pairs.helpers");
|
|
14
15
|
var _state = require("./state");
|
|
15
|
-
|
|
16
|
+
const toLinkKey = tag => {
|
|
16
17
|
"worklet";
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
return (0, _linkPairs.getLinkKeyFromTag)(tag);
|
|
20
|
+
};
|
|
21
|
+
const createLinkSide = (screenKey, bounds, styles) => {
|
|
22
|
+
"worklet";
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
screenKey,
|
|
26
|
+
bounds,
|
|
27
|
+
styles
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
const writePairLink = (state, pairKey, linkKey, link) => {
|
|
31
|
+
"worklet";
|
|
32
|
+
|
|
33
|
+
(0, _linkPairs.ensurePairLinks)(state, pairKey)[linkKey] = link;
|
|
34
|
+
};
|
|
35
|
+
const writeGroup = (state, pairKey, group, activeId, initialId) => {
|
|
36
|
+
"worklet";
|
|
37
|
+
|
|
38
|
+
const previousInitialId = state[pairKey]?.groups?.[group]?.initialId;
|
|
39
|
+
(0, _linkPairs.ensurePairGroups)(state, pairKey)[group] = {
|
|
40
|
+
activeId,
|
|
41
|
+
initialId: previousInitialId ?? initialId ?? activeId
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
const writeDestination = (state, pairKey, linkKey, screenKey, bounds, styles, group) => {
|
|
45
|
+
"worklet";
|
|
46
|
+
|
|
47
|
+
const link = (0, _linkPairs.getLink)(state, pairKey, linkKey);
|
|
48
|
+
if (!link) return;
|
|
49
|
+
const destination = createLinkSide(screenKey, bounds, styles);
|
|
50
|
+
link.group = group ?? link.group;
|
|
51
|
+
link.destination = destination;
|
|
52
|
+
link.initialDestination ??= destination;
|
|
53
|
+
writePairLink(state, pairKey, linkKey, link);
|
|
54
|
+
if (link.group) {
|
|
55
|
+
writeGroup(state, pairKey, link.group, linkKey);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const promotePendingSource = (state, pairKey, linkKey) => {
|
|
59
|
+
"worklet";
|
|
60
|
+
|
|
61
|
+
if ((0, _linkPairs.getLink)(state, pairKey, linkKey)) return;
|
|
62
|
+
const sourceScreenKey = (0, _linkPairs.getSourceScreenKeyFromPairKey)(pairKey);
|
|
63
|
+
const pendingPairKey = (0, _linkPairs.createPendingPairKey)(sourceScreenKey);
|
|
64
|
+
if (pendingPairKey === pairKey) return;
|
|
65
|
+
const pendingLink = (0, _linkPairs.getLink)(state, pendingPairKey, linkKey);
|
|
66
|
+
if (!pendingLink) return;
|
|
67
|
+
writePairLink(state, pairKey, linkKey, pendingLink);
|
|
68
|
+
if (pendingLink.group) {
|
|
69
|
+
const pendingGroupState = state[pendingPairKey]?.groups?.[pendingLink.group];
|
|
70
|
+
if (pendingGroupState) {
|
|
71
|
+
writeGroup(state, pairKey, pendingLink.group, pendingGroupState.activeId, pendingGroupState.initialId);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
(0, _linkPairs.removePairLink)(state, pendingPairKey, linkKey);
|
|
75
|
+
};
|
|
76
|
+
function setSource(pairKey, tag, screenKey, bounds, styles = {}, group) {
|
|
77
|
+
"worklet";
|
|
78
|
+
|
|
79
|
+
_state.pairs.modify(state => {
|
|
19
80
|
"worklet";
|
|
20
81
|
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
82
|
+
const linkKey = toLinkKey(tag);
|
|
83
|
+
const source = createLinkSide(screenKey, bounds, styles);
|
|
84
|
+
const pairLinks = (0, _linkPairs.ensurePairLinks)(state, pairKey);
|
|
85
|
+
const existingLink = pairLinks[linkKey];
|
|
86
|
+
const link = existingLink ?? {
|
|
87
|
+
group,
|
|
88
|
+
source,
|
|
89
|
+
destination: null,
|
|
90
|
+
initialSource: source
|
|
25
91
|
};
|
|
26
|
-
|
|
27
|
-
const tagState = (0, _tagState.ensureTagState)(state, tag);
|
|
28
|
-
const stack = tagState.linkStack;
|
|
29
|
-
const topIndex = stack.length - 1;
|
|
30
|
-
const topLink = topIndex >= 0 ? stack[topIndex] : null;
|
|
31
|
-
if (topLink && topLink.destination === null && (0, _link.isSameScreenFamily)(topLink.source, source)) {
|
|
32
|
-
topLink.source = source;
|
|
33
|
-
if (!topLink.initialSource) {
|
|
34
|
-
topLink.initialSource = source;
|
|
35
|
-
}
|
|
36
|
-
return state;
|
|
37
|
-
}
|
|
38
|
-
stack.push({
|
|
39
|
-
source,
|
|
40
|
-
destination: null,
|
|
41
|
-
initialSource: source
|
|
42
|
-
});
|
|
43
|
-
return state;
|
|
44
|
-
}
|
|
45
|
-
const stack = state[tag]?.linkStack;
|
|
46
|
-
if (!stack || stack.length === 0) return state;
|
|
47
|
-
const targetIndex = (0, _link.selectSourceUpdateTargetIndex)(stack, screenKey);
|
|
48
|
-
if (targetIndex === -1) return state;
|
|
49
|
-
const link = stack[targetIndex];
|
|
92
|
+
link.group = group ?? link.group;
|
|
50
93
|
link.source = source;
|
|
51
|
-
|
|
52
|
-
|
|
94
|
+
link.initialSource ??= source;
|
|
95
|
+
pairLinks[linkKey] = link;
|
|
96
|
+
const pendingPairKey = (0, _linkPairs.createPendingPairKey)(screenKey);
|
|
97
|
+
if (pendingPairKey !== pairKey) {
|
|
98
|
+
(0, _linkPairs.removePairLink)(state, pendingPairKey, linkKey);
|
|
53
99
|
}
|
|
54
100
|
return state;
|
|
55
101
|
});
|
|
56
102
|
}
|
|
57
|
-
function setDestination(
|
|
103
|
+
function setDestination(pairKey, tag, screenKey, bounds, styles = {}, group) {
|
|
58
104
|
"worklet";
|
|
59
105
|
|
|
60
|
-
_state.
|
|
106
|
+
_state.pairs.modify(state => {
|
|
61
107
|
"worklet";
|
|
62
108
|
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (targetIndex === -1) return state;
|
|
67
|
-
const link = stack[targetIndex];
|
|
68
|
-
const destination = {
|
|
69
|
-
screenKey,
|
|
70
|
-
bounds,
|
|
71
|
-
styles
|
|
72
|
-
};
|
|
73
|
-
link.destination = destination;
|
|
74
|
-
if (!link.initialDestination) {
|
|
75
|
-
link.initialDestination = destination;
|
|
76
|
-
}
|
|
109
|
+
const linkKey = toLinkKey(tag);
|
|
110
|
+
promotePendingSource(state, pairKey, linkKey);
|
|
111
|
+
writeDestination(state, pairKey, linkKey, screenKey, bounds, styles, group);
|
|
77
112
|
return state;
|
|
78
113
|
});
|
|
79
114
|
}
|
|
80
|
-
function
|
|
115
|
+
function setActiveGroupId(pairKey, group, tag) {
|
|
81
116
|
"worklet";
|
|
82
117
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const lastLink = stack[stack.length - 1];
|
|
90
|
-
return lastLink ?? null;
|
|
91
|
-
}
|
|
92
|
-
for (let i = stack.length - 1; i >= 0; i--) {
|
|
93
|
-
const link = stack[i];
|
|
94
|
-
if ((0, _link.isCompletedLinkForScreenKey)(link, screenKey)) {
|
|
95
|
-
return link;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return null;
|
|
118
|
+
_state.pairs.modify(state => {
|
|
119
|
+
"worklet";
|
|
120
|
+
|
|
121
|
+
writeGroup(state, pairKey, group, toLinkKey(tag));
|
|
122
|
+
return state;
|
|
123
|
+
});
|
|
99
124
|
}
|
|
100
|
-
function
|
|
125
|
+
function getActiveGroupId(pairKey, group) {
|
|
101
126
|
"worklet";
|
|
102
127
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
return
|
|
128
|
+
return (0, _linkPairs.getActiveGroupId)(_state.pairs.get(), pairKey, group);
|
|
129
|
+
}
|
|
130
|
+
function getLink(pairKey, tag) {
|
|
131
|
+
"worklet";
|
|
132
|
+
|
|
133
|
+
return (0, _linkPairs.getLink)(_state.pairs.get(), pairKey, toLinkKey(tag));
|
|
134
|
+
}
|
|
135
|
+
const isCompletedLink = link => {
|
|
136
|
+
"worklet";
|
|
137
|
+
|
|
138
|
+
return !!link?.destination;
|
|
139
|
+
};
|
|
140
|
+
function getResolvedLink(pairKey, tag) {
|
|
141
|
+
"worklet";
|
|
142
|
+
|
|
143
|
+
const state = _state.pairs.get();
|
|
144
|
+
const linkKey = toLinkKey(tag);
|
|
145
|
+
const group = (0, _linkPairs.getGroupKeyFromTag)(tag);
|
|
146
|
+
const requestedLink = (0, _linkPairs.getLink)(state, pairKey, linkKey);
|
|
147
|
+
|
|
148
|
+
// Group active ids can update before the new member has a full source/destination
|
|
149
|
+
// link, so unresolved grouped links fall back to the initial id's measurements.
|
|
150
|
+
if (!group || isCompletedLink(requestedLink)) {
|
|
151
|
+
return {
|
|
152
|
+
tag,
|
|
153
|
+
link: requestedLink
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
const initialId = state[pairKey]?.groups?.[group]?.initialId;
|
|
157
|
+
if (initialId) {
|
|
158
|
+
const initialLink = (0, _linkPairs.getLink)(state, pairKey, initialId);
|
|
159
|
+
if (isCompletedLink(initialLink)) {
|
|
160
|
+
return {
|
|
161
|
+
tag: (0, _linkPairs.createGroupTag)(group, initialId),
|
|
162
|
+
link: initialLink
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
tag,
|
|
168
|
+
link: requestedLink
|
|
169
|
+
};
|
|
109
170
|
}
|
|
110
|
-
function
|
|
171
|
+
function getSource(pairKey, tag) {
|
|
111
172
|
"worklet";
|
|
112
173
|
|
|
113
|
-
return (0,
|
|
174
|
+
return (0, _linkPairs.getSource)(_state.pairs.get(), pairKey, toLinkKey(tag));
|
|
114
175
|
}
|
|
115
|
-
function
|
|
176
|
+
function getDestination(pairKey, tag) {
|
|
116
177
|
"worklet";
|
|
117
178
|
|
|
118
|
-
return (0,
|
|
179
|
+
return (0, _linkPairs.getDestination)(_state.pairs.get(), pairKey, toLinkKey(tag));
|
|
119
180
|
}
|
|
120
181
|
//# sourceMappingURL=links.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_linkPairs","require","_state","toLinkKey","tag","getLinkKeyFromTag","createLinkSide","screenKey","bounds","styles","writePairLink","state","pairKey","linkKey","link","ensurePairLinks","writeGroup","group","activeId","initialId","previousInitialId","groups","ensurePairGroups","writeDestination","getPairLink","destination","initialDestination","promotePendingSource","sourceScreenKey","getSourceScreenKeyFromPairKey","pendingPairKey","createPendingPairKey","pendingLink","pendingGroupState","removePairLink","setSource","pairs","modify","source","pairLinks","existingLink","initialSource","setDestination","setActiveGroupId","getActiveGroupId","getPairActiveGroupId","get","getLink","isCompletedLink","getResolvedLink","getGroupKeyFromTag","requestedLink","initialLink","createGroupTag","getSource","getPairSource","getDestination","getPairDestination"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/links.ts"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAuBA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,SAAS,GAAIC,GAAU,IAAc;EAC1C,SAAS;;EACT,OAAO,IAAAC,4BAAiB,EAACD,GAAG,CAAC;AAC9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IAAI+B,eAAe,CAACG,aAAa,CAAC,EAAE;IAC7C,OAAO;MACN/C,GAAG;MACHU,IAAI,EAAEqC;IACP,CAAC;EACF;EAEA,MAAMhC,SAAS,GAAGR,KAAK,CAACC,OAAO,CAAC,EAAES,MAAM,GAAGJ,KAAK,CAAC,EAAEE,SAAS;EAC5D,IAAIA,SAAS,EAAE;IACd,MAAMiC,WAAW,GAAG,IAAA5B,kBAAW,EAACb,KAAK,EAAEC,OAAO,EAAEO,SAAS,CAAC;IAC1D,IAAI6B,eAAe,CAACI,WAAW,CAAC,EAAE;MACjC,OAAO;QACNhD,GAAG,EAAE,IAAAiD,yBAAc,EAACpC,KAAK,EAAEE,SAAS,CAAC;QACrCL,IAAI,EAAEsC;MACP,CAAC;IACF;EACD;EAEA,OAAO;IACNhD,GAAG;IACHU,IAAI,EAAEqC;EACP,CAAC;AACF;AAEA,SAASG,SAASA,CACjB1C,OAAsB,EACtBR,GAAU,EACiB;EAC3B,SAAS;;EACT,OAAO,IAAAmD,oBAAa,EAACnB,YAAK,CAACU,GAAG,CAAC,CAAC,EAAElC,OAAO,EAAET,SAAS,CAACC,GAAG,CAAC,CAAC;AAC3D;AAEA,SAASoD,cAAcA,CACtB5C,OAAsB,EACtBR,GAAU,EACsB;EAChC,SAAS;;EACT,OAAO,IAAAqD,yBAAkB,EAACrB,YAAK,CAACU,GAAG,CAAC,CAAC,EAAElC,OAAO,EAAET,SAAS,CAACC,GAAG,CAAC,CAAC;AAChE","ignoreList":[]}
|
|
@@ -4,56 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.resolveTransitionPair = resolveTransitionPair;
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
function findCompletedLinkByDestination(stack, screenKey) {
|
|
7
|
+
var _linkPairs = require("../helpers/link-pairs.helpers");
|
|
8
|
+
var _links = require("./links");
|
|
9
|
+
function resolvePairKey(context) {
|
|
11
10
|
"worklet";
|
|
12
11
|
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (!screenKey) return null;
|
|
20
|
-
return (0, _findLatest.findLatest)(stack, link => !!link.destination && (0, _matching.matchesScreenKey)(link.source, screenKey));
|
|
21
|
-
}
|
|
22
|
-
function findPendingLinkBySource(stack, screenKey) {
|
|
23
|
-
"worklet";
|
|
24
|
-
|
|
25
|
-
if (!screenKey) return null;
|
|
26
|
-
return (0, _findLatest.findLatest)(stack, link => link.destination === null && (0, _matching.matchesScreenKey)(link.source, screenKey));
|
|
27
|
-
}
|
|
28
|
-
function findEnteringTransitionLink(stack, context) {
|
|
29
|
-
"worklet";
|
|
30
|
-
|
|
31
|
-
return findCompletedLinkByDestination(stack, context.currentScreenKey) ?? findPendingLinkBySource(stack, context.previousScreenKey) ?? findCompletedLinkBySource(stack, context.previousScreenKey);
|
|
32
|
-
}
|
|
33
|
-
function findExitingTransitionLink(stack, context) {
|
|
34
|
-
"worklet";
|
|
35
|
-
|
|
36
|
-
return findCompletedLinkBySource(stack, context.currentScreenKey) ?? findCompletedLinkByDestination(stack, context.nextScreenKey) ?? findPendingLinkBySource(stack, context.currentScreenKey);
|
|
12
|
+
if (context.entering) {
|
|
13
|
+
if (!context.previousScreenKey || !context.currentScreenKey) return null;
|
|
14
|
+
return (0, _linkPairs.createScreenPairKey)(context.previousScreenKey, context.currentScreenKey);
|
|
15
|
+
}
|
|
16
|
+
if (!context.currentScreenKey || !context.nextScreenKey) return null;
|
|
17
|
+
return (0, _linkPairs.createScreenPairKey)(context.currentScreenKey, context.nextScreenKey);
|
|
37
18
|
}
|
|
38
19
|
function resolveTransitionPair(tag, context) {
|
|
39
20
|
"worklet";
|
|
40
21
|
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const matchedLink = stack && stack.length > 0 ? context.entering ? findEnteringTransitionLink(stack, context) : findExitingTransitionLink(stack, context) : null;
|
|
44
|
-
const sourceBounds = matchedLink?.source?.bounds ?? null;
|
|
45
|
-
const destinationBounds = matchedLink?.destination?.bounds ?? null;
|
|
46
|
-
const sourceStyles = matchedLink?.source?.styles ?? null;
|
|
47
|
-
const destinationStyles = matchedLink?.destination?.styles ?? null;
|
|
48
|
-
const sourceScreenKey = matchedLink?.source?.screenKey ?? null;
|
|
49
|
-
const destinationScreenKey = matchedLink?.destination?.screenKey ?? null;
|
|
22
|
+
const pairKey = resolvePairKey(context);
|
|
23
|
+
const matchedLink = pairKey ? (0, _links.getResolvedLink)(pairKey, tag).link : null;
|
|
50
24
|
return {
|
|
51
|
-
sourceBounds,
|
|
52
|
-
destinationBounds,
|
|
53
|
-
sourceStyles,
|
|
54
|
-
destinationStyles,
|
|
55
|
-
sourceScreenKey,
|
|
56
|
-
destinationScreenKey
|
|
25
|
+
sourceBounds: matchedLink?.source.bounds ?? null,
|
|
26
|
+
destinationBounds: matchedLink?.destination?.bounds ?? null,
|
|
27
|
+
sourceStyles: matchedLink?.source.styles ?? null,
|
|
28
|
+
destinationStyles: matchedLink?.destination?.styles ?? null,
|
|
29
|
+
sourceScreenKey: matchedLink?.source.screenKey ?? null,
|
|
30
|
+
destinationScreenKey: matchedLink?.destination?.screenKey ?? null
|
|
57
31
|
};
|
|
58
32
|
}
|
|
59
33
|
//# sourceMappingURL=resolver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_linkPairs","require","_links","resolvePairKey","context","entering","previousScreenKey","currentScreenKey","createScreenPairKey","nextScreenKey","resolveTransitionPair","tag","pairKey","matchedLink","getResolvedLink","link","sourceBounds","source","bounds","destinationBounds","destination","sourceStyles","styles","destinationStyles","sourceScreenKey","screenKey","destinationScreenKey"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/resolver.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAOA,IAAAC,MAAA,GAAAD,OAA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
exports.pairs = exports.boundaryRegistry = void 0;
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
const
|
|
9
|
-
|
|
8
|
+
const boundaryRegistry = exports.boundaryRegistry = (0, _reactNativeReanimated.makeMutable)({});
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Transition links scoped per screen pair.
|
|
12
|
+
*
|
|
13
|
+
* Links used to live in a flat array that acted like a global history. To find
|
|
14
|
+
* the right link, we had to scan for the latest pending or completed entry that
|
|
15
|
+
* matched a screen, which made refreshes and rapid triggers tricky to handle.
|
|
16
|
+
*
|
|
17
|
+
* Keying by screen pair fixes that: each transition lives under its pair, and
|
|
18
|
+
* every shared boundary id maps to a single link in that pair. Refreshing the
|
|
19
|
+
* source or destination just overwrites the same slot instead of pushing a new
|
|
20
|
+
* history entry.
|
|
21
|
+
*
|
|
22
|
+
* Example:
|
|
23
|
+
*
|
|
24
|
+
* {
|
|
25
|
+
* "a<>b": {
|
|
26
|
+
* links: {
|
|
27
|
+
* "unique-tag-1": { source: ..., destination: ... },
|
|
28
|
+
* },
|
|
29
|
+
* },
|
|
30
|
+
* }
|
|
31
|
+
*/
|
|
32
|
+
const pairs = exports.pairs = (0, _reactNativeReanimated.makeMutable)({});
|
|
10
33
|
//# sourceMappingURL=state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","boundaryRegistry","exports","makeMutable","pairs"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/state.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAKO,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,IAAAE,kCAAW,EAAuB,CAAC,CAAC,CAAC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAAG,IAAAD,kCAAW,EAAiB,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -20,6 +20,7 @@ function createGestureBag() {
|
|
|
20
20
|
y: (0, _reactNativeReanimated.makeMutable)(0),
|
|
21
21
|
normX,
|
|
22
22
|
normY,
|
|
23
|
+
velocity: (0, _reactNativeReanimated.makeMutable)(0),
|
|
23
24
|
scale,
|
|
24
25
|
normScale,
|
|
25
26
|
focalX: (0, _reactNativeReanimated.makeMutable)(0),
|
|
@@ -59,6 +60,7 @@ const GestureStore = exports.GestureStore = (0, _createStore.createStore)({
|
|
|
59
60
|
(0, _reactNativeReanimated.cancelAnimation)(bag.y);
|
|
60
61
|
(0, _reactNativeReanimated.cancelAnimation)(bag.normX);
|
|
61
62
|
(0, _reactNativeReanimated.cancelAnimation)(bag.normY);
|
|
63
|
+
(0, _reactNativeReanimated.cancelAnimation)(bag.velocity);
|
|
62
64
|
(0, _reactNativeReanimated.cancelAnimation)(bag.scale);
|
|
63
65
|
(0, _reactNativeReanimated.cancelAnimation)(bag.normScale);
|
|
64
66
|
(0, _reactNativeReanimated.cancelAnimation)(bag.focalX);
|