react-native-screen-transitions 3.6.0-alpha.1 → 3.6.0-alpha.3
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/components/screen-container/layers/content.js +11 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/constants.js +5 -12
- 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/build-screen-transition-options.js +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +26 -8
- 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 +1 -2
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -4
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.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/options/helpers.js +3 -1
- package/lib/commonjs/shared/providers/screen/options/helpers.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/index.js +3 -2
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +120 -205
- 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 +175 -14
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +2 -2
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.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/components/screen-container/layers/content.js +13 -3
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/constants.js +4 -11
- 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/build-screen-transition-options.js +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +26 -3
- 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 +1 -2
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +3 -4
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.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/options/helpers.js +3 -1
- package/lib/module/shared/providers/screen/options/helpers.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/providers/stack/direct.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/managed.provider.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/bounds.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/index.js +3 -2
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js +120 -205
- 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 +163 -12
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +2 -2
- package/lib/module/shared/utils/bounds/navigation/zoom/build.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/components/boundary-target.d.ts +4 -207
- 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 +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 +2 -2
- 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/components/overlay/variations/overlay-host.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +2 -2
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +1 -6
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +3 -3
- 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/build-screen-transition-options.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts +1 -2
- 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/hydrate-transition-state/types.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.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/animation/helpers/selected-interpolator-options.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/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/options/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/options/types.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/options/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/maybe-floating-container.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/providers/stack/direct.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/stack/managed.provider.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 +4 -19
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +69 -1
- package/lib/typescript/shared/types/bounds.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 +2 -2
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +4 -14
- package/lib/typescript/shared/types/screen.types.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/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts +1 -1
- 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 +58 -7
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/types.d.ts +2 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/types.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 +4 -3
- 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/components/screen-container/layers/content.tsx +21 -2
- package/src/shared/constants.ts +1 -9
- 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/build-screen-transition-options.ts +1 -0
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +49 -4
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +1 -1
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +2 -5
- package/src/shared/providers/screen/animation/helpers/selected-interpolator-options.ts +1 -0
- package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +3 -12
- 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/options/helpers.ts +9 -0
- package/src/shared/providers/screen/options/types.ts +1 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +0 -3
- package/src/shared/providers/stack/direct.provider.tsx +1 -1
- package/src/shared/providers/stack/managed.provider.tsx +1 -1
- 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 +4 -23
- package/src/shared/types/bounds.types.ts +72 -1
- package/src/shared/types/gesture.types.ts +8 -2
- package/src/shared/types/index.ts +1 -4
- package/src/shared/types/screen.types.ts +4 -14
- 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/index.ts +3 -1
- package/src/shared/utils/bounds/navigation/reveal/build.ts +198 -308
- package/src/shared/utils/bounds/navigation/reveal/config.ts +20 -1
- package/src/shared/utils/bounds/navigation/reveal/math.ts +264 -18
- package/src/shared/utils/bounds/navigation/reveal/types.ts +2 -0
- package/src/shared/utils/bounds/navigation/zoom/build.ts +2 -2
- 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
|
@@ -18,6 +18,8 @@ type GestureAxisCandidate = {
|
|
|
18
18
|
velocityContribution: number;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
const FULL_GESTURE_VELOCITY_PROGRESS_PER_SECOND = 4;
|
|
22
|
+
|
|
21
23
|
/**
|
|
22
24
|
* Converts a pan velocity from pixels/second into progress/second.
|
|
23
25
|
*/
|
|
@@ -29,6 +31,29 @@ export const toProgressVelocity = (
|
|
|
29
31
|
return velocityPixelsPerSecond / Math.max(1, screenSize);
|
|
30
32
|
};
|
|
31
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Converts normalized pan velocity into a 0-1 scalar for interpolators.
|
|
36
|
+
*
|
|
37
|
+
* `1` means the velocity reached or exceeded the library's full-velocity
|
|
38
|
+
* threshold, not a physical maximum for the device.
|
|
39
|
+
*/
|
|
40
|
+
export const resolveGestureVelocity = (
|
|
41
|
+
velocityNormX: number,
|
|
42
|
+
velocityNormY: number,
|
|
43
|
+
) => {
|
|
44
|
+
"worklet";
|
|
45
|
+
|
|
46
|
+
const dominantVelocity = Math.max(
|
|
47
|
+
Math.abs(velocityNormX),
|
|
48
|
+
Math.abs(velocityNormY),
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
return Math.min(
|
|
52
|
+
1,
|
|
53
|
+
dominantVelocity / FULL_GESTURE_VELOCITY_PROGRESS_PER_SECOND,
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
|
|
32
57
|
/**
|
|
33
58
|
* Converts pan release velocity into a spring handoff in progress units/second.
|
|
34
59
|
*/
|
|
@@ -62,9 +62,7 @@ const resolveGestureDirection = (options: GesturePolicyOptions) => {
|
|
|
62
62
|
return options.gestureDirection ?? DEFAULT_GESTURE_DIRECTION;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
options: GesturePolicyOptions,
|
|
67
|
-
) {
|
|
65
|
+
function resolveGestureProgressModePolicy(options: GesturePolicyOptions) {
|
|
68
66
|
"worklet";
|
|
69
67
|
return resolveGestureProgressMode({
|
|
70
68
|
gestureProgressMode: options.gestureProgressMode,
|
|
@@ -131,7 +129,7 @@ const resolvePinchDirections = (
|
|
|
131
129
|
};
|
|
132
130
|
};
|
|
133
131
|
|
|
134
|
-
|
|
132
|
+
const resolveGestureCanDismiss = ({
|
|
135
133
|
isFirstKey,
|
|
136
134
|
gestureEnabled,
|
|
137
135
|
}: {
|
|
@@ -215,7 +213,7 @@ export const resolvePinchPolicy = (
|
|
|
215
213
|
};
|
|
216
214
|
};
|
|
217
215
|
|
|
218
|
-
|
|
216
|
+
const resolveGestureParticipation = ({
|
|
219
217
|
options,
|
|
220
218
|
isFirstKey,
|
|
221
219
|
gestureContext,
|
|
@@ -160,6 +160,7 @@ export interface PanTrackState {
|
|
|
160
160
|
y: number;
|
|
161
161
|
normX: number;
|
|
162
162
|
normY: number;
|
|
163
|
+
velocity: number;
|
|
163
164
|
}
|
|
164
165
|
|
|
165
166
|
export interface PinchTrackState {
|
|
@@ -185,6 +186,7 @@ export interface PanReleasePlan {
|
|
|
185
186
|
resetVelocityY: number;
|
|
186
187
|
resetVelocityNormX: number;
|
|
187
188
|
resetVelocityNormY: number;
|
|
189
|
+
releaseVelocity: number;
|
|
188
190
|
resetNormalizedValues: boolean;
|
|
189
191
|
resetNormalizedValuesImmediately: boolean;
|
|
190
192
|
preserveRawValues: boolean;
|
|
@@ -206,6 +206,7 @@ const areScreenOptionsEqual = (
|
|
|
206
206
|
) => {
|
|
207
207
|
"worklet";
|
|
208
208
|
return (
|
|
209
|
+
left.navigationMaskEnabled === right.navigationMaskEnabled &&
|
|
209
210
|
left.gestureEnabled === right.gestureEnabled &&
|
|
210
211
|
left.experimental_allowDisabledGestureTracking ===
|
|
211
212
|
right.experimental_allowDisabledGestureTracking &&
|
|
@@ -238,6 +239,10 @@ export const resolveBaseScreenOptions = (
|
|
|
238
239
|
);
|
|
239
240
|
|
|
240
241
|
return {
|
|
242
|
+
navigationMaskEnabled: resolveBooleanOption(
|
|
243
|
+
options.navigationMaskEnabled,
|
|
244
|
+
undefined,
|
|
245
|
+
),
|
|
241
246
|
gestureEnabled: resolveBooleanOption(options.gestureEnabled, undefined),
|
|
242
247
|
experimental_allowDisabledGestureTracking: resolveBooleanOption(
|
|
243
248
|
options.experimental_allowDisabledGestureTracking,
|
|
@@ -322,6 +327,10 @@ export const syncScreenOptionsOverrides = (
|
|
|
322
327
|
);
|
|
323
328
|
|
|
324
329
|
const next: ScreenOptionsState = {
|
|
330
|
+
navigationMaskEnabled: resolveBooleanOption(
|
|
331
|
+
options?.navigationMaskEnabled,
|
|
332
|
+
base.navigationMaskEnabled,
|
|
333
|
+
),
|
|
325
334
|
gestureEnabled: resolveBooleanOption(
|
|
326
335
|
options?.gestureEnabled,
|
|
327
336
|
base.gestureEnabled,
|
|
@@ -9,6 +9,7 @@ export type OptionalScreenOption<K extends keyof ScreenTransitionOptions> =
|
|
|
9
9
|
ScreenTransitionOptions[K];
|
|
10
10
|
|
|
11
11
|
export type ScreenOptionsSnapshot = {
|
|
12
|
+
navigationMaskEnabled: OptionalScreenOption<"navigationMaskEnabled">;
|
|
12
13
|
gestureEnabled: OptionalScreenOption<"gestureEnabled">;
|
|
13
14
|
experimental_allowDisabledGestureTracking: RequiredScreenOption<"experimental_allowDisabledGestureTracking">;
|
|
14
15
|
gestureDirection: RequiredScreenOption<"gestureDirection">;
|
|
@@ -8,7 +8,6 @@ import type {
|
|
|
8
8
|
import { logger } from "../../../../utils/logger";
|
|
9
9
|
import { useScreenAnimationContext } from "../../animation";
|
|
10
10
|
import { useBuildBoundsAccessor } from "../../animation/helpers/accessors/use-build-bounds-accessor";
|
|
11
|
-
import { useBuildTransitionAccessor } from "../../animation/helpers/accessors/use-build-transition-accessor";
|
|
12
11
|
import { syncSelectedInterpolatorOptions } from "../../animation/helpers/selected-interpolator-options";
|
|
13
12
|
import { useDescriptorDerivations } from "../../descriptors";
|
|
14
13
|
import {
|
|
@@ -55,7 +54,6 @@ export const useInterpolatedStylesMap = () => {
|
|
|
55
54
|
currentInterpolator,
|
|
56
55
|
} = useScreenAnimationContext();
|
|
57
56
|
const boundsAccessor = useBuildBoundsAccessor();
|
|
58
|
-
const transition = useBuildTransitionAccessor();
|
|
59
57
|
const pendingLifecycleStartBlockCount = SystemStore.getValue(
|
|
60
58
|
currentScreenKey,
|
|
61
59
|
"pendingLifecycleStartBlockCount",
|
|
@@ -126,7 +124,6 @@ export const useInterpolatedStylesMap = () => {
|
|
|
126
124
|
progress: effectiveProgress,
|
|
127
125
|
next: effectiveNext,
|
|
128
126
|
bounds: boundsAccessor,
|
|
129
|
-
transition,
|
|
130
127
|
});
|
|
131
128
|
|
|
132
129
|
const rawStyleMap: TransitionInterpolatedStyle | undefined =
|
|
@@ -138,9 +138,9 @@ function withManagedStack<
|
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
export { useManagedStackContext, withManagedStack };
|
|
142
141
|
export type {
|
|
143
142
|
ManagedStackContextValue,
|
|
144
143
|
ManagedStackProps,
|
|
145
144
|
ManagedStackRenderProps,
|
|
146
145
|
};
|
|
146
|
+
export { useManagedStackContext, withManagedStack };
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
GroupKey,
|
|
3
|
+
LinkGroupState,
|
|
4
|
+
LinkKey,
|
|
5
|
+
LinkPairState,
|
|
6
|
+
LinkPairsState,
|
|
7
|
+
ScreenIdentifier,
|
|
8
|
+
ScreenPairKey,
|
|
9
|
+
TagLink,
|
|
10
|
+
} from "../types";
|
|
11
|
+
|
|
12
|
+
const PAIR_SEPARATOR = "<>";
|
|
13
|
+
|
|
14
|
+
export const createScreenPairKey = (
|
|
15
|
+
sourceScreenKey: ScreenIdentifier["screenKey"],
|
|
16
|
+
destinationScreenKey: ScreenIdentifier["screenKey"] | "",
|
|
17
|
+
): ScreenPairKey => {
|
|
18
|
+
"worklet";
|
|
19
|
+
return `${sourceScreenKey}${PAIR_SEPARATOR}${destinationScreenKey}`;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const createPendingPairKey = (
|
|
23
|
+
sourceScreenKey: ScreenIdentifier["screenKey"],
|
|
24
|
+
): ScreenPairKey => {
|
|
25
|
+
"worklet";
|
|
26
|
+
return createScreenPairKey(sourceScreenKey, "");
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const getSourceScreenKeyFromPairKey = (
|
|
30
|
+
pairKey: ScreenPairKey,
|
|
31
|
+
): ScreenIdentifier["screenKey"] => {
|
|
32
|
+
"worklet";
|
|
33
|
+
const separatorIndex = pairKey.indexOf(PAIR_SEPARATOR);
|
|
34
|
+
if (separatorIndex === -1) return pairKey;
|
|
35
|
+
return pairKey.slice(0, separatorIndex);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const getDestinationScreenKeyFromPairKey = (
|
|
39
|
+
pairKey: ScreenPairKey,
|
|
40
|
+
): ScreenIdentifier["screenKey"] | "" => {
|
|
41
|
+
"worklet";
|
|
42
|
+
const separatorIndex = pairKey.indexOf(PAIR_SEPARATOR);
|
|
43
|
+
if (separatorIndex === -1) return "";
|
|
44
|
+
return pairKey.slice(separatorIndex + PAIR_SEPARATOR.length);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const isScreenPairKeyForScreen = (
|
|
48
|
+
pairKey: ScreenPairKey,
|
|
49
|
+
screenKey: ScreenIdentifier["screenKey"],
|
|
50
|
+
): boolean => {
|
|
51
|
+
"worklet";
|
|
52
|
+
return (
|
|
53
|
+
pairKey === createPendingPairKey(screenKey) ||
|
|
54
|
+
pairKey.startsWith(`${screenKey}${PAIR_SEPARATOR}`) ||
|
|
55
|
+
pairKey.endsWith(`${PAIR_SEPARATOR}${screenKey}`)
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const getLinkKeyFromTag = (tag: string): LinkKey => {
|
|
60
|
+
"worklet";
|
|
61
|
+
const separatorIndex = tag.indexOf(":");
|
|
62
|
+
if (separatorIndex === -1) return tag;
|
|
63
|
+
return tag.slice(separatorIndex + 1);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const getGroupKeyFromTag = (tag: string): GroupKey | null => {
|
|
67
|
+
"worklet";
|
|
68
|
+
const separatorIndex = tag.indexOf(":");
|
|
69
|
+
if (separatorIndex === -1) return null;
|
|
70
|
+
return tag.slice(0, separatorIndex);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const createGroupTag = (group: GroupKey, linkKey: LinkKey): string => {
|
|
74
|
+
"worklet";
|
|
75
|
+
return `${group}:${linkKey}`;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const ensurePairState = (
|
|
79
|
+
state: LinkPairsState,
|
|
80
|
+
pairKey: ScreenPairKey,
|
|
81
|
+
): LinkPairState => {
|
|
82
|
+
"worklet";
|
|
83
|
+
if (!state[pairKey]) {
|
|
84
|
+
state[pairKey] = {
|
|
85
|
+
links: {},
|
|
86
|
+
groups: {},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
state[pairKey].groups ??= {};
|
|
90
|
+
return state[pairKey];
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export const ensurePairLinks = (
|
|
94
|
+
state: LinkPairsState,
|
|
95
|
+
pairKey: ScreenPairKey,
|
|
96
|
+
): Record<LinkKey, TagLink> => {
|
|
97
|
+
"worklet";
|
|
98
|
+
return ensurePairState(state, pairKey).links;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export const ensurePairGroups = (
|
|
102
|
+
state: LinkPairsState,
|
|
103
|
+
pairKey: ScreenPairKey,
|
|
104
|
+
): Record<GroupKey, LinkGroupState> => {
|
|
105
|
+
"worklet";
|
|
106
|
+
return ensurePairState(state, pairKey).groups;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export const removePairLink = (
|
|
110
|
+
state: LinkPairsState,
|
|
111
|
+
pairKey: ScreenPairKey,
|
|
112
|
+
linkKey: LinkKey,
|
|
113
|
+
) => {
|
|
114
|
+
"worklet";
|
|
115
|
+
const pair = state[pairKey];
|
|
116
|
+
if (!pair) return;
|
|
117
|
+
|
|
118
|
+
delete pair.links[linkKey];
|
|
119
|
+
|
|
120
|
+
for (const key in pair.links) {
|
|
121
|
+
if (pair.links[key]) return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
delete state[pairKey];
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export const getLink = (
|
|
128
|
+
state: LinkPairsState,
|
|
129
|
+
pairKey: ScreenPairKey,
|
|
130
|
+
linkKey: LinkKey,
|
|
131
|
+
): TagLink | null => {
|
|
132
|
+
"worklet";
|
|
133
|
+
return state[pairKey]?.links[linkKey] ?? null;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export const getSource = (
|
|
137
|
+
state: LinkPairsState,
|
|
138
|
+
pairKey: ScreenPairKey,
|
|
139
|
+
linkKey: LinkKey,
|
|
140
|
+
): TagLink["source"] | null => {
|
|
141
|
+
"worklet";
|
|
142
|
+
return getLink(state, pairKey, linkKey)?.source ?? null;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export const getDestination = (
|
|
146
|
+
state: LinkPairsState,
|
|
147
|
+
pairKey: ScreenPairKey,
|
|
148
|
+
linkKey: LinkKey,
|
|
149
|
+
): TagLink["destination"] | null => {
|
|
150
|
+
"worklet";
|
|
151
|
+
return getLink(state, pairKey, linkKey)?.destination ?? null;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export const getActiveGroupId = (
|
|
155
|
+
state: LinkPairsState,
|
|
156
|
+
pairKey: ScreenPairKey,
|
|
157
|
+
group: GroupKey,
|
|
158
|
+
): LinkKey | null => {
|
|
159
|
+
"worklet";
|
|
160
|
+
return state[pairKey]?.groups?.[group]?.activeId ?? null;
|
|
161
|
+
};
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { clear } from "./internals/clear";
|
|
2
2
|
import { getEntry, removeEntry, setEntry } from "./internals/entries";
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
getMatchedLink,
|
|
11
|
-
getPendingLink,
|
|
12
|
-
hasDestinationLink,
|
|
13
|
-
hasSourceLink,
|
|
4
|
+
getActiveGroupId,
|
|
5
|
+
getDestination,
|
|
6
|
+
getLink,
|
|
7
|
+
getSource,
|
|
8
|
+
setActiveGroupId,
|
|
14
9
|
setDestination,
|
|
15
10
|
setSource,
|
|
16
11
|
} from "./internals/links";
|
|
@@ -37,17 +32,12 @@ export const BoundStore = {
|
|
|
37
32
|
link: {
|
|
38
33
|
setSource,
|
|
39
34
|
setDestination,
|
|
40
|
-
|
|
35
|
+
setActiveGroupId,
|
|
36
|
+
getLink,
|
|
37
|
+
getSource,
|
|
38
|
+
getDestination,
|
|
39
|
+
getActiveGroupId,
|
|
41
40
|
getPair: resolveTransitionPair,
|
|
42
|
-
getPending: getPendingLink,
|
|
43
|
-
hasSource: hasSourceLink,
|
|
44
|
-
hasDestination: hasDestinationLink,
|
|
45
|
-
},
|
|
46
|
-
group: {
|
|
47
|
-
setActiveId: setGroupActiveId,
|
|
48
|
-
setInitialId: setGroupInitialId,
|
|
49
|
-
getActiveId: getGroupActiveId,
|
|
50
|
-
getInitialId: getGroupInitialId,
|
|
51
41
|
},
|
|
52
42
|
cleanup: {
|
|
53
43
|
byScreen: clear,
|
|
@@ -1,59 +1,35 @@
|
|
|
1
1
|
import { hasAnyKeys } from "../helpers/keys";
|
|
2
|
-
import {
|
|
3
|
-
import type {
|
|
4
|
-
import { type
|
|
2
|
+
import { isScreenPairKeyForScreen } from "../helpers/link-pairs.helpers";
|
|
3
|
+
import type { LinkPairsState, ScreenKey } from "../types";
|
|
4
|
+
import { type BoundaryEntriesState, boundaryRegistry, pairs } from "./state";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type ScreenPredicate = (
|
|
9
|
-
screenKey: ScreenKey,
|
|
10
|
-
screenEntry: ScreenEntry,
|
|
11
|
-
) => boolean;
|
|
12
|
-
|
|
13
|
-
const clearRegistry = (
|
|
14
|
-
shouldClearScreen: ScreenPredicate,
|
|
15
|
-
shouldClearLink: LinkPredicate,
|
|
16
|
-
) => {
|
|
6
|
+
function clear(screenKey: ScreenKey) {
|
|
17
7
|
"worklet";
|
|
18
|
-
|
|
8
|
+
|
|
9
|
+
boundaryRegistry.modify(<T extends BoundaryEntriesState>(state: T): T => {
|
|
19
10
|
"worklet";
|
|
20
11
|
for (const tag in state) {
|
|
21
12
|
const tagState = state[tag];
|
|
13
|
+
delete tagState.screens[screenKey];
|
|
22
14
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (shouldClearScreen(entryScreenKey, screenEntry)) {
|
|
26
|
-
delete tagState.screens[entryScreenKey];
|
|
27
|
-
}
|
|
15
|
+
if (!hasAnyKeys(tagState.screens)) {
|
|
16
|
+
delete state[tag];
|
|
28
17
|
}
|
|
18
|
+
}
|
|
29
19
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (shouldClearLink(link)) {
|
|
33
|
-
tagState.linkStack.splice(i, 1);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
20
|
+
return state;
|
|
21
|
+
});
|
|
36
22
|
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
24
|
+
"worklet";
|
|
25
|
+
for (const pairKey in state) {
|
|
26
|
+
if (isScreenPairKeyForScreen(pairKey, screenKey)) {
|
|
27
|
+
delete state[pairKey];
|
|
39
28
|
}
|
|
40
29
|
}
|
|
41
30
|
|
|
42
31
|
return state;
|
|
43
32
|
});
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
function clear(screenKey: ScreenKey) {
|
|
47
|
-
"worklet";
|
|
48
|
-
clearRegistry(
|
|
49
|
-
(entryScreenKey) => entryScreenKey === screenKey,
|
|
50
|
-
(link) => {
|
|
51
|
-
return (
|
|
52
|
-
matchesScreenKey(link.source, screenKey) ||
|
|
53
|
-
matchesScreenKey(link.destination, screenKey)
|
|
54
|
-
);
|
|
55
|
-
},
|
|
56
|
-
);
|
|
57
33
|
}
|
|
58
34
|
|
|
59
35
|
export { clear };
|
|
@@ -1,23 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
applyEntryPatch,
|
|
3
|
-
ensureScreenEntry,
|
|
4
|
-
findMatchingScreenEntry,
|
|
5
|
-
} from "../helpers/entries.helpers";
|
|
6
|
-
import { ensureTagState, pruneTagState } from "../helpers/tag-state.helpers";
|
|
1
|
+
import { hasAnyKeys } from "../helpers/keys";
|
|
7
2
|
import type { EntryPatch, ScreenEntry, ScreenKey, TagID } from "../types";
|
|
8
|
-
import { type
|
|
3
|
+
import { type BoundaryEntriesState, boundaryRegistry } from "./state";
|
|
4
|
+
|
|
5
|
+
const ensureBoundaryState = (state: BoundaryEntriesState, tag: TagID) => {
|
|
6
|
+
"worklet";
|
|
7
|
+
if (!state[tag]) {
|
|
8
|
+
state[tag] = {
|
|
9
|
+
screens: {},
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return state[tag];
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const ensureScreenEntry = (
|
|
16
|
+
state: BoundaryEntriesState,
|
|
17
|
+
tag: TagID,
|
|
18
|
+
screenKey: ScreenKey,
|
|
19
|
+
): ScreenEntry => {
|
|
20
|
+
"worklet";
|
|
21
|
+
const tagState = ensureBoundaryState(state, tag);
|
|
22
|
+
if (!tagState.screens[screenKey]) {
|
|
23
|
+
tagState.screens[screenKey] = {
|
|
24
|
+
bounds: null,
|
|
25
|
+
styles: {},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return tagState.screens[screenKey];
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const applyEntryPatch = (entry: ScreenEntry, patch: EntryPatch) => {
|
|
32
|
+
"worklet";
|
|
33
|
+
if (patch.bounds !== undefined) {
|
|
34
|
+
entry.bounds = patch.bounds;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (patch.styles !== undefined) {
|
|
38
|
+
entry.styles = patch.styles ?? {};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (patch.boundaryConfig === undefined) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (patch.boundaryConfig === null) {
|
|
46
|
+
delete entry.boundaryConfig;
|
|
47
|
+
} else {
|
|
48
|
+
entry.boundaryConfig = patch.boundaryConfig;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
9
51
|
|
|
10
52
|
function getEntry(tag: TagID, key: ScreenKey): ScreenEntry | null {
|
|
11
53
|
"worklet";
|
|
12
|
-
return
|
|
54
|
+
return boundaryRegistry.get()[tag]?.screens[key] ?? null;
|
|
13
55
|
}
|
|
14
56
|
|
|
15
57
|
function setEntry(tag: TagID, screenKey: ScreenKey, patch: EntryPatch) {
|
|
16
58
|
"worklet";
|
|
17
|
-
|
|
59
|
+
boundaryRegistry.modify(<T extends BoundaryEntriesState>(state: T): T => {
|
|
18
60
|
"worklet";
|
|
19
|
-
const
|
|
20
|
-
const entry = ensureScreenEntry(tagState, screenKey);
|
|
61
|
+
const entry = ensureScreenEntry(state, tag, screenKey);
|
|
21
62
|
applyEntryPatch(entry, patch);
|
|
22
63
|
return state;
|
|
23
64
|
});
|
|
@@ -25,7 +66,7 @@ function setEntry(tag: TagID, screenKey: ScreenKey, patch: EntryPatch) {
|
|
|
25
66
|
|
|
26
67
|
function removeEntry(tag: TagID, screenKey: ScreenKey) {
|
|
27
68
|
"worklet";
|
|
28
|
-
|
|
69
|
+
boundaryRegistry.modify(<T extends BoundaryEntriesState>(state: T): T => {
|
|
29
70
|
"worklet";
|
|
30
71
|
const tagState = state[tag];
|
|
31
72
|
if (!tagState?.screens[screenKey]) {
|
|
@@ -33,7 +74,9 @@ function removeEntry(tag: TagID, screenKey: ScreenKey) {
|
|
|
33
74
|
}
|
|
34
75
|
|
|
35
76
|
delete tagState.screens[screenKey];
|
|
36
|
-
|
|
77
|
+
if (!hasAnyKeys(tagState.screens)) {
|
|
78
|
+
delete state[tag];
|
|
79
|
+
}
|
|
37
80
|
|
|
38
81
|
return state;
|
|
39
82
|
});
|