react-native-screen-transitions 4.0.0-alpha.8 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -11
- package/lib/commonjs/components/boundary/create-boundary-component.js +5 -1
- package/lib/commonjs/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +53 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +43 -8
- package/lib/commonjs/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +2 -3
- package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/commonjs/components/boundary/portal/teleport.js +1 -13
- package/lib/commonjs/components/boundary/portal/teleport.js.map +1 -1
- package/lib/commonjs/components/boundary/utils/source-signals.js +6 -4
- package/lib/commonjs/components/boundary/utils/source-signals.js.map +1 -1
- package/lib/commonjs/components/overlay/helpers/get-active-overlay.js +3 -24
- package/lib/commonjs/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/commonjs/components/overlay/helpers/retain-ready-overlay-resources.js +4 -3
- package/lib/commonjs/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -1
- package/lib/commonjs/components/overlay/hooks/use-overlay-slot.js +1 -2
- package/lib/commonjs/components/overlay/hooks/use-overlay-slot.js.map +1 -1
- package/lib/commonjs/components/overlay/variations/float-overlay.js +0 -2
- package/lib/commonjs/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/commonjs/components/overlay/variations/overlay-host.js +18 -15
- package/lib/commonjs/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/commonjs/components/screen-container/layers/content.js +10 -5
- package/lib/commonjs/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/components/screen-container/layers/surface.js +50 -0
- package/lib/commonjs/components/screen-container/layers/surface.js.map +1 -0
- package/lib/commonjs/components/stack-view.js +7 -29
- package/lib/commonjs/components/stack-view.js.map +1 -1
- package/lib/commonjs/configs/index.js +1 -4
- package/lib/commonjs/configs/index.js.map +1 -1
- package/lib/commonjs/configs/presets.js +1 -384
- package/lib/commonjs/configs/presets.js.map +1 -1
- package/lib/commonjs/constants.js +2 -1
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/navigators/create-blank-stack-navigator.js +7 -67
- package/lib/commonjs/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/commonjs/navigators/expo-router/index.js +1 -18
- package/lib/commonjs/navigators/expo-router/index.js.map +1 -1
- package/lib/commonjs/navigators/react-navigation/index.js +1 -3
- package/lib/commonjs/navigators/react-navigation/index.js.map +1 -1
- package/lib/commonjs/providers/screen/animation/animation.provider.js +6 -1
- package/lib/commonjs/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/commonjs/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
- package/lib/commonjs/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js +20 -5
- package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -1
- package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/index.js +16 -1
- package/lib/commonjs/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/commonjs/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
- package/lib/commonjs/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/commonjs/providers/screen/animation/use-screen-animation.js +1 -8
- package/lib/commonjs/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-release.js +28 -6
- package/lib/commonjs/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-release.js +26 -6
- package/lib/commonjs/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/shared/policy.js +1 -0
- package/lib/commonjs/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/commonjs/providers/screen/gestures/shared/snap-points.js +71 -1
- package/lib/commonjs/providers/screen/gestures/shared/snap-points.js.map +1 -1
- package/lib/commonjs/providers/screen/options/helpers.js +8 -1
- package/lib/commonjs/providers/screen/options/helpers.js.map +1 -1
- package/lib/commonjs/providers/screen/styles/constants.js +4 -1
- package/lib/commonjs/providers/screen/styles/constants.js.map +1 -1
- package/lib/commonjs/providers/screen/styles/hooks/slot-resolvers.js +1 -9
- package/lib/commonjs/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
- package/lib/commonjs/providers/screen/styles/slot.provider.js +3 -1
- package/lib/commonjs/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js +10 -4
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js.map +1 -1
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js +4 -3
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js.map +1 -1
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.js.map +1 -1
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/state-equality.js +9 -2
- package/lib/commonjs/providers/stack/blank-stack-state/helpers/state-equality.js.map +1 -1
- package/lib/commonjs/utils/create-provider.js +14 -3
- package/lib/commonjs/utils/create-provider.js.map +1 -1
- package/lib/module/components/boundary/create-boundary-component.js +6 -2
- package/lib/module/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +50 -0
- package/lib/module/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +44 -9
- package/lib/module/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +2 -3
- package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
- package/lib/module/components/boundary/portal/teleport.js +1 -14
- package/lib/module/components/boundary/portal/teleport.js.map +1 -1
- package/lib/module/components/boundary/utils/source-signals.js +6 -4
- package/lib/module/components/boundary/utils/source-signals.js.map +1 -1
- package/lib/module/components/overlay/helpers/get-active-overlay.js +3 -24
- package/lib/module/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/module/components/overlay/helpers/retain-ready-overlay-resources.js +4 -3
- package/lib/module/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -1
- package/lib/module/components/overlay/hooks/use-overlay-slot.js +1 -2
- package/lib/module/components/overlay/hooks/use-overlay-slot.js.map +1 -1
- package/lib/module/components/overlay/variations/float-overlay.js +0 -2
- package/lib/module/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/module/components/overlay/variations/overlay-host.js +19 -16
- package/lib/module/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/module/components/screen-container/layers/content.js +10 -5
- package/lib/module/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/components/screen-container/layers/surface.js +45 -0
- package/lib/module/components/screen-container/layers/surface.js.map +1 -0
- package/lib/module/components/stack-view.js +7 -29
- package/lib/module/components/stack-view.js.map +1 -1
- package/lib/module/configs/index.js +2 -5
- package/lib/module/configs/index.js.map +1 -1
- package/lib/module/configs/presets.js +0 -380
- package/lib/module/configs/presets.js.map +1 -1
- package/lib/module/constants.js +1 -0
- package/lib/module/constants.js.map +1 -1
- package/lib/module/navigators/create-blank-stack-navigator.js +7 -66
- package/lib/module/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/module/navigators/expo-router/index.js +1 -18
- package/lib/module/navigators/expo-router/index.js.map +1 -1
- package/lib/module/navigators/react-navigation/index.js +1 -3
- package/lib/module/navigators/react-navigation/index.js.map +1 -1
- package/lib/module/providers/screen/animation/animation.provider.js +4 -0
- package/lib/module/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/module/providers/screen/animation/helpers/build-screen-transition-options.js +1 -0
- package/lib/module/providers/screen/animation/helpers/build-screen-transition-options.js.map +1 -1
- package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js +20 -5
- package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.js.map +1 -1
- package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/index.js +16 -1
- package/lib/module/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/module/providers/screen/animation/helpers/selected-interpolator-options.js +1 -1
- package/lib/module/providers/screen/animation/helpers/selected-interpolator-options.js.map +1 -1
- package/lib/module/providers/screen/animation/use-screen-animation.js +2 -9
- package/lib/module/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/module/providers/screen/gestures/pan/behavior/pan-release.js +29 -7
- package/lib/module/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
- package/lib/module/providers/screen/gestures/pinch/behavior/pinch-release.js +27 -7
- package/lib/module/providers/screen/gestures/pinch/behavior/pinch-release.js.map +1 -1
- package/lib/module/providers/screen/gestures/shared/policy.js +2 -1
- package/lib/module/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/module/providers/screen/gestures/shared/snap-points.js +66 -0
- package/lib/module/providers/screen/gestures/shared/snap-points.js.map +1 -1
- package/lib/module/providers/screen/options/helpers.js +9 -2
- package/lib/module/providers/screen/options/helpers.js.map +1 -1
- package/lib/module/providers/screen/styles/constants.js +4 -1
- package/lib/module/providers/screen/styles/constants.js.map +1 -1
- package/lib/module/providers/screen/styles/hooks/slot-resolvers.js +2 -10
- package/lib/module/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
- package/lib/module/providers/screen/styles/slot.provider.js +1 -0
- package/lib/module/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/module/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js +11 -5
- package/lib/module/providers/stack/blank-stack-state/helpers/build-blank-stack-state.js.map +1 -1
- package/lib/module/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js +5 -4
- package/lib/module/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.js.map +1 -1
- package/lib/module/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.js.map +1 -1
- package/lib/module/providers/stack/blank-stack-state/helpers/state-equality.js +7 -1
- package/lib/module/providers/stack/blank-stack-state/helpers/state-equality.js.map +1 -1
- package/lib/module/types/animation.types.js +10 -0
- package/lib/module/types/animation.types.js.map +1 -1
- package/lib/module/utils/create-provider.js +14 -3
- package/lib/module/utils/create-provider.js.map +1 -1
- package/lib/typescript/components/boundary/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts +20 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/components/boundary/portal/teleport.d.ts +1 -1
- package/lib/typescript/components/boundary/portal/teleport.d.ts.map +1 -1
- package/lib/typescript/components/boundary/utils/source-signals.d.ts.map +1 -1
- package/lib/typescript/components/overlay/helpers/get-active-overlay.d.ts +2 -8
- package/lib/typescript/components/overlay/helpers/get-active-overlay.d.ts.map +1 -1
- package/lib/typescript/components/overlay/helpers/retain-ready-overlay-resources.d.ts +2 -1
- package/lib/typescript/components/overlay/helpers/retain-ready-overlay-resources.d.ts.map +1 -1
- package/lib/typescript/components/overlay/hooks/use-overlay-slot.d.ts.map +1 -1
- package/lib/typescript/components/overlay/variations/float-overlay.d.ts.map +1 -1
- package/lib/typescript/components/overlay/variations/overlay-host.d.ts +2 -3
- package/lib/typescript/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/components/screen-container/layers/surface.d.ts +7 -0
- package/lib/typescript/components/screen-container/layers/surface.d.ts.map +1 -0
- package/lib/typescript/components/stack-view.d.ts +1 -1
- package/lib/typescript/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/configs/index.d.ts +0 -9
- package/lib/typescript/configs/index.d.ts.map +1 -1
- package/lib/typescript/configs/presets.d.ts +0 -9
- package/lib/typescript/configs/presets.d.ts.map +1 -1
- package/lib/typescript/constants.d.ts +2 -1
- package/lib/typescript/constants.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -10
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/navigators/create-blank-stack-navigator.d.ts +2 -4
- package/lib/typescript/navigators/create-blank-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/navigators/expo-router/index.d.ts +3 -3
- package/lib/typescript/navigators/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/navigators/react-navigation/index.d.ts +1 -1
- package/lib/typescript/navigators/react-navigation/index.d.ts.map +1 -1
- package/lib/typescript/providers/screen/animation/animation.provider.d.ts +10 -1
- package/lib/typescript/providers/screen/animation/animation.provider.d.ts.map +1 -1
- package/lib/typescript/providers/screen/animation/helpers/build-screen-transition-options.d.ts.map +1 -1
- package/lib/typescript/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.d.ts +2 -1
- package/lib/typescript/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.d.ts.map +1 -1
- package/lib/typescript/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
- package/lib/typescript/providers/screen/animation/helpers/selected-interpolator-options.d.ts.map +1 -1
- package/lib/typescript/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/pan/behavior/pan-release.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/pinch/behavior/pinch-release.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/shared/policy.d.ts +2 -1
- package/lib/typescript/providers/screen/gestures/shared/policy.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/shared/snap-points.d.ts +11 -0
- package/lib/typescript/providers/screen/gestures/shared/snap-points.d.ts.map +1 -1
- package/lib/typescript/providers/screen/gestures/types.d.ts +2 -0
- package/lib/typescript/providers/screen/gestures/types.d.ts.map +1 -1
- package/lib/typescript/providers/screen/options/helpers.d.ts.map +1 -1
- package/lib/typescript/providers/screen/options/types.d.ts +1 -0
- package/lib/typescript/providers/screen/options/types.d.ts.map +1 -1
- package/lib/typescript/providers/screen/styles/constants.d.ts.map +1 -1
- package/lib/typescript/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -1
- package/lib/typescript/providers/screen/styles/slot.provider.d.ts +11 -2
- package/lib/typescript/providers/screen/styles/slot.provider.d.ts.map +1 -1
- package/lib/typescript/providers/stack/blank-stack-state/helpers/build-blank-stack-state.d.ts +3 -3
- package/lib/typescript/providers/stack/blank-stack-state/helpers/build-blank-stack-state.d.ts.map +1 -1
- package/lib/typescript/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.d.ts.map +1 -1
- package/lib/typescript/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.d.ts +3 -2
- package/lib/typescript/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.d.ts.map +1 -1
- package/lib/typescript/providers/stack/blank-stack-state/helpers/state-equality.d.ts +4 -4
- package/lib/typescript/providers/stack/blank-stack-state/helpers/state-equality.d.ts.map +1 -1
- package/lib/typescript/providers/stack/blank-stack-state/helpers/types.d.ts +6 -5
- package/lib/typescript/providers/stack/blank-stack-state/helpers/types.d.ts.map +1 -1
- package/lib/typescript/providers/stack/blank-stack.provider.d.ts +3 -1
- package/lib/typescript/providers/stack/blank-stack.provider.d.ts.map +1 -1
- package/lib/typescript/types/animation.types.d.ts +16 -12
- package/lib/typescript/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/types/blank-stack.types.d.ts +2 -23
- package/lib/typescript/types/blank-stack.types.d.ts.map +1 -1
- package/lib/typescript/types/index.d.ts +2 -2
- package/lib/typescript/types/index.d.ts.map +1 -1
- package/lib/typescript/types/providers/blank-stack-provider.types.d.ts +8 -6
- package/lib/typescript/types/providers/blank-stack-provider.types.d.ts.map +1 -1
- package/lib/typescript/types/screen.types.d.ts +50 -0
- package/lib/typescript/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/utils/create-provider.d.ts +4 -1
- package/lib/typescript/utils/create-provider.d.ts.map +1 -1
- package/package.json +3 -8
- package/src/components/boundary/create-boundary-component.tsx +10 -2
- package/src/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.ts +89 -0
- package/src/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +97 -14
- package/src/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +2 -6
- package/src/components/boundary/portal/teleport.ts +2 -23
- package/src/components/boundary/utils/source-signals.ts +6 -4
- package/src/components/overlay/helpers/get-active-overlay.ts +4 -36
- package/src/components/overlay/helpers/retain-ready-overlay-resources.ts +10 -1
- package/src/components/overlay/hooks/use-overlay-slot.ts +1 -5
- package/src/components/overlay/variations/float-overlay.tsx +9 -12
- package/src/components/overlay/variations/overlay-host.tsx +24 -22
- package/src/components/screen-container/layers/content.tsx +12 -7
- package/src/components/screen-container/layers/surface.tsx +65 -0
- package/src/components/stack-view.tsx +8 -39
- package/src/configs/index.ts +0 -6
- package/src/configs/presets.ts +0 -447
- package/src/constants.ts +2 -0
- package/src/index.ts +4 -1
- package/src/navigators/create-blank-stack-navigator.tsx +16 -124
- package/src/navigators/expo-router/index.tsx +0 -23
- package/src/navigators/react-navigation/index.tsx +0 -3
- package/src/providers/screen/animation/animation.provider.tsx +60 -54
- package/src/providers/screen/animation/helpers/build-screen-transition-options.ts +1 -0
- package/src/providers/screen/animation/helpers/hydrate-transition-state/gesture-progress.ts +26 -0
- package/src/providers/screen/animation/helpers/hydrate-transition-state/index.ts +20 -0
- package/src/providers/screen/animation/helpers/selected-interpolator-options.ts +1 -0
- package/src/providers/screen/animation/use-screen-animation.tsx +2 -14
- package/src/providers/screen/gestures/pan/behavior/pan-release.ts +46 -7
- package/src/providers/screen/gestures/pinch/behavior/pinch-release.ts +45 -4
- package/src/providers/screen/gestures/shared/policy.ts +4 -0
- package/src/providers/screen/gestures/shared/snap-points.ts +87 -0
- package/src/providers/screen/gestures/types.ts +2 -0
- package/src/providers/screen/options/helpers.ts +18 -0
- package/src/providers/screen/options/types.ts +1 -0
- package/src/providers/screen/styles/constants.ts +2 -1
- package/src/providers/screen/styles/hooks/slot-resolvers.tsx +2 -17
- package/src/providers/screen/styles/slot.provider.tsx +2 -1
- package/src/providers/stack/blank-stack-state/helpers/build-blank-stack-state.ts +30 -12
- package/src/providers/stack/blank-stack-state/helpers/derive-blank-stack-state.ts +11 -3
- package/src/providers/stack/blank-stack-state/helpers/reconcile-blank-stack-routes.ts +2 -2
- package/src/providers/stack/blank-stack-state/helpers/state-equality.ts +27 -16
- package/src/providers/stack/blank-stack-state/helpers/types.ts +9 -4
- package/src/types/animation.types.ts +16 -13
- package/src/types/blank-stack.types.ts +1 -29
- package/src/types/index.ts +4 -1
- package/src/types/providers/blank-stack-provider.types.ts +14 -11
- package/src/types/screen.types.ts +57 -0
- package/src/utils/create-provider.tsx +22 -4
- package/lib/commonjs/components/boundary/portal/utils/teleport-control.js +0 -16
- package/lib/commonjs/components/boundary/portal/utils/teleport-control.js.map +0 -1
- package/lib/commonjs/providers/navigation/navigation-host.provider.js +0 -56
- package/lib/commonjs/providers/navigation/navigation-host.provider.js.map +0 -1
- package/lib/commonjs/providers/navigation/react-navigation-host.js +0 -23
- package/lib/commonjs/providers/navigation/react-navigation-host.js.map +0 -1
- package/lib/module/components/boundary/portal/utils/teleport-control.js +0 -11
- package/lib/module/components/boundary/portal/utils/teleport-control.js.map +0 -1
- package/lib/module/providers/navigation/navigation-host.provider.js +0 -50
- package/lib/module/providers/navigation/navigation-host.provider.js.map +0 -1
- package/lib/module/providers/navigation/react-navigation-host.js +0 -19
- package/lib/module/providers/navigation/react-navigation-host.js.map +0 -1
- package/lib/typescript/components/boundary/portal/utils/teleport-control.d.ts +0 -3
- package/lib/typescript/components/boundary/portal/utils/teleport-control.d.ts.map +0 -1
- package/lib/typescript/providers/navigation/navigation-host.provider.d.ts +0 -21
- package/lib/typescript/providers/navigation/navigation-host.provider.d.ts.map +0 -1
- package/lib/typescript/providers/navigation/react-navigation-host.d.ts +0 -3
- package/lib/typescript/providers/navigation/react-navigation-host.d.ts.map +0 -1
- package/src/components/boundary/portal/utils/teleport-control.ts +0 -13
- package/src/providers/navigation/navigation-host.provider.tsx +0 -75
- package/src/providers/navigation/react-navigation-host.tsx +0 -24
|
@@ -114,6 +114,7 @@ export interface PanGesturePolicy {
|
|
|
114
114
|
gestureReleaseVelocityScale: number;
|
|
115
115
|
gestureActivationArea: ResolvedGestureActivationArea;
|
|
116
116
|
gestureSnapLocked: boolean;
|
|
117
|
+
sheetSnapBehavior: NonNullable<ScreenTransitionConfig["sheetSnapBehavior"]>;
|
|
117
118
|
sheetScrollGestureBehavior: NonNullable<
|
|
118
119
|
ScreenTransitionConfig["sheetScrollGestureBehavior"]
|
|
119
120
|
>;
|
|
@@ -129,6 +130,7 @@ export interface PinchGesturePolicy {
|
|
|
129
130
|
gestureSensitivity: NonNullable<ScreenTransitionConfig["gestureSensitivity"]>;
|
|
130
131
|
gestureSnapVelocityImpact: number;
|
|
131
132
|
gestureSnapLocked: boolean;
|
|
133
|
+
sheetSnapBehavior: NonNullable<ScreenTransitionConfig["sheetSnapBehavior"]>;
|
|
132
134
|
gestureReleaseVelocityScale: number;
|
|
133
135
|
transitionSpec: TransitionSpec | undefined;
|
|
134
136
|
}
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
DEFAULT_GESTURE_TRACKING,
|
|
8
8
|
DEFAULT_GESTURE_VELOCITY_IMPACT,
|
|
9
9
|
DEFAULT_SHEET_SCROLL_GESTURE_BEHAVIOR,
|
|
10
|
+
DEFAULT_SHEET_SNAP_BEHAVIOR,
|
|
10
11
|
} from "../../../constants";
|
|
11
12
|
import type {
|
|
12
13
|
GestureDirection,
|
|
@@ -129,6 +130,14 @@ const resolveSheetScrollGestureBehaviorOption = (
|
|
|
129
130
|
: fallback;
|
|
130
131
|
};
|
|
131
132
|
|
|
133
|
+
const resolveSheetSnapBehaviorOption = (
|
|
134
|
+
value: unknown,
|
|
135
|
+
fallback: RequiredScreenOption<"sheetSnapBehavior">,
|
|
136
|
+
): RequiredScreenOption<"sheetSnapBehavior"> => {
|
|
137
|
+
"worklet";
|
|
138
|
+
return value === "continuous" || value === "step" ? value : fallback;
|
|
139
|
+
};
|
|
140
|
+
|
|
132
141
|
const resolveGestureTrackingOption = (
|
|
133
142
|
value: unknown,
|
|
134
143
|
fallback: RequiredScreenOption<"gestureTracking">,
|
|
@@ -205,6 +214,7 @@ const areScreenOptionsEqual = (
|
|
|
205
214
|
left.gestureSnapVelocityImpact === right.gestureSnapVelocityImpact &&
|
|
206
215
|
left.gestureReleaseVelocityScale === right.gestureReleaseVelocityScale &&
|
|
207
216
|
left.gestureSnapLocked === right.gestureSnapLocked &&
|
|
217
|
+
left.sheetSnapBehavior === right.sheetSnapBehavior &&
|
|
208
218
|
left.sheetScrollGestureBehavior === right.sheetScrollGestureBehavior &&
|
|
209
219
|
left.backdropBehavior === right.backdropBehavior &&
|
|
210
220
|
left.transitionSpec === right.transitionSpec &&
|
|
@@ -249,6 +259,10 @@ export const resolveBaseScreenOptions = (
|
|
|
249
259
|
options.gestureSnapLocked,
|
|
250
260
|
DEFAULT_GESTURE_SNAP_LOCKED,
|
|
251
261
|
),
|
|
262
|
+
sheetSnapBehavior: resolveSheetSnapBehaviorOption(
|
|
263
|
+
options.sheetSnapBehavior,
|
|
264
|
+
DEFAULT_SHEET_SNAP_BEHAVIOR,
|
|
265
|
+
),
|
|
252
266
|
sheetScrollGestureBehavior: resolveSheetScrollGestureBehaviorOption(
|
|
253
267
|
resolveSheetScrollGestureBehavior(options),
|
|
254
268
|
DEFAULT_SHEET_SCROLL_GESTURE_BEHAVIOR,
|
|
@@ -315,6 +329,10 @@ export const syncScreenOptionsOverrides = (
|
|
|
315
329
|
options?.gestureSnapLocked,
|
|
316
330
|
base.gestureSnapLocked,
|
|
317
331
|
),
|
|
332
|
+
sheetSnapBehavior: resolveSheetSnapBehaviorOption(
|
|
333
|
+
options?.sheetSnapBehavior,
|
|
334
|
+
base.sheetSnapBehavior,
|
|
335
|
+
),
|
|
318
336
|
sheetScrollGestureBehavior: resolveSheetScrollGestureBehaviorOption(
|
|
319
337
|
options?.sheetScrollGestureBehavior,
|
|
320
338
|
base.sheetScrollGestureBehavior,
|
|
@@ -18,6 +18,7 @@ export type ScreenOptionsSnapshot = {
|
|
|
18
18
|
gestureSnapVelocityImpact: RequiredScreenOption<"gestureSnapVelocityImpact">;
|
|
19
19
|
gestureReleaseVelocityScale: RequiredScreenOption<"gestureReleaseVelocityScale">;
|
|
20
20
|
gestureSnapLocked: RequiredScreenOption<"gestureSnapLocked">;
|
|
21
|
+
sheetSnapBehavior: RequiredScreenOption<"sheetSnapBehavior">;
|
|
21
22
|
sheetScrollGestureBehavior: RequiredScreenOption<"sheetScrollGestureBehavior">;
|
|
22
23
|
backdropBehavior: OptionalScreenOption<"backdropBehavior">;
|
|
23
24
|
transitionSpec: OptionalScreenOption<"transitionSpec">;
|
|
@@ -22,6 +22,7 @@ const IDENTITY_TRANSFORM = [
|
|
|
22
22
|
* please add its identity value here in a PR.
|
|
23
23
|
*/
|
|
24
24
|
export const STYLE_RESET_VALUES: Record<string, unknown> = {
|
|
25
|
+
filter: [{ blur: 0.01 }],
|
|
25
26
|
transform: IDENTITY_TRANSFORM,
|
|
26
27
|
translateX: 0,
|
|
27
28
|
translateY: 0,
|
|
@@ -67,8 +68,8 @@ export const PROP_RESET_VALUES: Record<string, unknown> = {
|
|
|
67
68
|
const RESERVED_STYLE_SLOT_IDS = {
|
|
68
69
|
overlay: true,
|
|
69
70
|
content: true,
|
|
70
|
-
backdrop: true,
|
|
71
71
|
surface: true,
|
|
72
|
+
backdrop: true,
|
|
72
73
|
[NAVIGATION_MASK_ELEMENT_STYLE_ID]: true,
|
|
73
74
|
[NAVIGATION_MASK_CONTAINER_STYLE_ID]: true,
|
|
74
75
|
} as const;
|
|
@@ -1,29 +1,14 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { useAnimatedProps, useAnimatedStyle } from "react-native-reanimated";
|
|
3
3
|
import { NO_PROPS, NO_STYLES } from "../../../../constants";
|
|
4
|
-
import { useNavigationRoute } from "../../../navigation/navigation-host.provider";
|
|
5
4
|
import {
|
|
6
5
|
composeSlotStyleWithLocalTransform,
|
|
7
6
|
getLocalTransformForSlotComposition,
|
|
8
7
|
} from "../helpers/compose-slot-style";
|
|
9
|
-
import {
|
|
8
|
+
import { useScreenSlotStore } from "../slot.provider";
|
|
10
9
|
|
|
11
10
|
const useCurrentScreenSlotsMap = () => {
|
|
12
|
-
|
|
13
|
-
const localSlotsMap = useOptionalScreenSlotStore(
|
|
14
|
-
(store) => store?.slotsMap ?? null,
|
|
15
|
-
);
|
|
16
|
-
const keyedSlotsMap = useOptionalScreenSlotStore(
|
|
17
|
-
localSlotsMap ? null : routeKey,
|
|
18
|
-
(store) => store.slotsMap,
|
|
19
|
-
);
|
|
20
|
-
const slotsMap = localSlotsMap ?? keyedSlotsMap;
|
|
21
|
-
|
|
22
|
-
if (!slotsMap) {
|
|
23
|
-
throw new Error(`ScreenSlotStore is unavailable for route "${routeKey}"`);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return slotsMap;
|
|
11
|
+
return useScreenSlotStore((store) => store.slotsMap);
|
|
27
12
|
};
|
|
28
13
|
|
|
29
14
|
export const useSlotStyles = (slotId: string | undefined) => {
|
|
@@ -18,8 +18,8 @@ type Props = { children: ReactNode };
|
|
|
18
18
|
export type ScreenSlotName =
|
|
19
19
|
| "overlay"
|
|
20
20
|
| "content"
|
|
21
|
-
| "backdrop"
|
|
22
21
|
| "surface"
|
|
22
|
+
| "backdrop"
|
|
23
23
|
| typeof NAVIGATION_MASK_CONTAINER_STYLE_ID
|
|
24
24
|
| typeof NAVIGATION_MASK_ELEMENT_STYLE_ID;
|
|
25
25
|
|
|
@@ -34,6 +34,7 @@ const createScreenSlotProvider = createProvider("ScreenSlot", {
|
|
|
34
34
|
})<Props, ScreenSlotContextValue>;
|
|
35
35
|
|
|
36
36
|
export const {
|
|
37
|
+
StoreProvider: ScreenSlotStoreProvider,
|
|
37
38
|
ScreenSlotProvider,
|
|
38
39
|
useOptionalScreenSlotStore,
|
|
39
40
|
useScreenSlotStore,
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { BlankStackDescriptor } from "../../../../types/blank-stack.types";
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
BlankStackDescriptorSource,
|
|
4
|
+
BlankStackDescriptorSources,
|
|
5
|
+
BlankStackProviderProps,
|
|
6
|
+
} from "../../../../types/providers/blank-stack-provider.types";
|
|
3
7
|
import type {
|
|
4
8
|
BaseStackScene,
|
|
5
9
|
StackSceneActivity,
|
|
@@ -9,6 +13,7 @@ import { resolveSceneNeighbors } from "./navigation/resolve-scene-neighbors";
|
|
|
9
13
|
import {
|
|
10
14
|
areDescriptorSourcesEquivalent,
|
|
11
15
|
areDescriptorsEqual,
|
|
16
|
+
areRecordsShallowEqual,
|
|
12
17
|
areRouteChildStateMapsEqual,
|
|
13
18
|
getRouteChildState,
|
|
14
19
|
routeKeyListsAreEqual,
|
|
@@ -24,7 +29,7 @@ import type {
|
|
|
24
29
|
type BuildBlankStackStateParams = {
|
|
25
30
|
props: BlankStackProviderProps;
|
|
26
31
|
routes: BlankStackRoutes;
|
|
27
|
-
descriptors:
|
|
32
|
+
descriptors: BlankStackDescriptorSources;
|
|
28
33
|
closingRouteKeys: ReadonlySet<string>;
|
|
29
34
|
previousState?: LocalRoutesState;
|
|
30
35
|
};
|
|
@@ -35,9 +40,9 @@ const resolveStableDescriptorSource = ({
|
|
|
35
40
|
previousState,
|
|
36
41
|
}: {
|
|
37
42
|
routeKey: string;
|
|
38
|
-
sourceDescriptor:
|
|
43
|
+
sourceDescriptor: BlankStackDescriptorSource;
|
|
39
44
|
previousState?: LocalRoutesState;
|
|
40
|
-
}):
|
|
45
|
+
}): BlankStackDescriptorSource => {
|
|
41
46
|
const previousSourceDescriptor = previousState?.sourceDescriptors[routeKey];
|
|
42
47
|
|
|
43
48
|
if (
|
|
@@ -125,6 +130,7 @@ const getSceneActivityWindow = ({
|
|
|
125
130
|
};
|
|
126
131
|
|
|
127
132
|
const buildBaseScenes = ({
|
|
133
|
+
props,
|
|
128
134
|
routes,
|
|
129
135
|
descriptors,
|
|
130
136
|
closingRouteKeys,
|
|
@@ -136,7 +142,7 @@ const buildBaseScenes = ({
|
|
|
136
142
|
const routeKeys: string[] = [];
|
|
137
143
|
const scenes: BaseStackScene<BlankStackDescriptor>[] = [];
|
|
138
144
|
const routeChildStates: Record<string, unknown> = {};
|
|
139
|
-
const sourceDescriptors:
|
|
145
|
+
const sourceDescriptors: BlankStackDescriptorSources = {};
|
|
140
146
|
const blankStackDescriptors: BlankStackDescriptors = {};
|
|
141
147
|
let shouldShowFloatOverlay = false;
|
|
142
148
|
|
|
@@ -169,14 +175,28 @@ const buildBaseScenes = ({
|
|
|
169
175
|
});
|
|
170
176
|
|
|
171
177
|
const previousDescriptor = previousState?.descriptors[route.key];
|
|
178
|
+
const descriptorRoute =
|
|
179
|
+
previousDescriptor &&
|
|
180
|
+
childStateUnchanged &&
|
|
181
|
+
areRecordsShallowEqual(
|
|
182
|
+
previousDescriptor.route as unknown as Record<string, unknown>,
|
|
183
|
+
route as unknown as Record<string, unknown>,
|
|
184
|
+
)
|
|
185
|
+
? previousDescriptor.route
|
|
186
|
+
: route;
|
|
172
187
|
const descriptor =
|
|
173
188
|
previousDescriptor &&
|
|
174
189
|
childStateUnchanged &&
|
|
175
|
-
previousDescriptor.route ===
|
|
176
|
-
previousDescriptor.navigation ===
|
|
190
|
+
previousDescriptor.route === descriptorRoute &&
|
|
191
|
+
previousDescriptor.navigation === props.navigation &&
|
|
177
192
|
previousDescriptor.options === sourceDescriptor.options
|
|
178
193
|
? previousDescriptor
|
|
179
|
-
:
|
|
194
|
+
: ({
|
|
195
|
+
route: descriptorRoute,
|
|
196
|
+
navigation: props.navigation,
|
|
197
|
+
options: sourceDescriptor.options,
|
|
198
|
+
render: sourceDescriptor.render,
|
|
199
|
+
} as BlankStackDescriptor);
|
|
180
200
|
|
|
181
201
|
routeKeys.push(route.key);
|
|
182
202
|
routeChildStates[route.key] = routeChildState;
|
|
@@ -206,12 +226,10 @@ const buildBaseScenes = ({
|
|
|
206
226
|
|
|
207
227
|
const withSceneRelationships = ({
|
|
208
228
|
scenes,
|
|
209
|
-
sourceDescriptors,
|
|
210
229
|
closingRouteKeys,
|
|
211
230
|
previousState,
|
|
212
231
|
}: {
|
|
213
232
|
scenes: BaseStackScene<BlankStackDescriptor>[];
|
|
214
|
-
sourceDescriptors: BlankStackDescriptors;
|
|
215
233
|
closingRouteKeys: ReadonlySet<string>;
|
|
216
234
|
previousState?: LocalRoutesState;
|
|
217
235
|
}): BaseStackScene<BlankStackDescriptor>[] => {
|
|
@@ -231,7 +249,7 @@ const withSceneRelationships = ({
|
|
|
231
249
|
|
|
232
250
|
const relationshipScenes = scenes.map((scene) => ({
|
|
233
251
|
route: scene.route,
|
|
234
|
-
descriptor:
|
|
252
|
+
descriptor: scene.descriptor,
|
|
235
253
|
}));
|
|
236
254
|
|
|
237
255
|
const nextScenes = scenes.map((scene, sceneIndex) => {
|
|
@@ -296,7 +314,6 @@ export const buildBlankStackState = (
|
|
|
296
314
|
|
|
297
315
|
const scenes = withSceneRelationships({
|
|
298
316
|
scenes: baseScenes,
|
|
299
|
-
sourceDescriptors,
|
|
300
317
|
closingRouteKeys: params.closingRouteKeys,
|
|
301
318
|
previousState: params.previousState,
|
|
302
319
|
});
|
|
@@ -305,6 +322,7 @@ export const buildBlankStackState = (
|
|
|
305
322
|
|
|
306
323
|
return {
|
|
307
324
|
routes: params.routes,
|
|
325
|
+
navigation: params.props.navigation,
|
|
308
326
|
descriptors:
|
|
309
327
|
params.previousState &&
|
|
310
328
|
areDescriptorsEqual(
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
areDescriptorsEqual,
|
|
8
8
|
areRouteChildStateMapsEqual,
|
|
9
9
|
getRouteChildStateMap,
|
|
10
|
-
|
|
10
|
+
routesAreShallowlyEqual,
|
|
11
11
|
setsAreEqual,
|
|
12
12
|
} from "./state-equality";
|
|
13
13
|
import type { BlankStackRoutes, LocalRoutesState } from "./types";
|
|
@@ -39,6 +39,7 @@ export const deriveBlankStackState = ({
|
|
|
39
39
|
const nextDescriptors = props.descriptors;
|
|
40
40
|
const nextRouteChildStates = getRouteChildStateMap(nextRoutesSnapshot);
|
|
41
41
|
const nextFocusedRouteKey = nextRoutesSnapshot[props.state.index]?.key;
|
|
42
|
+
const navigationUnchanged = current.navigation === props.navigation;
|
|
42
43
|
const focusedRouteUnchanged = current.focusedRouteKey === nextFocusedRouteKey;
|
|
43
44
|
const closingRouteKeysUnchanged = setsAreEqual(
|
|
44
45
|
current.closingRouteKeys,
|
|
@@ -50,6 +51,7 @@ export const deriveBlankStackState = ({
|
|
|
50
51
|
);
|
|
51
52
|
|
|
52
53
|
const alreadyAligned =
|
|
54
|
+
navigationUnchanged &&
|
|
53
55
|
focusedRouteUnchanged &&
|
|
54
56
|
closingRouteKeysUnchanged &&
|
|
55
57
|
routeChildStatesUnchanged &&
|
|
@@ -61,10 +63,11 @@ export const deriveBlankStackState = ({
|
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
const logicallyAligned =
|
|
66
|
+
navigationUnchanged &&
|
|
64
67
|
focusedRouteUnchanged &&
|
|
65
68
|
closingRouteKeysUnchanged &&
|
|
66
69
|
routeChildStatesUnchanged &&
|
|
67
|
-
|
|
70
|
+
routesAreShallowlyEqual(current.routes, nextRoutesSnapshot) &&
|
|
68
71
|
areDescriptorSourceMapsEquivalent(
|
|
69
72
|
current.sourceDescriptors,
|
|
70
73
|
nextDescriptors,
|
|
@@ -92,7 +95,12 @@ export const deriveBlankStackState = ({
|
|
|
92
95
|
closingRouteKeys,
|
|
93
96
|
);
|
|
94
97
|
|
|
95
|
-
if (
|
|
98
|
+
if (
|
|
99
|
+
navigationUnchanged &&
|
|
100
|
+
!routesChanged &&
|
|
101
|
+
!descriptorsChanged &&
|
|
102
|
+
!closingRouteKeysChanged
|
|
103
|
+
) {
|
|
96
104
|
return current;
|
|
97
105
|
}
|
|
98
106
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { BlankStackDescriptorSources } from "../../../../types/providers/blank-stack-provider.types";
|
|
1
2
|
import type { RouteWithKey } from "../../../../types/stack.types";
|
|
2
3
|
import { composeDescriptors } from "./navigation/compose-descriptors";
|
|
3
4
|
import { syncRoutesWithRemoved } from "./navigation/sync-routes-with-removed";
|
|
4
5
|
import { routesHaveSameKeys } from "./state-equality";
|
|
5
6
|
import type {
|
|
6
|
-
BlankStackDescriptors,
|
|
7
7
|
BlankStackRoutes,
|
|
8
8
|
LocalRoutesState,
|
|
9
9
|
ReconciledRoutes,
|
|
@@ -13,7 +13,7 @@ type ReconcileBlankStackRoutesParams = {
|
|
|
13
13
|
current: LocalRoutesState;
|
|
14
14
|
previousRoutesSnapshot: BlankStackRoutes;
|
|
15
15
|
nextRoutesSnapshot: BlankStackRoutes;
|
|
16
|
-
nextDescriptors:
|
|
16
|
+
nextDescriptors: BlankStackDescriptorSources;
|
|
17
17
|
closingRouteKeys: Set<string>;
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
BlankStackDescriptorSource,
|
|
3
|
+
BlankStackDescriptorSources,
|
|
4
|
+
} from "../../../../types/providers/blank-stack-provider.types";
|
|
2
5
|
import type { RouteWithKey } from "../../../../types/stack.types";
|
|
3
|
-
import type { BlankStackDescriptors } from "./types";
|
|
4
6
|
|
|
5
7
|
export const areDescriptorsEqual = <
|
|
6
8
|
DescriptorMap extends Record<string, unknown>,
|
|
@@ -54,6 +56,22 @@ export const routesHaveSameKeys = <Route extends RouteWithKey>(
|
|
|
54
56
|
return a.every((route, index) => route.key === b[index]?.key);
|
|
55
57
|
};
|
|
56
58
|
|
|
59
|
+
export const routesAreShallowlyEqual = <Route extends RouteWithKey>(
|
|
60
|
+
previous: readonly Route[],
|
|
61
|
+
next: readonly Route[],
|
|
62
|
+
): boolean => {
|
|
63
|
+
if (!routesHaveSameKeys(previous, next)) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return previous.every((route, index) =>
|
|
68
|
+
areRecordsShallowEqual(
|
|
69
|
+
route as unknown as Record<string, unknown>,
|
|
70
|
+
next[index] as unknown as Record<string, unknown>,
|
|
71
|
+
),
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
57
75
|
export const getRouteChildState = (route: RouteWithKey): unknown => {
|
|
58
76
|
if (!route || typeof route !== "object") {
|
|
59
77
|
return undefined;
|
|
@@ -111,25 +129,18 @@ export const areRecordsShallowEqual = (
|
|
|
111
129
|
};
|
|
112
130
|
|
|
113
131
|
export const areDescriptorSourcesEquivalent = (
|
|
114
|
-
previous:
|
|
115
|
-
next:
|
|
132
|
+
previous: BlankStackDescriptorSource,
|
|
133
|
+
next: BlankStackDescriptorSource,
|
|
116
134
|
): boolean => {
|
|
117
|
-
return (
|
|
118
|
-
previous.
|
|
119
|
-
|
|
120
|
-
previous.route as unknown as Record<string, unknown>,
|
|
121
|
-
next.route as unknown as Record<string, unknown>,
|
|
122
|
-
) &&
|
|
123
|
-
areRecordsShallowEqual(
|
|
124
|
-
previous.options as unknown as Record<string, unknown>,
|
|
125
|
-
next.options as unknown as Record<string, unknown>,
|
|
126
|
-
)
|
|
135
|
+
return areRecordsShallowEqual(
|
|
136
|
+
previous.options as unknown as Record<string, unknown>,
|
|
137
|
+
next.options as unknown as Record<string, unknown>,
|
|
127
138
|
);
|
|
128
139
|
};
|
|
129
140
|
|
|
130
141
|
export const areDescriptorSourceMapsEquivalent = (
|
|
131
|
-
previous:
|
|
132
|
-
next:
|
|
142
|
+
previous: BlankStackDescriptorSources,
|
|
143
|
+
next: BlankStackDescriptorSources,
|
|
133
144
|
): boolean => {
|
|
134
145
|
if (previous === next) return true;
|
|
135
146
|
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import type { BlankStackDescriptor } from "../../../../types/blank-stack.types";
|
|
2
|
-
import type { BlankStackProviderProps } from "../../../../types/providers/blank-stack-provider.types";
|
|
3
2
|
import type {
|
|
3
|
+
BlankStackDescriptorSources,
|
|
4
|
+
BlankStackProviderProps,
|
|
5
|
+
} from "../../../../types/providers/blank-stack-provider.types";
|
|
6
|
+
import type {
|
|
7
|
+
BaseStackNavigation,
|
|
4
8
|
BaseStackRoute,
|
|
5
9
|
BaseStackScene,
|
|
6
10
|
} from "../../../../types/stack.types";
|
|
7
11
|
|
|
8
|
-
export type BlankStackRoutes =
|
|
12
|
+
export type BlankStackRoutes = BaseStackRoute[];
|
|
9
13
|
|
|
10
14
|
export type BlankStackDescriptors = Record<string, BlankStackDescriptor>;
|
|
11
15
|
|
|
12
16
|
export type LocalRoutesState = {
|
|
13
17
|
routes: BlankStackRoutes;
|
|
14
18
|
descriptors: BlankStackDescriptors;
|
|
15
|
-
sourceDescriptors:
|
|
19
|
+
sourceDescriptors: BlankStackDescriptorSources;
|
|
20
|
+
navigation: BaseStackNavigation;
|
|
16
21
|
focusedRouteKey?: string;
|
|
17
22
|
routeChildStates: Record<string, unknown>;
|
|
18
23
|
scenes: BaseStackScene<BlankStackDescriptor>[];
|
|
@@ -35,7 +40,7 @@ export type BlankStackController = {
|
|
|
35
40
|
|
|
36
41
|
export type ReconciledRoutes = {
|
|
37
42
|
routes: BlankStackRoutes;
|
|
38
|
-
descriptors:
|
|
43
|
+
descriptors: BlankStackDescriptorSources;
|
|
39
44
|
};
|
|
40
45
|
|
|
41
46
|
export type SceneActivityWindow = {
|
|
@@ -29,6 +29,7 @@ export type ScreenTransitionOptions = Pick<
|
|
|
29
29
|
| "gestureSnapVelocityImpact"
|
|
30
30
|
| "gestureReleaseVelocityScale"
|
|
31
31
|
| "gestureSnapLocked"
|
|
32
|
+
| "sheetSnapBehavior"
|
|
32
33
|
| "sheetScrollGestureBehavior"
|
|
33
34
|
| "backdropBehavior"
|
|
34
35
|
>;
|
|
@@ -278,19 +279,25 @@ export type ScreenStyleInterpolator = (
|
|
|
278
279
|
*/
|
|
279
280
|
export type AnimatedViewStyle = ViewStyle & TextStyle;
|
|
280
281
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
282
|
+
/**
|
|
283
|
+
* Selects which matched boundary owns handoff content during a transition.
|
|
284
|
+
*
|
|
285
|
+
* `"auto"` follows the navigator's default ownership lifecycle. Use an
|
|
286
|
+
* explicit target when ownership needs to change at a precise interpolator
|
|
287
|
+
* frame, such as returning content to its source as soon as dismissal begins.
|
|
288
|
+
*
|
|
289
|
+
* @default "auto"
|
|
290
|
+
*/
|
|
291
|
+
export type BoundaryHandoffTarget = "auto" | "source" | "destination";
|
|
286
292
|
|
|
287
293
|
export type TransitionSlotProps = Record<string, unknown> & {
|
|
288
294
|
/**
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
295
|
+
* Selects which matched boundary owns handoff content for the current
|
|
296
|
+
* interpolator frame.
|
|
297
|
+
*
|
|
298
|
+
* @default "auto"
|
|
292
299
|
*/
|
|
293
|
-
|
|
300
|
+
handoffTarget?: BoundaryHandoffTarget;
|
|
294
301
|
};
|
|
295
302
|
|
|
296
303
|
type TransitionSlotDefinition = {
|
|
@@ -344,8 +351,6 @@ export type NormalizedTransitionInterpolatedStyle = {
|
|
|
344
351
|
content?: NormalizedTransitionSlotStyle;
|
|
345
352
|
/** Animated style and props for the backdrop layer between screens. */
|
|
346
353
|
backdrop?: NormalizedTransitionSlotStyle;
|
|
347
|
-
/** Animated style and props for the surface component layer within the screen. */
|
|
348
|
-
surface?: NormalizedTransitionSlotStyle;
|
|
349
354
|
/** Animated style and props for the navigation mask container layer. */
|
|
350
355
|
[NAVIGATION_MASK_CONTAINER_STYLE_ID]?: NormalizedTransitionSlotStyle;
|
|
351
356
|
/** Animated style and props for the navigation mask element layer. */
|
|
@@ -376,8 +381,6 @@ export type TransitionInterpolatedStyle = {
|
|
|
376
381
|
content?: TransitionSlotStyle;
|
|
377
382
|
/** Animated style and props for the backdrop layer between screens. */
|
|
378
383
|
backdrop?: TransitionSlotStyle;
|
|
379
|
-
/** Animated style and props for the surface component layer within the screen. */
|
|
380
|
-
surface?: TransitionSlotStyle;
|
|
381
384
|
/** Animated style and props for the navigation mask container layer. */
|
|
382
385
|
[NAVIGATION_MASK_CONTAINER_STYLE_ID]?: TransitionSlotStyle;
|
|
383
386
|
/** Animated style and props for the navigation mask element layer. */
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
DefaultNavigatorOptions,
|
|
3
3
|
Descriptor,
|
|
4
|
-
NavigationHelpers,
|
|
5
4
|
NavigationProp,
|
|
6
5
|
ParamListBase,
|
|
7
6
|
RouteProp,
|
|
@@ -48,32 +47,6 @@ export type BlankStackOptionsArgs<
|
|
|
48
47
|
theme: Theme;
|
|
49
48
|
};
|
|
50
49
|
|
|
51
|
-
export type BlankStackNavigationHelpers = NavigationHelpers<
|
|
52
|
-
ParamListBase,
|
|
53
|
-
BlankStackNavigationEventMap
|
|
54
|
-
>;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Additional props accepted by the blank stack navigator.
|
|
58
|
-
*
|
|
59
|
-
* These can be passed to `<BlankStack.Navigator />` in the dynamic API, and
|
|
60
|
-
* they are also supported as top-level keys in static navigator config.
|
|
61
|
-
*/
|
|
62
|
-
export interface BlankStackFactoryOptions {
|
|
63
|
-
/**
|
|
64
|
-
* Creates an isolated navigation tree for embedded flows.
|
|
65
|
-
*
|
|
66
|
-
* Use this when the blank stack needs to live inside another screen or host
|
|
67
|
-
* application without joining the parent React Navigation tree.
|
|
68
|
-
*
|
|
69
|
-
* When enabled, the navigator:
|
|
70
|
-
* - wraps itself in `NavigationIndependentTree` + `NavigationContainer`
|
|
71
|
-
*
|
|
72
|
-
* Leave this disabled for normal top-level app stacks.
|
|
73
|
-
*/
|
|
74
|
-
independent?: boolean;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
50
|
/**
|
|
78
51
|
* Props passed to overlay components in blank-stack.
|
|
79
52
|
* Uses the shared OverlayProps type with blank-stack's navigation type.
|
|
@@ -121,8 +94,7 @@ export type BlankStackNavigatorProps = DefaultNavigatorOptions<
|
|
|
121
94
|
BlankStackNavigationEventMap,
|
|
122
95
|
BlankStackNavigationProp<ParamListBase>
|
|
123
96
|
> &
|
|
124
|
-
StackRouterOptions
|
|
125
|
-
BlankStackFactoryOptions;
|
|
97
|
+
StackRouterOptions;
|
|
126
98
|
|
|
127
99
|
export type BlankStackDescriptor = Descriptor<
|
|
128
100
|
BlankStackNavigationOptions,
|
package/src/types/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { FALSE, TRUE } from "../constants";
|
|
|
2
2
|
export type {
|
|
3
3
|
AnimatedViewStyle,
|
|
4
4
|
AnimationConfig,
|
|
5
|
-
|
|
5
|
+
BoundaryHandoffTarget,
|
|
6
6
|
ScreenInterpolationProps,
|
|
7
7
|
ScreenStyleInterpolator,
|
|
8
8
|
ScreenTransitionAccessor,
|
|
@@ -60,7 +60,10 @@ export type {
|
|
|
60
60
|
ScreenContentComponentProps,
|
|
61
61
|
ScreenKey,
|
|
62
62
|
ScreenLayerComponentProps,
|
|
63
|
+
ScreenSurfaceComponent,
|
|
64
|
+
ScreenSurfaceComponentProps,
|
|
63
65
|
ScreenTransitionConfig,
|
|
66
|
+
SheetSnapBehavior,
|
|
64
67
|
TransitionAwareProps,
|
|
65
68
|
} from "./screen.types";
|
|
66
69
|
export type {
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
BlankStackNavigationHelpers,
|
|
4
|
-
} from "../blank-stack.types";
|
|
1
|
+
import type { NavigatorDescriptor } from "standard-navigation";
|
|
2
|
+
import type { BlankStackNavigationOptions } from "../blank-stack.types";
|
|
5
3
|
import type {
|
|
6
4
|
BaseStackDescriptor,
|
|
5
|
+
BaseStackNavigation,
|
|
7
6
|
BaseStackRoute,
|
|
8
7
|
BaseStackScene,
|
|
9
8
|
BaseStackState,
|
|
10
9
|
} from "../stack.types";
|
|
11
10
|
|
|
12
11
|
export interface BlankStackProviderProps {
|
|
13
|
-
state: BaseStackState<
|
|
14
|
-
navigation:
|
|
15
|
-
descriptors:
|
|
16
|
-
describe: (
|
|
17
|
-
route: BlankStackDescriptor["route"],
|
|
18
|
-
placeholder: boolean,
|
|
19
|
-
) => BlankStackDescriptor;
|
|
12
|
+
state: BaseStackState<BaseStackRoute>;
|
|
13
|
+
navigation: BaseStackNavigation;
|
|
14
|
+
descriptors: BlankStackDescriptorSources;
|
|
20
15
|
}
|
|
21
16
|
|
|
17
|
+
export type BlankStackDescriptorSource =
|
|
18
|
+
NavigatorDescriptor<BlankStackNavigationOptions>;
|
|
19
|
+
|
|
20
|
+
export type BlankStackDescriptorSources = Record<
|
|
21
|
+
string,
|
|
22
|
+
BlankStackDescriptorSource
|
|
23
|
+
>;
|
|
24
|
+
|
|
22
25
|
export interface BlankStackStoreValue {
|
|
23
26
|
navigatorKey: string;
|
|
24
27
|
routeKeys: string[];
|