react-native-screen-transitions 2.4.1 → 2.4.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/__configs__/presets.js.map +1 -1
- package/lib/commonjs/components/controllers/screen-lifecycle.blank.js +59 -0
- package/lib/commonjs/components/controllers/screen-lifecycle.blank.js.map +1 -0
- package/lib/commonjs/components/root-transition-aware.js.map +1 -1
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/hooks/animation/use-screen-animation.js +9 -5
- package/lib/commonjs/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/integrations/blank-stack/components/Header.js +135 -0
- package/lib/commonjs/integrations/blank-stack/components/Header.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/components/Screens.js +64 -0
- package/lib/commonjs/integrations/blank-stack/components/Screens.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/components/StackView.js +85 -0
- package/lib/commonjs/integrations/blank-stack/components/StackView.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/navigators/createBlankStackNavigator.js +68 -0
- package/lib/commonjs/integrations/blank-stack/navigators/createBlankStackNavigator.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/providers/screen-transition-provider.js +10 -0
- package/lib/commonjs/integrations/blank-stack/providers/screen-transition-provider.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js +66 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js +16 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js +208 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js.map +1 -0
- package/lib/commonjs/{types/navigator.js → integrations/blank-stack/utils/with-stack-navigation/_types.js} +1 -1
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_types.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js +15 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js +23 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js +15 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js +14 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js +13 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/index.js +71 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/index.js.map +1 -0
- package/lib/commonjs/integrations/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/providers/screen-transition-provider.js +10 -0
- package/lib/commonjs/integrations/native-stack/providers/screen-transition-provider.js.map +1 -0
- package/lib/commonjs/integrations/native-stack/utils/getModalRoutesKeys.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/utils/useInvalidPreventRemoveError.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/views/NativeStackView.native.js +1 -1
- package/lib/commonjs/integrations/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/views/useHeaderConfigProps.js.map +1 -1
- package/lib/commonjs/providers/create-screen-transition-provider.js +35 -0
- package/lib/commonjs/providers/create-screen-transition-provider.js.map +1 -0
- package/lib/commonjs/providers/keys.js.map +1 -1
- package/lib/commonjs/providers/transition-styles.js +18 -4
- package/lib/commonjs/providers/transition-styles.js.map +1 -1
- package/lib/commonjs/stores/animations.js.map +1 -1
- package/lib/commonjs/stores/bounds/index.js.map +1 -1
- package/lib/commonjs/stores/gestures.js.map +1 -1
- package/lib/commonjs/stores/utils/reset-stores-for-screen.js.map +1 -1
- package/lib/commonjs/types/blank-stack.navigator.js +6 -0
- package/lib/{module/types/navigator.js.map → commonjs/types/blank-stack.navigator.js.map} +1 -1
- package/lib/commonjs/types/native-stack.navigator.js +6 -0
- package/lib/commonjs/types/native-stack.navigator.js.map +1 -0
- package/lib/commonjs/utils/animation/derivations.js +1 -14
- package/lib/commonjs/utils/animation/derivations.js.map +1 -1
- package/lib/commonjs/utils/bounds/constants.js.map +1 -1
- package/lib/commonjs/utils/bounds/index.js +23 -90
- package/lib/commonjs/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/utils/gesture/apply-offset-rules.js.map +1 -1
- package/lib/commonjs/utils/gesture/check-gesture-activation.js.map +1 -1
- package/lib/module/__configs__/presets.js.map +1 -1
- package/lib/module/components/controllers/screen-lifecycle.blank.js +53 -0
- package/lib/module/components/controllers/screen-lifecycle.blank.js.map +1 -0
- package/lib/module/components/root-transition-aware.js.map +1 -1
- package/lib/module/constants.js.map +1 -1
- package/lib/module/hooks/animation/use-screen-animation.js +9 -5
- package/lib/module/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/integrations/blank-stack/components/Header.js +131 -0
- package/lib/module/integrations/blank-stack/components/Header.js.map +1 -0
- package/lib/module/integrations/blank-stack/components/Screens.js +58 -0
- package/lib/module/integrations/blank-stack/components/Screens.js.map +1 -0
- package/lib/module/integrations/blank-stack/components/StackView.js +81 -0
- package/lib/module/integrations/blank-stack/components/StackView.js.map +1 -0
- package/lib/module/integrations/blank-stack/navigators/createBlankStackNavigator.js +63 -0
- package/lib/module/integrations/blank-stack/navigators/createBlankStackNavigator.js.map +1 -0
- package/lib/module/integrations/blank-stack/providers/screen-transition-provider.js +6 -0
- package/lib/module/integrations/blank-stack/providers/screen-transition-provider.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js +60 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js +11 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js +202 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_types.js +4 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_types.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js +10 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js +19 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js +10 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js +9 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js +8 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/index.js +65 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/index.js.map +1 -0
- package/lib/module/integrations/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/module/integrations/native-stack/providers/screen-transition-provider.js +6 -0
- package/lib/module/integrations/native-stack/providers/screen-transition-provider.js.map +1 -0
- package/lib/module/integrations/native-stack/utils/getModalRoutesKeys.js.map +1 -1
- package/lib/module/integrations/native-stack/utils/useInvalidPreventRemoveError.js.map +1 -1
- package/lib/module/integrations/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/module/integrations/native-stack/views/NativeStackView.native.js +1 -1
- package/lib/module/integrations/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/module/integrations/native-stack/views/useHeaderConfigProps.js.map +1 -1
- package/lib/module/providers/create-screen-transition-provider.js +31 -0
- package/lib/module/providers/create-screen-transition-provider.js.map +1 -0
- package/lib/module/providers/keys.js.map +1 -1
- package/lib/module/providers/transition-styles.js +19 -5
- package/lib/module/providers/transition-styles.js.map +1 -1
- package/lib/module/stores/animations.js.map +1 -1
- package/lib/module/stores/bounds/index.js.map +1 -1
- package/lib/module/stores/gestures.js.map +1 -1
- package/lib/module/stores/utils/reset-stores-for-screen.js.map +1 -1
- package/lib/module/types/blank-stack.navigator.js +4 -0
- package/lib/{commonjs/types/navigator.js.map → module/types/blank-stack.navigator.js.map} +1 -1
- package/lib/module/types/native-stack.navigator.js +4 -0
- package/lib/module/types/native-stack.navigator.js.map +1 -0
- package/lib/module/utils/animation/derivations.js +1 -14
- package/lib/module/utils/animation/derivations.js.map +1 -1
- package/lib/module/utils/bounds/constants.js.map +1 -1
- package/lib/module/utils/bounds/index.js +24 -91
- package/lib/module/utils/bounds/index.js.map +1 -1
- package/lib/module/utils/gesture/apply-offset-rules.js.map +1 -1
- package/lib/module/utils/gesture/check-gesture-activation.js.map +1 -1
- package/lib/typescript/__configs__/index.d.ts +9 -9
- package/lib/typescript/__configs__/index.d.ts.map +1 -1
- package/lib/typescript/__configs__/presets.d.ts +1 -1
- package/lib/typescript/__configs__/presets.d.ts.map +1 -1
- package/lib/typescript/components/controllers/screen-lifecycle.blank.d.ts +7 -0
- package/lib/typescript/components/controllers/screen-lifecycle.blank.d.ts.map +1 -0
- package/lib/typescript/components/root-transition-aware.d.ts.map +1 -1
- package/lib/typescript/constants.d.ts +2 -2
- package/lib/typescript/constants.d.ts.map +1 -1
- package/lib/typescript/hooks/animation/use-screen-animation.d.ts +1 -1
- package/lib/typescript/hooks/animation/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +20 -18
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/integrations/blank-stack/components/Header.d.ts +5 -0
- package/lib/typescript/integrations/blank-stack/components/Header.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/components/Screens.d.ts +15 -0
- package/lib/typescript/integrations/blank-stack/components/Screens.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/components/StackView.d.ts +2 -0
- package/lib/typescript/integrations/blank-stack/components/StackView.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/navigators/createBlankStackNavigator.d.ts +16 -0
- package/lib/typescript/integrations/blank-stack/navigators/createBlankStackNavigator.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/providers/screen-transition-provider.d.ts +8 -0
- package/lib/typescript/integrations/blank-stack/providers/screen-transition-provider.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.d.ts +8 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.d.ts +2 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.d.ts +20 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_types.d.ts +23 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_types.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.d.ts +3 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.d.ts +4 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.d.ts +4 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.d.ts +3 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.d.ts +3 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/index.d.ts +6 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/index.d.ts.map +1 -0
- package/lib/typescript/integrations/native-stack/navigators/createNativeStackNavigator.d.ts +1 -1
- package/lib/typescript/integrations/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/providers/screen-transition-provider.d.ts +8 -0
- package/lib/typescript/integrations/native-stack/providers/screen-transition-provider.d.ts.map +1 -0
- package/lib/typescript/integrations/native-stack/utils/getModalRoutesKeys.d.ts +1 -1
- package/lib/typescript/integrations/native-stack/utils/getModalRoutesKeys.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/utils/useInvalidPreventRemoveError.d.ts +1 -1
- package/lib/typescript/integrations/native-stack/utils/useInvalidPreventRemoveError.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/views/NativeStackView.d.ts +1 -1
- package/lib/typescript/integrations/native-stack/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/views/NativeStackView.native.d.ts +1 -1
- package/lib/typescript/integrations/native-stack/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/views/useHeaderConfigProps.d.ts +1 -1
- package/lib/typescript/integrations/native-stack/views/useHeaderConfigProps.d.ts.map +1 -1
- package/lib/typescript/providers/create-screen-transition-provider.d.ts +15 -0
- package/lib/typescript/providers/create-screen-transition-provider.d.ts.map +1 -0
- package/lib/typescript/providers/keys.d.ts +15 -13
- package/lib/typescript/providers/keys.d.ts.map +1 -1
- package/lib/typescript/providers/transition-styles.d.ts.map +1 -1
- package/lib/typescript/stores/animations.d.ts +1 -1
- package/lib/typescript/stores/animations.d.ts.map +1 -1
- package/lib/typescript/stores/bounds/index.d.ts +1 -1
- package/lib/typescript/stores/bounds/index.d.ts.map +1 -1
- package/lib/typescript/stores/gestures.d.ts +1 -1
- package/lib/typescript/stores/gestures.d.ts.map +1 -1
- package/lib/typescript/stores/utils/reset-stores-for-screen.d.ts +1 -1
- package/lib/typescript/stores/utils/reset-stores-for-screen.d.ts.map +1 -1
- package/lib/typescript/types/animation.d.ts +2 -4
- package/lib/typescript/types/animation.d.ts.map +1 -1
- package/lib/typescript/types/blank-stack.navigator.d.ts +214 -0
- package/lib/typescript/types/blank-stack.navigator.d.ts.map +1 -0
- package/lib/typescript/types/bounds.d.ts +0 -57
- package/lib/typescript/types/bounds.d.ts.map +1 -1
- package/lib/typescript/types/{navigator.d.ts → native-stack.navigator.d.ts} +5 -1
- package/lib/typescript/types/native-stack.navigator.d.ts.map +1 -0
- package/lib/typescript/utils/animation/derivations.d.ts +1 -4
- package/lib/typescript/utils/animation/derivations.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/_types/builder.d.ts +2 -2
- package/lib/typescript/utils/bounds/_types/builder.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/_utils/geometry.d.ts +2 -2
- package/lib/typescript/utils/bounds/_utils/geometry.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/constants.d.ts +2 -2
- package/lib/typescript/utils/bounds/constants.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/index.d.ts +4 -4
- package/lib/typescript/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/utils/gesture/apply-offset-rules.d.ts +2 -2
- package/lib/typescript/utils/gesture/apply-offset-rules.d.ts.map +1 -1
- package/lib/typescript/utils/gesture/check-gesture-activation.d.ts +2 -2
- package/lib/typescript/utils/gesture/check-gesture-activation.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__configs__/presets.ts +590 -590
- package/src/components/controllers/screen-lifecycle.blank.ts +62 -0
- package/src/components/root-transition-aware.tsx +27 -27
- package/src/constants.ts +47 -47
- package/src/hooks/animation/use-screen-animation.tsx +52 -47
- package/src/index.ts +33 -22
- package/src/integrations/blank-stack/components/Header.tsx +141 -0
- package/src/integrations/blank-stack/components/Screens.tsx +96 -0
- package/src/integrations/blank-stack/components/StackView.tsx +100 -0
- package/src/integrations/blank-stack/navigators/createBlankStackNavigator.tsx +111 -0
- package/src/integrations/blank-stack/providers/screen-transition-provider.tsx +8 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.tsx +62 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.tsx +11 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.tsx +280 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_types.ts +36 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.ts +15 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.ts +29 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.ts +17 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.ts +12 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.ts +11 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/index.tsx +93 -0
- package/src/integrations/native-stack/navigators/createNativeStackNavigator.tsx +95 -95
- package/src/integrations/native-stack/providers/screen-transition-provider.tsx +8 -0
- package/src/integrations/native-stack/utils/getModalRoutesKeys.ts +14 -14
- package/src/integrations/native-stack/utils/useInvalidPreventRemoveError.tsx +23 -23
- package/src/integrations/native-stack/views/NativeStackView.native.tsx +609 -609
- package/src/integrations/native-stack/views/NativeStackView.tsx +188 -188
- package/src/integrations/native-stack/views/useHeaderConfigProps.tsx +260 -260
- package/src/providers/create-screen-transition-provider.tsx +46 -0
- package/src/providers/keys.tsx +46 -34
- package/src/providers/transition-styles.tsx +24 -11
- package/src/stores/animations.ts +23 -23
- package/src/stores/bounds/index.ts +82 -82
- package/src/stores/gestures.ts +36 -36
- package/src/stores/utils/reset-stores-for-screen.ts +4 -4
- package/src/types/animation.ts +2 -4
- package/src/types/blank-stack.navigator.ts +266 -0
- package/src/types/bounds.ts +0 -64
- package/src/types/{navigator.ts → native-stack.navigator.ts} +5 -0
- package/src/utils/animation/derivations.ts +3 -20
- package/src/utils/bounds/_types/builder.ts +111 -111
- package/src/utils/bounds/_utils/geometry.ts +2 -2
- package/src/utils/bounds/constants.ts +29 -29
- package/src/utils/bounds/index.ts +35 -105
- package/src/utils/gesture/apply-offset-rules.ts +271 -271
- package/src/utils/gesture/check-gesture-activation.ts +260 -260
- package/lib/commonjs/providers/screen-transition-provider.js +0 -34
- package/lib/commonjs/providers/screen-transition-provider.js.map +0 -1
- package/lib/module/providers/screen-transition-provider.js +0 -30
- package/lib/module/providers/screen-transition-provider.js.map +0 -1
- package/lib/module/types/navigator.js +0 -4
- package/lib/typescript/providers/screen-transition-provider.d.ts +0 -11
- package/lib/typescript/providers/screen-transition-provider.d.ts.map +0 -1
- package/lib/typescript/types/navigator.d.ts.map +0 -1
- package/src/providers/screen-transition-provider.tsx +0 -33
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createBlankStackNavigator = createBlankStackNavigator;
|
|
7
|
+
var _native = require("@react-navigation/native");
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _StackView = require("../components/StackView");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
function BlankStackNavigator({
|
|
13
|
+
id,
|
|
14
|
+
initialRouteName,
|
|
15
|
+
children,
|
|
16
|
+
layout,
|
|
17
|
+
screenListeners,
|
|
18
|
+
screenOptions,
|
|
19
|
+
screenLayout,
|
|
20
|
+
...rest
|
|
21
|
+
}) {
|
|
22
|
+
const {
|
|
23
|
+
state,
|
|
24
|
+
describe,
|
|
25
|
+
descriptors,
|
|
26
|
+
navigation,
|
|
27
|
+
NavigationContent
|
|
28
|
+
} = (0, _native.useNavigationBuilder)(_native.StackRouter, {
|
|
29
|
+
id,
|
|
30
|
+
initialRouteName,
|
|
31
|
+
children,
|
|
32
|
+
layout,
|
|
33
|
+
screenListeners,
|
|
34
|
+
screenOptions,
|
|
35
|
+
screenLayout
|
|
36
|
+
});
|
|
37
|
+
React.useEffect(() =>
|
|
38
|
+
// @ts-expect-error: there may not be a tab navigator in parent
|
|
39
|
+
navigation?.addListener?.("tabPress", e => {
|
|
40
|
+
const isFocused = navigation.isFocused();
|
|
41
|
+
|
|
42
|
+
// Run the operation in the next frame so we're sure all listeners have been run
|
|
43
|
+
// This is necessary to know if preventDefault() has been called
|
|
44
|
+
requestAnimationFrame(() => {
|
|
45
|
+
if (state.index > 0 && isFocused && !e.defaultPrevented) {
|
|
46
|
+
// When user taps on already focused tab and we're inside the tab,
|
|
47
|
+
// reset the stack to replicate native behaviour
|
|
48
|
+
navigation.dispatch({
|
|
49
|
+
..._native.StackActions.popToTop(),
|
|
50
|
+
target: state.key
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}), [navigation, state.index, state.key]);
|
|
55
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(NavigationContent, {
|
|
56
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_StackView.StackView, {
|
|
57
|
+
...rest,
|
|
58
|
+
state: state,
|
|
59
|
+
navigation: navigation,
|
|
60
|
+
descriptors: descriptors,
|
|
61
|
+
describe: describe
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function createBlankStackNavigator(config) {
|
|
66
|
+
return (0, _native.createNavigatorFactory)(BlankStackNavigator)(config);
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=createBlankStackNavigator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_native","require","React","_interopRequireWildcard","_StackView","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BlankStackNavigator","id","initialRouteName","children","layout","screenListeners","screenOptions","screenLayout","rest","state","describe","descriptors","navigation","NavigationContent","useNavigationBuilder","StackRouter","useEffect","addListener","isFocused","requestAnimationFrame","index","defaultPrevented","dispatch","StackActions","popToTop","target","key","jsx","StackView","createBlankStackNavigator","config","createNavigatorFactory"],"sourceRoot":"../../../../../src","sources":["integrations/blank-stack/navigators/createBlankStackNavigator.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAcA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAAoD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAA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AK,EAAEX,KAAK,CAACiB,GAAG,CACrC,CAAC;EAED,oBACE,IAAA9C,WAAA,CAAA+C,GAAA,EAACd,iBAAiB;IAAAV,QAAA,eAChB,IAAAvB,WAAA,CAAA+C,GAAA,EAAChD,UAAA,CAAAiD,SAAS;MAAA,GACJpB,IAAI;MACRC,KAAK,EAAEA,KAAM;MACbG,UAAU,EAAEA,UAAW;MACvBD,WAAW,EAAEA,WAAY;MACzBD,QAAQ,EAAEA;IAAS,CACpB;EAAC,CACe,CAAC;AAExB;AAEO,SAASmB,yBAAyBA,CAmBvCC,MAAe,EAAmC;EAClD,OAAO,IAAAC,8BAAsB,EAAC/B,mBAAmB,CAAC,CAAC8B,MAAM,CAAC;AAC5D","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ScreenTransitionProvider = void 0;
|
|
7
|
+
var _screenLifecycle = require("../../../components/controllers/screen-lifecycle.blank");
|
|
8
|
+
var _createScreenTransitionProvider = require("../../../providers/create-screen-transition-provider");
|
|
9
|
+
const ScreenTransitionProvider = exports.ScreenTransitionProvider = (0, _createScreenTransitionProvider.createScreenTransitionProvider)(_screenLifecycle.ScreenLifecycleController);
|
|
10
|
+
//# sourceMappingURL=screen-transition-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_screenLifecycle","require","_createScreenTransitionProvider","ScreenTransitionProvider","exports","createScreenTransitionProvider","ScreenLifecycleController"],"sourceRoot":"../../../../../src","sources":["integrations/blank-stack/providers/screen-transition-provider.tsx"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,+BAAA,GAAAD,OAAA;AAEO,MAAME,wBAAwB,GAAAC,OAAA,CAAAD,wBAAA,GACpC,IAAAE,8DAA8B,EAC7BC,0CACD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useClosingRouteKeys = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
+
var _useStableCallback = _interopRequireDefault(require("../../../../../hooks/use-stable-callback"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const useClosingRouteKeys = () => {
|
|
12
|
+
const keysRef = (0, _react.useRef)(new Set());
|
|
13
|
+
const shared = (0, _reactNativeReanimated.useSharedValue)([]);
|
|
14
|
+
const add = (0, _useStableCallback.default)(key => {
|
|
15
|
+
const keys = keysRef.current;
|
|
16
|
+
if (keys.has(key)) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
keys.add(key);
|
|
20
|
+
shared.modify(prev => {
|
|
21
|
+
"worklet";
|
|
22
|
+
|
|
23
|
+
if (!prev.includes(key)) {
|
|
24
|
+
prev.push(key);
|
|
25
|
+
}
|
|
26
|
+
return prev;
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
const remove = (0, _useStableCallback.default)(key => {
|
|
30
|
+
const keys = keysRef.current;
|
|
31
|
+
if (!keys.delete(key)) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
shared.modify(prev => {
|
|
35
|
+
"worklet";
|
|
36
|
+
|
|
37
|
+
const index = prev.indexOf(key);
|
|
38
|
+
if (index !== -1) {
|
|
39
|
+
prev.splice(index, 1);
|
|
40
|
+
}
|
|
41
|
+
return prev;
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
const clear = (0, _useStableCallback.default)(() => {
|
|
45
|
+
const keys = keysRef.current;
|
|
46
|
+
if (!keys.size) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
keys.clear();
|
|
50
|
+
shared.modify(prev => {
|
|
51
|
+
"worklet";
|
|
52
|
+
|
|
53
|
+
prev.length = 0;
|
|
54
|
+
return prev;
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
return {
|
|
58
|
+
ref: keysRef,
|
|
59
|
+
shared,
|
|
60
|
+
add,
|
|
61
|
+
remove,
|
|
62
|
+
clear
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
exports.useClosingRouteKeys = useClosingRouteKeys;
|
|
66
|
+
//# sourceMappingURL=use-closing-route-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_useStableCallback","_interopRequireDefault","e","__esModule","default","useClosingRouteKeys","keysRef","useRef","Set","shared","useSharedValue","add","useStableCallback","key","keys","current","has","modify","prev","includes","push","remove","delete","index","indexOf","splice","clear","size","length","ref","exports"],"sourceRoot":"../../../../../../../src","sources":["integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAyE,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElE,MAAMG,mBAAmB,GAAGA,CAAA,KAAM;EACvC,MAAMC,OAAO,GAAG,IAAAC,aAAM,EAAc,IAAIC,GAAG,CAAC,CAAC,CAAC;EAC9C,MAAMC,MAAM,GAAG,IAAAC,qCAAc,EAAW,EAAE,CAAC;EAE3C,MAAMC,GAAG,GAAG,IAAAC,0BAAiB,EAAEC,GAAW,IAAK;IAC7C,MAAMC,IAAI,GAAGR,OAAO,CAACS,OAAO;IAC5B,IAAID,IAAI,CAACE,GAAG,CAACH,GAAG,CAAC,EAAE;MACjB;IACF;IAEAC,IAAI,CAACH,G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igation/_hooks/use-previous.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.usePrevious = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
const usePrevious = value => {
|
|
9
|
+
const ref = (0, _react.useRef)(null);
|
|
10
|
+
(0, _react.useEffect)(() => {
|
|
11
|
+
ref.current = value;
|
|
12
|
+
});
|
|
13
|
+
return ref.current;
|
|
14
|
+
};
|
|
15
|
+
exports.usePrevious = usePrevious;
|
|
16
|
+
//# sourceMappingURL=use-previous.js.map
|
package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","usePrevious","value","ref","useRef","useEffect","current","exports"],"sourceRoot":"../../../../../../../src","sources":["integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,WAAW,GAAQC,KAAQ,IAAe;EACtD,MAAMC,GAAG,GAAG,IAAAC,aAAM,EAAI,IAAI,CAAC;EAE3B,IAAAC,gBAAS,EAAC,MAAM;IACfF,GAAG,CAACG,OAAO,GAAGJ,KAAK;EACpB,CAAC,CAAC;EAEF,OAAOC,GAAG,CAACG,OAAO;AACnB,CAAC;AAACC,OAAA,CAAAN,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useStackNavigationState = void 0;
|
|
7
|
+
var _native = require("@react-navigation/native");
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _useStableCallback = _interopRequireDefault(require("../../../../../hooks/use-stable-callback"));
|
|
10
|
+
var _areDescriptorsEqual = require("../_utils/are-descriptors-equal");
|
|
11
|
+
var _composeDescriptors = require("../_utils/compose-descriptors");
|
|
12
|
+
var _haveSameRouteKeys = require("../_utils/have-same-route-keys");
|
|
13
|
+
var _routesAreIdentical = require("../_utils/routes-are-identical");
|
|
14
|
+
var _useClosingRouteKeys = require("./use-closing-route-keys");
|
|
15
|
+
var _usePrevious = require("./use-previous");
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
/**
|
|
18
|
+
* Aligns current routes with the latest route data while preserving references
|
|
19
|
+
* when possible for performance optimization
|
|
20
|
+
*/
|
|
21
|
+
const alignRoutesWithLatest = (currentRoutes, currentDescriptors, nextRoutes, nextDescriptors) => {
|
|
22
|
+
// Early return for empty current routes
|
|
23
|
+
if (currentRoutes.length === 0) {
|
|
24
|
+
return {
|
|
25
|
+
routes: nextRoutes,
|
|
26
|
+
descriptors: (0, _composeDescriptors.composeDescriptors)(nextRoutes, nextDescriptors, currentDescriptors)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Create lookup map for efficient route finding
|
|
31
|
+
const nextRouteLookup = new Map();
|
|
32
|
+
for (const route of nextRoutes) {
|
|
33
|
+
nextRouteLookup.set(route.key, route);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Track if any changes occurred
|
|
37
|
+
let didChange = currentRoutes.length !== nextRoutes.length;
|
|
38
|
+
|
|
39
|
+
// Align routes, updating references where needed
|
|
40
|
+
const alignedRoutes = currentRoutes.map(route => {
|
|
41
|
+
const nextRoute = nextRouteLookup.get(route.key);
|
|
42
|
+
if (!nextRoute) {
|
|
43
|
+
return route; // Keep current route if not in next
|
|
44
|
+
}
|
|
45
|
+
if (nextRoute !== route) {
|
|
46
|
+
didChange = true;
|
|
47
|
+
return nextRoute; // Update to new route reference
|
|
48
|
+
}
|
|
49
|
+
return route; // Keep current route reference
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// Only create new array if changes occurred
|
|
53
|
+
const routesResult = didChange ? alignedRoutes : currentRoutes;
|
|
54
|
+
return {
|
|
55
|
+
routes: routesResult,
|
|
56
|
+
descriptors: (0, _composeDescriptors.composeDescriptors)(routesResult, nextDescriptors, currentDescriptors)
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Synchronizes routes while handling removed routes that may still be animating out.
|
|
62
|
+
* This manages the complex logic of keeping closing routes visible during transitions.
|
|
63
|
+
*/
|
|
64
|
+
const syncRoutesWithRemoved = ({
|
|
65
|
+
prevRoutes,
|
|
66
|
+
prevDescriptors,
|
|
67
|
+
nextRoutes,
|
|
68
|
+
nextDescriptors,
|
|
69
|
+
closingRouteKeys
|
|
70
|
+
}) => {
|
|
71
|
+
if (nextRoutes.length === 0) {
|
|
72
|
+
closingRouteKeys.clear();
|
|
73
|
+
return {
|
|
74
|
+
routes: nextRoutes,
|
|
75
|
+
descriptors: {}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Start with next routes, will mutate if needed
|
|
80
|
+
let derivedRoutes = nextRoutes;
|
|
81
|
+
let mutated = false;
|
|
82
|
+
|
|
83
|
+
// Helper to ensure we're working with a mutable copy
|
|
84
|
+
const ensureMutable = () => {
|
|
85
|
+
if (!mutated) {
|
|
86
|
+
derivedRoutes = derivedRoutes.slice();
|
|
87
|
+
mutated = true;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
// Get focused (last) routes for comparison
|
|
92
|
+
const previousFocusedRoute = prevRoutes[prevRoutes.length - 1];
|
|
93
|
+
const nextFocusedRoute = nextRoutes[nextRoutes.length - 1];
|
|
94
|
+
|
|
95
|
+
// Handle focus changes between routes
|
|
96
|
+
if (previousFocusedRoute && nextFocusedRoute && previousFocusedRoute.key !== nextFocusedRoute.key) {
|
|
97
|
+
const nextRouteWasPresent = prevRoutes.some(route => route.key === nextFocusedRoute.key);
|
|
98
|
+
const previousRouteStillPresent = nextRoutes.some(route => route.key === previousFocusedRoute.key);
|
|
99
|
+
if (nextRouteWasPresent && !previousRouteStillPresent) {
|
|
100
|
+
// Previous route was removed, mark as closing
|
|
101
|
+
closingRouteKeys.add(previousFocusedRoute.key);
|
|
102
|
+
ensureMutable();
|
|
103
|
+
derivedRoutes.push(previousFocusedRoute);
|
|
104
|
+
} else {
|
|
105
|
+
// Next route is now active, not closing
|
|
106
|
+
closingRouteKeys.remove(nextFocusedRoute.key);
|
|
107
|
+
if (!previousRouteStillPresent) {
|
|
108
|
+
// Previous route needs to be inserted for transition
|
|
109
|
+
closingRouteKeys.remove(previousFocusedRoute.key);
|
|
110
|
+
ensureMutable();
|
|
111
|
+
const insertIndex = Math.max(derivedRoutes.length - 1, 0);
|
|
112
|
+
derivedRoutes.splice(insertIndex, 0, previousFocusedRoute);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
} else if (nextFocusedRoute) {
|
|
116
|
+
// Same focused route, ensure it's not marked as closing
|
|
117
|
+
closingRouteKeys.remove(nextFocusedRoute.key);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Clean up closing keys that are no longer in the route list
|
|
121
|
+
const activeKeys = new Set(derivedRoutes.map(route => route.key));
|
|
122
|
+
for (const key of Array.from(closingRouteKeys.ref.current)) {
|
|
123
|
+
if (!activeKeys.has(key)) {
|
|
124
|
+
closingRouteKeys.remove(key);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
const routesResult = mutated ? derivedRoutes : nextRoutes;
|
|
128
|
+
return {
|
|
129
|
+
routes: routesResult,
|
|
130
|
+
descriptors: (0, _composeDescriptors.composeDescriptors)(routesResult, nextDescriptors, prevDescriptors)
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
const useStackNavigationState = props => {
|
|
134
|
+
const previousRoutes = (0, _usePrevious.usePrevious)(props.state.routes) ?? [];
|
|
135
|
+
const closingRouteKeys = (0, _useClosingRouteKeys.useClosingRouteKeys)();
|
|
136
|
+
const [localState, setLocalState] = (0, _react.useState)(() => ({
|
|
137
|
+
routes: props.state.routes,
|
|
138
|
+
descriptors: props.descriptors
|
|
139
|
+
}));
|
|
140
|
+
(0, _react.useLayoutEffect)(() => {
|
|
141
|
+
const nextRoutesSnapshot = props.state.routes;
|
|
142
|
+
const previousRoutesSnapshot = previousRoutes;
|
|
143
|
+
setLocalState(current => {
|
|
144
|
+
const routeKeysUnchanged = (0, _haveSameRouteKeys.haveSameRouteKeys)(previousRoutesSnapshot, nextRoutesSnapshot);
|
|
145
|
+
let derivedRoutes;
|
|
146
|
+
let derivedDescriptors;
|
|
147
|
+
if (routeKeysUnchanged) {
|
|
148
|
+
const result = alignRoutesWithLatest(current.routes, current.descriptors, nextRoutesSnapshot, props.descriptors);
|
|
149
|
+
derivedRoutes = result.routes;
|
|
150
|
+
derivedDescriptors = result.descriptors;
|
|
151
|
+
} else {
|
|
152
|
+
const fallbackRoutes = previousRoutesSnapshot.length > 0 ? previousRoutesSnapshot : current.routes;
|
|
153
|
+
const result = syncRoutesWithRemoved({
|
|
154
|
+
prevRoutes: fallbackRoutes,
|
|
155
|
+
prevDescriptors: current.descriptors,
|
|
156
|
+
nextRoutes: nextRoutesSnapshot,
|
|
157
|
+
nextDescriptors: props.descriptors,
|
|
158
|
+
closingRouteKeys
|
|
159
|
+
});
|
|
160
|
+
derivedRoutes = result.routes;
|
|
161
|
+
derivedDescriptors = result.descriptors;
|
|
162
|
+
}
|
|
163
|
+
const routesChanged = !(0, _routesAreIdentical.routesAreIdentical)(current.routes, derivedRoutes);
|
|
164
|
+
const descriptorsChanged = !(0, _areDescriptorsEqual.areDescriptorsEqual)(current.descriptors, derivedDescriptors);
|
|
165
|
+
if (!routesChanged && !descriptorsChanged) {
|
|
166
|
+
return current;
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
routes: routesChanged ? derivedRoutes : current.routes,
|
|
170
|
+
descriptors: descriptorsChanged ? derivedDescriptors : current.descriptors
|
|
171
|
+
};
|
|
172
|
+
});
|
|
173
|
+
}, [props.state.routes, props.descriptors, previousRoutes, closingRouteKeys]);
|
|
174
|
+
const handleCloseRoute = (0, _useStableCallback.default)(({
|
|
175
|
+
route
|
|
176
|
+
}) => {
|
|
177
|
+
if (props.state.routes.some(r => r.key === route.key)) {
|
|
178
|
+
props.navigation.dispatch({
|
|
179
|
+
..._native.StackActions.pop(),
|
|
180
|
+
source: route.key,
|
|
181
|
+
target: props.state.key
|
|
182
|
+
});
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
closingRouteKeys.remove(route.key);
|
|
186
|
+
setLocalState(current => {
|
|
187
|
+
if (!current.routes.some(candidate => candidate.key === route.key)) {
|
|
188
|
+
return current;
|
|
189
|
+
}
|
|
190
|
+
const nextRoutes = current.routes.filter(candidate => candidate.key !== route.key);
|
|
191
|
+
const nextDescriptors = {
|
|
192
|
+
...current.descriptors
|
|
193
|
+
};
|
|
194
|
+
delete nextDescriptors[route.key];
|
|
195
|
+
return {
|
|
196
|
+
routes: nextRoutes,
|
|
197
|
+
descriptors: nextDescriptors
|
|
198
|
+
};
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
return {
|
|
202
|
+
state: localState,
|
|
203
|
+
handleCloseRoute,
|
|
204
|
+
closingRouteKeys
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
exports.useStackNavigationState = useStackNavigationState;
|
|
208
|
+
//# sourceMappingURL=use-stack-navigation-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_native","require","_react","_useStableCallback","_interopRequireDefault","_areDescriptorsEqual","_composeDescriptors","_haveSameRouteKeys","_routesAreIdentical","_useClosingRouteKeys","_usePrevious","e","__esModule","default","alignRoutesWithLatest","currentRoutes","currentDescriptors","nextRoutes","nextDescriptors","length","routes","descriptors","composeDescriptors","nextRouteLookup","Map","route","set","key","didChange","alignedRoutes","map","nextRoute","get","routesResult","syncRoutesWithRemoved","prevRoutes","prevDescriptors","closingRouteKeys","clear","derivedRoutes","mutated","ensureMutable","slice","previousFocusedRoute","nextFocusedRoute","nextRouteWasPresent","some","previousRouteStillPresent","add","push","remove","insertIndex","Math","max","splice","activeKeys","Set","Array","from","ref","current","has","useStackNavigationState","props","previousRoutes","usePrevious","state","useClosingRouteKeys","localState","setLocalState","useState","useLayoutEffect","nextRoutesSnapshot","previousRoutesSnapshot","routeKeysUnchanged","haveSameRouteKeys","derivedDescriptors","result","fallbackRoutes","routesChanged","routesAreIdentical","descriptorsChanged","areDescriptorsEqual","handleCloseRoute","useStableCallback","r","navigation","dispatch","StackActions","pop","source","target","candidate","filter","exports"],"sourceRoot":"../../../../../../../src","sources":["integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAGA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AACA,IAAAQ,oBAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AAA6C,SAAAG,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAU7C;AACA;AACA;AACA;AACA,MAAMG,qBAAqB,GAAGA,CAC5BC,aAA8B,EAC9BC,kBAA2C,EAC3CC,UAA2B,EAC3BC,eAAwC,KACrC;EACH;EACA,IAAIH,aAAa,CAACI,MAAM,KAAK,CAAC,EAAE;IAC9B,OAAO;MACLC,MAAM,EAAEH,UAAU;MAClBI,WAAW,EAAE,IAAAC,sCAAkB,EAC7BL,UAAU,EACVC,eAAe,EACfF,kBAC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IACjBe,gBAAgB;IAChB9C;EACF,CAAC;AACH,CAAC;AAACyD,OAAA,CAAAhC,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["integrations/blank-stack/utils/with-stack-navigation/_types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.areDescriptorsEqual = void 0;
|
|
7
|
+
const areDescriptorsEqual = (a, b) => {
|
|
8
|
+
if (a === b) return true;
|
|
9
|
+
const aKeys = Object.keys(a);
|
|
10
|
+
const bKeys = Object.keys(b);
|
|
11
|
+
if (aKeys.length !== bKeys.length) return false;
|
|
12
|
+
return aKeys.every(key => a[key] === b[key]);
|
|
13
|
+
};
|
|
14
|
+
exports.areDescriptorsEqual = areDescriptorsEqual;
|
|
15
|
+
//# sourceMappingURL=are-descriptors-equal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["areDescriptorsEqual","a","b","aKeys","Object","keys","bKeys","length","every","key","exports"],"sourceRoot":"../../../../../../../src","sources":["integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.ts"],"mappings":";;;;;;AAEO,MAAMA,mBAAmB,GAAGA,CACjCC,CAA0B,EAC1BC,CAA0B,KACd;EACZ,IAAID,CAAC,KAAKC,CAAC,EAAE,OAAO,IAAI;EAExB,MAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACJ,CAAC,CAAC;EAC5B,MAAMK,KAAK,GAAGF,MAAM,CAACC,IAAI,CAACH,CAAC,CAAC;EAE5B,IAAIC,KAAK,CAACI,MAAM,KAAKD,KAAK,CAACC,MAAM,EAAE,OAAO,KAAK;EAE/C,OAAOJ,KAAK,CAACK,KAAK,CAAEC,GAAG,IAAKR,CAAC,CAACQ,GAAG,CAAC,KAAKP,CAAC,CAACO,GAAG,CAAC,CAAC;AAChD,CAAC;AAACC,OAAA,CAAAV,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.calculateActiveScreensLimit = calculateActiveScreensLimit;
|
|
7
|
+
function calculateActiveScreensLimit(routes, descriptors) {
|
|
8
|
+
if (routes.length === 0) {
|
|
9
|
+
return 1;
|
|
10
|
+
}
|
|
11
|
+
let limit = 1;
|
|
12
|
+
for (let i = routes.length - 1; i >= 0; i--) {
|
|
13
|
+
const route = routes[i];
|
|
14
|
+
const shouldKeepPrevious = descriptors?.[route.key]?.options?.detachPreviousScreen !== true;
|
|
15
|
+
if (shouldKeepPrevious) {
|
|
16
|
+
limit++;
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
return Math.min(limit, routes.length);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=calculate-active-screens-limit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["calculateActiveScreensLimit","routes","descriptors","length","limit","i","route","shouldKeepPrevious","key","options","detachPreviousScreen","Math","min"],"sourceRoot":"../../../../../../../src","sources":["integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.ts"],"mappings":";;;;;;AAGO,SAASA,2BAA2BA,CACzCC,MAAgD,EAChDC,WAAoC,EAC5B;EACR,IAAID,MAAM,CAACE,MAAM,KAAK,CAAC,EAAE;IACvB,OAAO,CAAC;EACV;EAEA,IAAIC,KAAK,GAAG,CAAC;EAEb,KAAK,IAAIC,CAAC,GAAGJ,MAAM,CAACE,MAAM,GAAG,CAAC,EAAEE,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;IAC3C,MAAMC,KAAK,GAAGL,MAAM,CAACI,CAAC,CAAC;IAEvB,MAAME,kBAAkB,GACtBL,WAAW,GAAGI,KAAK,CAACE,GAAG,CAAC,EAAEC,OAAO,EAAEC,oBAAoB,KAAK,IAAI;IAElE,IAAIH,kBAAkB,EAAE;MACtBH,KAAK,EAAE;MACP;IACF;IAEA;EACF;EAEA,OAAOO,IAAI,CAACC,GAAG,CAACR,KAAK,EAAEH,MAAM,CAACE,MAAM,CAAC;AACvC","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.composeDescriptors = void 0;
|
|
7
|
+
const composeDescriptors = (routes, nextDescriptors, currentDescriptors) => {
|
|
8
|
+
const composed = {};
|
|
9
|
+
for (const route of routes) {
|
|
10
|
+
composed[route.key] = nextDescriptors[route.key] ?? currentDescriptors[route.key];
|
|
11
|
+
}
|
|
12
|
+
return composed;
|
|
13
|
+
};
|
|
14
|
+
exports.composeDescriptors = composeDescriptors;
|
|
15
|
+
//# sourceMappingURL=compose-descriptors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["composeDescriptors","routes","nextDescriptors","currentDescriptors","composed","route","key","exports"],"sourceRoot":"../../../../../../../src","sources":["integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.ts"],"mappings":";;;;;;AAGO,MAAMA,kBAAkB,GAAGA,CAChCC,MAAuB,EACvBC,eAAwC,EACxCC,kBAA2C,KACf;EAC5B,MAAMC,QAAiC,GAAG,CAAC,CAAC;EAE5C,KAAK,MAAMC,KAAK,IAAIJ,MAAM,EAAE;IAC1BG,QAAQ,CAACC,KAAK,CAACC,GAAG,CAAC,GACjBJ,eAAe,CAACG,KAAK,CAACC,GAAG,CAAC,IAAIH,kBAAkB,CAACE,KAAK,CAACC,GAAG,CAAC;EAC/D;EAEA,OAAOF,QAAQ;AACjB,CAAC;AAACG,OAAA,CAAAP,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.haveSameRouteKeys = void 0;
|
|
7
|
+
const haveSameRouteKeys = (previous, next) => {
|
|
8
|
+
if (previous.length !== next.length) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
return previous.every((route, index) => route?.key === next[index]?.key);
|
|
12
|
+
};
|
|
13
|
+
exports.haveSameRouteKeys = haveSameRouteKeys;
|
|
14
|
+
//# sourceMappingURL=have-same-route-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["haveSameRouteKeys","previous","next","length","every","route","index","key","exports"],"sourceRoot":"../../../../../../../src","sources":["integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.ts"],"mappings":";;;;;;AAEO,MAAMA,iBAAiB,GAAGA,CAChCC,QAAyB,EACzBC,IAAqB,KACR;EACb,IAAID,QAAQ,CAACE,MAAM,KAAKD,IAAI,CAACC,MAAM,EAAE;IACpC,OAAO,KAAK;EACb;EAEA,OAAOF,QAAQ,CAACG,KAAK,CAAC,CAACC,KAAK,EAAEC,KAAK,KAAKD,KAAK,EAAEE,GAAG,KAAKL,IAAI,CAACI,KAAK,CAAC,EAAEC,GAAG,CAAC;AACzE,CAAC;AAACC,OAAA,CAAAR,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.routesAreIdentical = void 0;
|
|
7
|
+
const routesAreIdentical = (a, b) => {
|
|
8
|
+
if (a === b) return true;
|
|
9
|
+
if (a.length !== b.length) return false;
|
|
10
|
+
return a.every((route, index) => route === b[index]);
|
|
11
|
+
};
|
|
12
|
+
exports.routesAreIdentical = routesAreIdentical;
|
|
13
|
+
//# sourceMappingURL=routes-are-identical.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["routesAreIdentical","a","b","length","every","route","index","exports"],"sourceRoot":"../../../../../../../src","sources":["integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.ts"],"mappings":";;;;;;AAEO,MAAMA,kBAAkB,GAAGA,CACjCC,CAAkB,EAClBC,CAAkB,KACL;EACb,IAAID,CAAC,KAAKC,CAAC,EAAE,OAAO,IAAI;EACxB,IAAID,CAAC,CAACE,MAAM,KAAKD,CAAC,CAACC,MAAM,EAAE,OAAO,KAAK;EAEvC,OAAOF,CAAC,CAACG,KAAK,CAAC,CAACC,KAAK,EAAEC,KAAK,KAAKD,KAAK,KAAKH,CAAC,CAACI,KAAK,CAAC,CAAC;AACrD,CAAC;AAACC,OAAA,CAAAP,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useStackNavigationContext = exports.StackNavigationContext = void 0;
|
|
7
|
+
exports.withStackNavigationProvider = withStackNavigationProvider;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _Header = require("../../components/Header");
|
|
10
|
+
var _useStackNavigationState = require("./_hooks/use-stack-navigation-state");
|
|
11
|
+
var _calculateActiveScreensLimit = require("./_utils/calculate-active-screens-limit");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
const StackNavigationContext = exports.StackNavigationContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
14
|
+
function withStackNavigationProvider(Component) {
|
|
15
|
+
return function StackNavigationWrapper(props) {
|
|
16
|
+
const {
|
|
17
|
+
state,
|
|
18
|
+
handleCloseRoute,
|
|
19
|
+
closingRouteKeys
|
|
20
|
+
} = (0, _useStackNavigationState.useStackNavigationState)(props);
|
|
21
|
+
const scenes = (0, _react.useMemo)(() => {
|
|
22
|
+
return state.routes.reduce((acc, route) => {
|
|
23
|
+
acc.push({
|
|
24
|
+
route,
|
|
25
|
+
descriptor: state.descriptors[route.key]
|
|
26
|
+
});
|
|
27
|
+
return acc;
|
|
28
|
+
}, []);
|
|
29
|
+
}, [state.routes, state.descriptors]);
|
|
30
|
+
const activeScreensLimit = (0, _react.useMemo)(() => {
|
|
31
|
+
return (0, _calculateActiveScreensLimit.calculateActiveScreensLimit)(state.routes, state.descriptors);
|
|
32
|
+
}, [state.routes, state.descriptors]);
|
|
33
|
+
const FloatHeader = /*#__PURE__*/(0, _react.memo)(() => {
|
|
34
|
+
const shouldShowFloatHeader = props.state.routes.some(route => {
|
|
35
|
+
const options = props.descriptors[route.key]?.options;
|
|
36
|
+
return options?.headerMode === "float" && options?.headerShown;
|
|
37
|
+
});
|
|
38
|
+
if (!shouldShowFloatHeader) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.Header.Float, {});
|
|
42
|
+
});
|
|
43
|
+
const contextValue = (0, _react.useMemo)(() => {
|
|
44
|
+
return {
|
|
45
|
+
routes: state.routes,
|
|
46
|
+
focusedIndex: props.state.index,
|
|
47
|
+
descriptors: state.descriptors,
|
|
48
|
+
closingRouteKeysShared: closingRouteKeys.shared,
|
|
49
|
+
activeScreensLimit,
|
|
50
|
+
handleCloseRoute,
|
|
51
|
+
scenes,
|
|
52
|
+
FloatHeader
|
|
53
|
+
};
|
|
54
|
+
}, [state, scenes, activeScreensLimit, closingRouteKeys, handleCloseRoute, props.state.index, FloatHeader]);
|
|
55
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StackNavigationContext.Provider, {
|
|
56
|
+
value: contextValue,
|
|
57
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
58
|
+
...contextValue
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const useStackNavigationContext = () => {
|
|
64
|
+
const context = (0, _react.useContext)(StackNavigationContext);
|
|
65
|
+
if (!context) {
|
|
66
|
+
throw new Error("StackNavigationContext.Provider is missing in the component tree.");
|
|
67
|
+
}
|
|
68
|
+
return context;
|
|
69
|
+
};
|
|
70
|
+
exports.useStackNavigationContext = useStackNavigationContext;
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_Header","_useStackNavigationState","_calculateActiveScreensLimit","_jsxRuntime","StackNavigationContext","exports","createContext","withStackNavigationProvider","Component","StackNavigationWrapper","props","state","handleCloseRoute","closingRouteKeys","useStackNavigationState","scenes","useMemo","routes","reduce","acc","route","push","descriptor","descriptors","key","activeScreensLimit","calculateActiveScreensLimit","FloatHeader","memo","shouldShowFloatHeader","some","options","headerMode","headerShown","jsx","Header","Float","contextValue","focusedIndex","index","closingRouteKeysShared","shared","Provider","value","children","useStackNavigationContext","context","useContext","Error"],"sourceRoot":"../../../../../../src","sources":["integrations/blank-stack/utils/with-stack-navigation/index.tsx"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,wBAAA,GAAAF,OAAA;AAKA,IAAAG,4BAAA,GAAAH,OAAA;AAAsF,IAAAI,WAAA,GAAAJ,OAAA;AAE/E,MAAMK,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,gBACjC,IAAAE,oBAAa,EAAqC,IAAI,CAAC;AAElD,SAASC,2BAA2BA,CACzCC,SAAqD,EACrD;EACA,OAAO,SAASC,sBAAsBA,CAACC,KAAkC,EAAE;IACzE,MAAM;MAAEC,KAAK;MAAEC,gBA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AAM,EAAEN,KAAK,CAACM,MAAM;QACpBqB,YAAY,EAAE5B,KAAK,CAACC,KAAK,CAAC4B,KAAK;QAC/BhB,WAAW,EAAEZ,KAAK,CAACY,WAAW;QAC9BiB,sBAAsB,EAAE3B,gBAAgB,CAAC4B,MAAM;QAC/ChB,kBAAkB;QAClBb,gBAAgB;QAChBG,MAAM;QACNY;MACF,CAAC;IACH,CAAC,EAAE,CACDhB,KAAK,EACLI,MAAM,EACNU,kBAAkB,EAClBZ,gBAAgB,EAChBD,gBAAgB,EAChBF,KAAK,CAACC,KAAK,CAAC4B,KAAK,EACjBZ,WAAW,CACZ,CAAC;IAEF,oBACE,IAAAxB,WAAA,CAAA+B,GAAA,EAAC9B,sBAAsB,CAACsC,QAAQ;MAACC,KAAK,EAAEN,YAAa;MAAAO,QAAA,eACnD,IAAAzC,WAAA,CAAA+B,GAAA,EAAC1B,SAAS;QAAA,GAAK6B;MAAY,CAAG;IAAC,CACA,CAAC;EAEtC,CAAC;AACH;AAEO,MAAMQ,yBAAyB,GAAGA,CAAA,KAAM;EAC7C,MAAMC,OAAO,GAAG,IAAAC,iBAAU,EAAC3C,sBAAsB,CAAC;EAElD,IAAI,CAAC0C,OAAO,EAAE;IACZ,MAAM,IAAIE,KAAK,CACb,mEACF,CAAC;EACH;EAEA,OAAOF,OAAO;AAChB,CAAC;AAACzC,OAAA,CAAAwC,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_native","require","React","_interopRequireWildcard","_NativeStackView","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","NativeStackNavigator","id","initialRouteName","children","layout","screenListeners","screenOptions","screenLayout","rest","state","describe","descriptors","navigation","NavigationContent","useNavigationBuilder","StackRouter","useEffect","addListener","isFocused","requestAnimationFrame","index","defaultPrevented","dispatch","StackActions","popToTop","target","key","jsx","NativeStackView","createNativeStackNavigator","config","createNavigatorFactory"],"sourceRoot":"../../../../../src","sources":["integrations/native-stack/navigators/createNativeStackNavigator.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAcA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AAQA,IAAAG,gBAAA,GAAAH,OAAA;AAA2D,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAE3D,SAASkB,oBAAoBA,CAAC;
|
|
1
|
+
{"version":3,"names":["_native","require","React","_interopRequireWildcard","_NativeStackView","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","NativeStackNavigator","id","initialRouteName","children","layout","screenListeners","screenOptions","screenLayout","rest","state","describe","descriptors","navigation","NavigationContent","useNavigationBuilder","StackRouter","useEffect","addListener","isFocused","requestAnimationFrame","index","defaultPrevented","dispatch","StackActions","popToTop","target","key","jsx","NativeStackView","createNativeStackNavigator","config","createNavigatorFactory"],"sourceRoot":"../../../../../src","sources":["integrations/native-stack/navigators/createNativeStackNavigator.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAcA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AAQA,IAAAG,gBAAA,GAAAH,OAAA;AAA2D,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,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