react-native-screen-transitions 3.11.2 → 3.11.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/native-stack/views/NativeStackView.native.js +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/components/boundary-lifecycle.js +36 -0
- package/lib/commonjs/shared/components/boundary/components/boundary-lifecycle.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +1 -13
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +9 -2
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +3 -2
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +9 -2
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js +5 -12
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +25 -43
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +13 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +8 -31
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +14 -19
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +8 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +19 -47
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +19 -17
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +19 -5
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +11 -7
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.js +31 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-completion.js +26 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-completion.js.map +1 -0
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +60 -86
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +1 -5
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/index.js +9 -6
- package/lib/commonjs/shared/components/screen-lifecycle/index.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-navigation-helpers.js +28 -6
- package/lib/commonjs/shared/hooks/navigation/use-navigation-helpers.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +1 -2
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +9 -2
- package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +4 -5
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +2 -3
- package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -5
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -3
- package/lib/commonjs/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +9 -5
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/blank-stack-state/blank-stack-controller.js +5 -1
- package/lib/commonjs/shared/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/system.store.js +1 -2
- package/lib/commonjs/shared/stores/system.store.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js +0 -22
- package/lib/commonjs/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/commonjs/shared/utils/navigation/close-action-replay.js +22 -0
- package/lib/commonjs/shared/utils/navigation/close-action-replay.js.map +1 -0
- package/lib/module/native-stack/views/NativeStackView.native.js +1 -1
- package/lib/module/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/module/shared/components/boundary/components/boundary-lifecycle.js +32 -0
- package/lib/module/shared/components/boundary/components/boundary-lifecycle.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +1 -13
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +9 -2
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +3 -2
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-measurer.js +9 -2
- package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js +5 -12
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +27 -45
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +8 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js +8 -32
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +15 -20
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +8 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +20 -48
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +20 -18
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/refresh-signals.js +19 -5
- package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js +12 -8
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.js +25 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-completion.js +21 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-completion.js.map +1 -0
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +60 -85
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js +1 -5
- package/lib/module/shared/components/screen-lifecycle/hooks/use-transition-start-controller.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/index.js +9 -6
- package/lib/module/shared/components/screen-lifecycle/index.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-navigation-helpers.js +29 -7
- package/lib/module/shared/hooks/navigation/use-navigation-helpers.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +1 -2
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +9 -2
- package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +4 -5
- package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +2 -3
- package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js +4 -5
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js +2 -3
- package/lib/module/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/policy.js +9 -5
- package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/module/shared/providers/stack/blank-stack-state/blank-stack-controller.js +5 -1
- package/lib/module/shared/providers/stack/blank-stack-state/blank-stack-controller.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/system.store.js +1 -2
- package/lib/module/shared/stores/system.store.js.map +1 -1
- package/lib/module/shared/utils/animation/animate-to-progress.js +0 -22
- package/lib/module/shared/utils/animation/animate-to-progress.js.map +1 -1
- package/lib/module/shared/utils/navigation/close-action-replay.js +16 -0
- package/lib/module/shared/utils/navigation/close-action-replay.js.map +1 -0
- package/lib/typescript/native-stack/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-lifecycle.d.ts +18 -0
- package/lib/typescript/shared/components/boundary/components/boundary-lifecycle.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +1 -2
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +3 -2
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +3 -2
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts +5 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts +4 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts +4 -17
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts +3 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts +5 -9
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +2 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +2 -1
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/types.d.ts +6 -0
- package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts +1 -0
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.d.ts +27 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-completion.d.ts +7 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-completion.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts +2 -7
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts +1 -3
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-transition-start-controller.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/index.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-navigation-helpers.d.ts +1 -0
- package/lib/typescript/shared/hooks/navigation/use-navigation-helpers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/hooks/use-screen-gesture-config.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +2 -1
- 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/stack/blank-stack-state/blank-stack-controller.d.ts.map +1 -1
- package/lib/typescript/shared/stores/system.store.d.ts +1 -2
- package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts +2 -3
- package/lib/typescript/shared/utils/animation/animate-to-progress.d.ts.map +1 -1
- package/lib/typescript/shared/utils/navigation/close-action-replay.d.ts +4 -0
- package/lib/typescript/shared/utils/navigation/close-action-replay.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/native-stack/views/NativeStackView.native.tsx +3 -1
- package/src/shared/components/boundary/components/boundary-lifecycle.tsx +53 -0
- package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +0 -14
- package/src/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +13 -2
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +7 -2
- package/src/shared/components/boundary/hooks/use-measurer.ts +11 -1
- package/src/shared/components/boundary/portal/components/boundary-portal/components/host.tsx +13 -11
- package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +44 -55
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.ts +10 -0
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/offset-style.ts +11 -55
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts +20 -24
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +11 -0
- package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts +20 -67
- package/src/shared/components/boundary/portal/components/boundary-portal/index.tsx +1 -0
- package/src/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +3 -2
- package/src/shared/components/boundary/providers/boundary-root.provider.tsx +29 -20
- package/src/shared/components/boundary/types.ts +9 -0
- package/src/shared/components/boundary/utils/refresh-signals.ts +39 -6
- package/src/shared/components/screen-container/layers/backdrop.tsx +11 -7
- package/src/shared/components/screen-lifecycle/hooks/helpers/close-interception-rules.ts +64 -0
- package/src/shared/components/screen-lifecycle/hooks/use-close-completion.ts +28 -0
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition-intent.ts +67 -108
- package/src/shared/components/screen-lifecycle/hooks/use-transition-start-controller.ts +0 -12
- package/src/shared/components/screen-lifecycle/index.tsx +8 -4
- package/src/shared/hooks/navigation/use-navigation-helpers.ts +39 -7
- package/src/shared/providers/helpers/measured-bounds-writes.ts +1 -1
- package/src/shared/providers/screen/gestures/hooks/use-screen-gesture-config.ts +9 -1
- package/src/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.ts +4 -6
- package/src/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.ts +1 -3
- package/src/shared/providers/screen/gestures/pinch/behavior/pinch-lifecycle.ts +4 -6
- package/src/shared/providers/screen/gestures/pinch/behavior/use-pinch-behavior.ts +2 -8
- package/src/shared/providers/screen/gestures/shared/policy.ts +17 -6
- package/src/shared/providers/screen/gestures/types.ts +2 -0
- package/src/shared/providers/stack/blank-stack-state/blank-stack-controller.ts +5 -1
- package/src/shared/stores/bounds/internals/links.ts +1 -1
- package/src/shared/stores/system.store.ts +1 -2
- package/src/shared/utils/animation/animate-to-progress.ts +1 -22
- package/src/shared/utils/navigation/close-action-replay.ts +25 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.js +0 -30
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js +0 -47
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.js +0 -25
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js +0 -40
- package/lib/module/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.js.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.d.ts.map +0 -1
- package/src/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.ts +0 -36
- package/src/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.ts +0 -45
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SharedValue } from "react-native-reanimated";
|
|
2
2
|
import { FALSE, TRUE } from "../../constants";
|
|
3
3
|
import {
|
|
4
4
|
type AnimationStoreMap,
|
|
@@ -16,7 +16,6 @@ interface AnimateToProgressProps {
|
|
|
16
16
|
*/
|
|
17
17
|
target: "open" | "close" | number;
|
|
18
18
|
spec?: TransitionSpec;
|
|
19
|
-
onAnimationFinish?: (finished: boolean) => void;
|
|
20
19
|
animations: AnimationStoreMap;
|
|
21
20
|
targetProgress: SharedValue<number>;
|
|
22
21
|
animationProgress: SharedValue<number>;
|
|
@@ -61,7 +60,6 @@ export const resolveAnimationProgressRange = (
|
|
|
61
60
|
export const animateToProgress = ({
|
|
62
61
|
target,
|
|
63
62
|
spec,
|
|
64
|
-
onAnimationFinish,
|
|
65
63
|
animations,
|
|
66
64
|
targetProgress,
|
|
67
65
|
animationProgress,
|
|
@@ -112,9 +110,6 @@ export const animateToProgress = ({
|
|
|
112
110
|
entering.set(FALSE);
|
|
113
111
|
}
|
|
114
112
|
|
|
115
|
-
if (onAnimationFinish) {
|
|
116
|
-
runOnJS(onAnimationFinish)(true);
|
|
117
|
-
}
|
|
118
113
|
return;
|
|
119
114
|
}
|
|
120
115
|
|
|
@@ -141,23 +136,7 @@ export const animateToProgress = ({
|
|
|
141
136
|
|
|
142
137
|
if (isClosing) {
|
|
143
138
|
progressAnimating.set(FALSE);
|
|
144
|
-
|
|
145
|
-
if (onAnimationFinish) {
|
|
146
|
-
// Paint the terminal UI-thread host/style state before React
|
|
147
|
-
// removes the closing route and its native portal host.
|
|
148
|
-
requestAnimationFrame(() => {
|
|
149
|
-
"worklet";
|
|
150
|
-
requestAnimationFrame(() => {
|
|
151
|
-
"worklet";
|
|
152
|
-
runOnJS(onAnimationFinish)(state.finished);
|
|
153
|
-
});
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
139
|
} else {
|
|
157
|
-
if (onAnimationFinish) {
|
|
158
|
-
runOnJS(onAnimationFinish)(state.finished);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
140
|
// Delay clearing progress animation by one frame to ensure final frame is painted
|
|
162
141
|
requestAnimationFrame(() => {
|
|
163
142
|
progressAnimating.set(FALSE);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const CLOSE_ACTION_REPLAY = Symbol("screen-transition-close-action-replay");
|
|
2
|
+
|
|
3
|
+
type MarkedCloseAction = {
|
|
4
|
+
[CLOSE_ACTION_REPLAY]?: true;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const isCloseActionReplay = (action: unknown): boolean =>
|
|
8
|
+
typeof action === "object" &&
|
|
9
|
+
action !== null &&
|
|
10
|
+
(action as MarkedCloseAction)[CLOSE_ACTION_REPLAY] === true;
|
|
11
|
+
|
|
12
|
+
/** Carries the terminal-removal bypass through React Navigation's action clones. */
|
|
13
|
+
export const dispatchCloseAction = <TAction extends object>(
|
|
14
|
+
action: TAction,
|
|
15
|
+
dispatch: (action: TAction) => void,
|
|
16
|
+
) => {
|
|
17
|
+
const markedAction = action as TAction & MarkedCloseAction;
|
|
18
|
+
markedAction[CLOSE_ACTION_REPLAY] = true;
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
dispatch(action);
|
|
22
|
+
} finally {
|
|
23
|
+
delete markedAction[CLOSE_ACTION_REPLAY];
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.hasActiveBoundaryPortalLink = void 0;
|
|
7
|
-
var _linkPairs = require("../../../../../../stores/bounds/helpers/link-pairs.helpers");
|
|
8
|
-
const hasActiveBoundaryPortalLink = ({
|
|
9
|
-
boundaryId,
|
|
10
|
-
pairsState,
|
|
11
|
-
sourcePairKey
|
|
12
|
-
}) => {
|
|
13
|
-
"worklet";
|
|
14
|
-
|
|
15
|
-
if (!sourcePairKey) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
const pair = pairsState[sourcePairKey];
|
|
19
|
-
const linkKey = (0, _linkPairs.getLinkKeyFromTag)(boundaryId);
|
|
20
|
-
const link = pair?.links[linkKey];
|
|
21
|
-
if (!link?.source) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
if (link.group && pair.groups[link.group]?.activeId !== linkKey) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
return true;
|
|
28
|
-
};
|
|
29
|
-
exports.hasActiveBoundaryPortalLink = hasActiveBoundaryPortalLink;
|
|
30
|
-
//# sourceMappingURL=active-pair.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_linkPairs","require","hasActiveBoundaryPortalLink","boundaryId","pairsState","sourcePairKey","pair","linkKey","getLinkKeyFromTag","link","links","source","group","groups","activeId","exports"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAYO,MAAMC,2BAA2B,GAAGA,CAAC;EAC3CC,UAAU;EACVC,UAAU;EACVC;AACkC,CAAC,KAAc;EACjD,SAAS;;EACT,IAAI,CAACA,aAAa,EAAE;IACnB,OAAO,KAAK;EACb;EAEA,MAAMC,IAAI,GAAGF,UAAU,CAACC,aAAa,CAAC;EACtC,MAAME,OAAO,GAAG,IAAAC,4BAAiB,EAACL,UAAU,CAAC;EAC7C,MAAMM,IAAI,GAAGH,IAAI,EAAEI,KAAK,CAACH,OAAO,CAAC;EAEjC,IAAI,CAACE,IAAI,EAAEE,MAAM,EAAE;IAClB,OAAO,KAAK;EACb;EAEA,IAAIF,IAAI,CAACG,KAAK,IAAIN,IAAI,CAACO,MAAM,CAACJ,IAAI,CAACG,KAAK,CAAC,EAAEE,QAAQ,KAAKP,OAAO,EAAE;IAChE,OAAO,KAAK;EACb;EAEA,OAAO,IAAI;AACZ,CAAC;AAACQ,OAAA,CAAAb,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.setPortalHostBounds = exports.getPortalHostBounds = exports.clearPortalHostBounds = void 0;
|
|
7
|
-
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
var _scroll = require("../../../../../../stores/scroll.store");
|
|
9
|
-
const portalHostBounds = (0, _reactNativeReanimated.makeMutable)({});
|
|
10
|
-
const getPortalHostBounds = hostKey => {
|
|
11
|
-
"worklet";
|
|
12
|
-
|
|
13
|
-
return portalHostBounds.get()[hostKey] ?? null;
|
|
14
|
-
};
|
|
15
|
-
exports.getPortalHostBounds = getPortalHostBounds;
|
|
16
|
-
const setPortalHostBounds = (hostKey, bounds) => {
|
|
17
|
-
"worklet";
|
|
18
|
-
|
|
19
|
-
const nextBounds = {
|
|
20
|
-
...bounds,
|
|
21
|
-
scroll: (0, _scroll.cloneScrollMetadataState)(bounds.scroll)
|
|
22
|
-
};
|
|
23
|
-
portalHostBounds.set(state => {
|
|
24
|
-
"worklet";
|
|
25
|
-
|
|
26
|
-
return {
|
|
27
|
-
...state,
|
|
28
|
-
[hostKey]: nextBounds
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
exports.setPortalHostBounds = setPortalHostBounds;
|
|
33
|
-
const clearPortalHostBounds = hostKey => {
|
|
34
|
-
"worklet";
|
|
35
|
-
|
|
36
|
-
portalHostBounds.set(state => {
|
|
37
|
-
"worklet";
|
|
38
|
-
|
|
39
|
-
const nextState = {
|
|
40
|
-
...state
|
|
41
|
-
};
|
|
42
|
-
delete nextState[hostKey];
|
|
43
|
-
return nextState;
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
exports.clearPortalHostBounds = clearPortalHostBounds;
|
|
47
|
-
//# sourceMappingURL=host-bounds.store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_scroll","portalHostBounds","makeMutable","getPortalHostBounds","hostKey","get","exports","setPortalHostBounds","bounds","nextBounds","scroll","cloneScrollMetadataState","set","state","clearPortalHostBounds","nextState"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AASA,MAAME,gBAAgB,GAAG,IAAAC,kCAAW,EAAwB,CAAC,CAAC,CAAC;AAExD,MAAMC,mBAAmB,GAAIC,OAAe,IAAK;EACvD,SAAS;;EACT,OAAOH,gBAAgB,CAACI,GAAG,CAAC,CAAC,CAACD,OAAO,CAAC,IAAI,IAAI;AAC/C,CAAC;AAACE,OAAA,CAAAH,mBAAA,GAAAA,mBAAA;AAEK,MAAMI,mBAAmB,GAAGA,CAClCH,OAAe,EACfI,MAAwB,KACpB;EACJ,SAAS;;EACT,MAAMC,UAA4B,GAAG;IACpC,GAAGD,MAAM;IACTE,MAAM,EAAE,IAAAC,gCAAwB,EAACH,MAAM,CAACE,MAAM;EAC/C,CAAC;EAEDT,gBAAgB,CAACW,GAAG,CAAEC,KAAK,IAAK;IAC/B,SAAS;;IACT,OAAO;MACN,GAAGA,KAAK;MACR,CAACT,OAAO,GAAGK;IACZ,CAAC;EACF,CAAC,CAAC;AACH,CAAC;AAACH,OAAA,CAAAC,mBAAA,GAAAA,mBAAA;AAEK,MAAMO,qBAAqB,GAAIV,OAAe,IAAK;EACzD,SAAS;;EACTH,gBAAgB,CAACW,GAAG,CAAEC,KAAK,IAAK;IAC/B,SAAS;;IACT,MAAME,SAAgC,GAAG;MAAE,GAAGF;IAAM,CAAC;IACrD,OAAOE,SAAS,CAACX,OAAO,CAAC;IACzB,OAAOW,SAAS;EACjB,CAAC,CAAC;AACH,CAAC;AAACT,OAAA,CAAAQ,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { getLinkKeyFromTag } from "../../../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
4
|
-
export const hasActiveBoundaryPortalLink = ({
|
|
5
|
-
boundaryId,
|
|
6
|
-
pairsState,
|
|
7
|
-
sourcePairKey
|
|
8
|
-
}) => {
|
|
9
|
-
"worklet";
|
|
10
|
-
|
|
11
|
-
if (!sourcePairKey) {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
const pair = pairsState[sourcePairKey];
|
|
15
|
-
const linkKey = getLinkKeyFromTag(boundaryId);
|
|
16
|
-
const link = pair?.links[linkKey];
|
|
17
|
-
if (!link?.source) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
if (link.group && pair.groups[link.group]?.activeId !== linkKey) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
return true;
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=active-pair.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getLinkKeyFromTag","hasActiveBoundaryPortalLink","boundaryId","pairsState","sourcePairKey","pair","linkKey","link","links","source","group","groups","activeId"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,4DAA4D;AAY9F,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC3CC,UAAU;EACVC,UAAU;EACVC;AACkC,CAAC,KAAc;EACjD,SAAS;;EACT,IAAI,CAACA,aAAa,EAAE;IACnB,OAAO,KAAK;EACb;EAEA,MAAMC,IAAI,GAAGF,UAAU,CAACC,aAAa,CAAC;EACtC,MAAME,OAAO,GAAGN,iBAAiB,CAACE,UAAU,CAAC;EAC7C,MAAMK,IAAI,GAAGF,IAAI,EAAEG,KAAK,CAACF,OAAO,CAAC;EAEjC,IAAI,CAACC,IAAI,EAAEE,MAAM,EAAE;IAClB,OAAO,KAAK;EACb;EAEA,IAAIF,IAAI,CAACG,KAAK,IAAIL,IAAI,CAACM,MAAM,CAACJ,IAAI,CAACG,KAAK,CAAC,EAAEE,QAAQ,KAAKN,OAAO,EAAE;IAChE,OAAO,KAAK;EACb;EAEA,OAAO,IAAI;AACZ,CAAC","ignoreList":[]}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { makeMutable } from "react-native-reanimated";
|
|
4
|
-
import { cloneScrollMetadataState } from "../../../../../../stores/scroll.store";
|
|
5
|
-
const portalHostBounds = makeMutable({});
|
|
6
|
-
export const getPortalHostBounds = hostKey => {
|
|
7
|
-
"worklet";
|
|
8
|
-
|
|
9
|
-
return portalHostBounds.get()[hostKey] ?? null;
|
|
10
|
-
};
|
|
11
|
-
export const setPortalHostBounds = (hostKey, bounds) => {
|
|
12
|
-
"worklet";
|
|
13
|
-
|
|
14
|
-
const nextBounds = {
|
|
15
|
-
...bounds,
|
|
16
|
-
scroll: cloneScrollMetadataState(bounds.scroll)
|
|
17
|
-
};
|
|
18
|
-
portalHostBounds.set(state => {
|
|
19
|
-
"worklet";
|
|
20
|
-
|
|
21
|
-
return {
|
|
22
|
-
...state,
|
|
23
|
-
[hostKey]: nextBounds
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
export const clearPortalHostBounds = hostKey => {
|
|
28
|
-
"worklet";
|
|
29
|
-
|
|
30
|
-
portalHostBounds.set(state => {
|
|
31
|
-
"worklet";
|
|
32
|
-
|
|
33
|
-
const nextState = {
|
|
34
|
-
...state
|
|
35
|
-
};
|
|
36
|
-
delete nextState[hostKey];
|
|
37
|
-
return nextState;
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=host-bounds.store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["makeMutable","cloneScrollMetadataState","portalHostBounds","getPortalHostBounds","hostKey","get","setPortalHostBounds","bounds","nextBounds","scroll","set","state","clearPortalHostBounds","nextState"],"sourceRoot":"../../../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.ts"],"mappings":";;AAAA,SAAkCA,WAAW,QAAQ,yBAAyB;AAC9E,SAASC,wBAAwB,QAAQ,uCAAuC;AAShF,MAAMC,gBAAgB,GAAGF,WAAW,CAAwB,CAAC,CAAC,CAAC;AAE/D,OAAO,MAAMG,mBAAmB,GAAIC,OAAe,IAAK;EACvD,SAAS;;EACT,OAAOF,gBAAgB,CAACG,GAAG,CAAC,CAAC,CAACD,OAAO,CAAC,IAAI,IAAI;AAC/C,CAAC;AAED,OAAO,MAAME,mBAAmB,GAAGA,CAClCF,OAAe,EACfG,MAAwB,KACpB;EACJ,SAAS;;EACT,MAAMC,UAA4B,GAAG;IACpC,GAAGD,MAAM;IACTE,MAAM,EAAER,wBAAwB,CAACM,MAAM,CAACE,MAAM;EAC/C,CAAC;EAEDP,gBAAgB,CAACQ,GAAG,CAAEC,KAAK,IAAK;IAC/B,SAAS;;IACT,OAAO;MACN,GAAGA,KAAK;MACR,CAACP,OAAO,GAAGI;IACZ,CAAC;EACF,CAAC,CAAC;AACH,CAAC;AAED,OAAO,MAAMI,qBAAqB,GAAIR,OAAe,IAAK;EACzD,SAAS;;EACTF,gBAAgB,CAACQ,GAAG,CAAEC,KAAK,IAAK;IAC/B,SAAS;;IACT,MAAME,SAAgC,GAAG;MAAE,GAAGF;IAAM,CAAC;IACrD,OAAOE,SAAS,CAACT,OAAO,CAAC;IACzB,OAAOS,SAAS;EACjB,CAAC,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { LinkPairsState, ScreenPairKey } from "../../../../../../stores/bounds/types";
|
|
2
|
-
type HasActiveBoundaryPortalLinkParams = {
|
|
3
|
-
boundaryId: string;
|
|
4
|
-
pairsState: LinkPairsState;
|
|
5
|
-
sourcePairKey?: ScreenPairKey;
|
|
6
|
-
};
|
|
7
|
-
export declare const hasActiveBoundaryPortalLink: ({ boundaryId, pairsState, sourcePairKey, }: HasActiveBoundaryPortalLinkParams) => boolean;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=active-pair.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"active-pair.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,cAAc,EACd,aAAa,EACb,MAAM,uCAAuC,CAAC;AAE/C,KAAK,iCAAiC,GAAG;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,cAAc,CAAC;IAC3B,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,4CAIzC,iCAAiC,KAAG,OAmBtC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type MeasuredDimensions } from "react-native-reanimated";
|
|
2
|
-
import type { ScrollMetadataState } from "../../../../../../types/gesture.types";
|
|
3
|
-
export type PortalHostBounds = MeasuredDimensions & {
|
|
4
|
-
scroll?: ScrollMetadataState | null;
|
|
5
|
-
};
|
|
6
|
-
export declare const getPortalHostBounds: (hostKey: string) => PortalHostBounds | null;
|
|
7
|
-
export declare const setPortalHostBounds: (hostKey: string, bounds: PortalHostBounds) => void;
|
|
8
|
-
export declare const clearPortalHostBounds: (hostKey: string) => void;
|
|
9
|
-
//# sourceMappingURL=host-bounds.store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"host-bounds.store.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAEjF,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,GAAG;IACnD,MAAM,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;CACpC,CAAC;AAMF,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,4BAGlD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC/B,SAAS,MAAM,EACf,QAAQ,gBAAgB,SAexB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,SAAS,MAAM,SAQpD,CAAC"}
|
package/src/shared/components/boundary/portal/components/boundary-portal/helpers/active-pair.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { getLinkKeyFromTag } from "../../../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
2
|
-
import type {
|
|
3
|
-
LinkPairsState,
|
|
4
|
-
ScreenPairKey,
|
|
5
|
-
} from "../../../../../../stores/bounds/types";
|
|
6
|
-
|
|
7
|
-
type HasActiveBoundaryPortalLinkParams = {
|
|
8
|
-
boundaryId: string;
|
|
9
|
-
pairsState: LinkPairsState;
|
|
10
|
-
sourcePairKey?: ScreenPairKey;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const hasActiveBoundaryPortalLink = ({
|
|
14
|
-
boundaryId,
|
|
15
|
-
pairsState,
|
|
16
|
-
sourcePairKey,
|
|
17
|
-
}: HasActiveBoundaryPortalLinkParams): boolean => {
|
|
18
|
-
"worklet";
|
|
19
|
-
if (!sourcePairKey) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const pair = pairsState[sourcePairKey];
|
|
24
|
-
const linkKey = getLinkKeyFromTag(boundaryId);
|
|
25
|
-
const link = pair?.links[linkKey];
|
|
26
|
-
|
|
27
|
-
if (!link?.source) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (link.group && pair.groups[link.group]?.activeId !== linkKey) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return true;
|
|
36
|
-
};
|
package/src/shared/components/boundary/portal/components/boundary-portal/stores/host-bounds.store.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { type MeasuredDimensions, makeMutable } from "react-native-reanimated";
|
|
2
|
-
import { cloneScrollMetadataState } from "../../../../../../stores/scroll.store";
|
|
3
|
-
import type { ScrollMetadataState } from "../../../../../../types/gesture.types";
|
|
4
|
-
|
|
5
|
-
export type PortalHostBounds = MeasuredDimensions & {
|
|
6
|
-
scroll?: ScrollMetadataState | null;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
type PortalHostBoundsState = Record<string, PortalHostBounds | null>;
|
|
10
|
-
|
|
11
|
-
const portalHostBounds = makeMutable<PortalHostBoundsState>({});
|
|
12
|
-
|
|
13
|
-
export const getPortalHostBounds = (hostKey: string) => {
|
|
14
|
-
"worklet";
|
|
15
|
-
return portalHostBounds.get()[hostKey] ?? null;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const setPortalHostBounds = (
|
|
19
|
-
hostKey: string,
|
|
20
|
-
bounds: PortalHostBounds,
|
|
21
|
-
) => {
|
|
22
|
-
"worklet";
|
|
23
|
-
const nextBounds: PortalHostBounds = {
|
|
24
|
-
...bounds,
|
|
25
|
-
scroll: cloneScrollMetadataState(bounds.scroll),
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
portalHostBounds.set((state) => {
|
|
29
|
-
"worklet";
|
|
30
|
-
return {
|
|
31
|
-
...state,
|
|
32
|
-
[hostKey]: nextBounds,
|
|
33
|
-
};
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const clearPortalHostBounds = (hostKey: string) => {
|
|
38
|
-
"worklet";
|
|
39
|
-
portalHostBounds.set((state) => {
|
|
40
|
-
"worklet";
|
|
41
|
-
const nextState: PortalHostBoundsState = { ...state };
|
|
42
|
-
delete nextState[hostKey];
|
|
43
|
-
return nextState;
|
|
44
|
-
});
|
|
45
|
-
};
|