react-native-screen-transitions 2.4.2-beta.0 → 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/components/controllers/screen-lifecycle.blank.js +59 -0
- package/lib/commonjs/components/controllers/screen-lifecycle.blank.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/components/Header.js +9 -16
- package/lib/commonjs/integrations/blank-stack/components/Header.js.map +1 -1
- package/lib/commonjs/integrations/blank-stack/components/StackView.js +6 -15
- package/lib/commonjs/integrations/blank-stack/components/StackView.js.map +1 -1
- package/lib/commonjs/integrations/blank-stack/navigators/createBlankStackNavigator.js +0 -6
- package/lib/commonjs/integrations/blank-stack/navigators/createBlankStackNavigator.js.map +1 -1
- 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/_utils/{calculateActiveScreensLimit.js → calculate-active-screens-limit.js} +1 -1
- 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/index.js +1 -1
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/index.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/views/NativeStackView.native.js +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/module/components/controllers/screen-lifecycle.blank.js +53 -0
- package/lib/module/components/controllers/screen-lifecycle.blank.js.map +1 -0
- package/lib/module/integrations/blank-stack/components/Header.js +9 -16
- package/lib/module/integrations/blank-stack/components/Header.js.map +1 -1
- package/lib/module/integrations/blank-stack/components/StackView.js +6 -15
- package/lib/module/integrations/blank-stack/components/StackView.js.map +1 -1
- package/lib/module/integrations/blank-stack/navigators/createBlankStackNavigator.js +1 -6
- package/lib/module/integrations/blank-stack/navigators/createBlankStackNavigator.js.map +1 -1
- 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/_utils/{calculateActiveScreensLimit.js → calculate-active-screens-limit.js} +1 -1
- 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/index.js +1 -1
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/index.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/views/NativeStackView.native.js +1 -1
- package/lib/module/integrations/native-stack/views/NativeStackView.native.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/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/integrations/blank-stack/components/Header.d.ts.map +1 -1
- package/lib/typescript/integrations/blank-stack/components/StackView.d.ts.map +1 -1
- package/lib/typescript/integrations/blank-stack/navigators/createBlankStackNavigator.d.ts +0 -93
- package/lib/typescript/integrations/blank-stack/navigators/createBlankStackNavigator.d.ts.map +1 -1
- 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/_utils/{calculateActiveScreensLimit.d.ts → calculate-active-screens-limit.d.ts} +1 -1
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/calculate-active-screens-limit.d.ts.map +1 -0
- 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/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 +14 -12
- package/lib/typescript/providers/keys.d.ts.map +1 -1
- package/lib/typescript/types/blank-stack.navigator.d.ts +0 -5
- package/lib/typescript/types/blank-stack.navigator.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/controllers/screen-lifecycle.blank.ts +62 -0
- package/src/integrations/blank-stack/components/Header.tsx +2 -4
- package/src/integrations/blank-stack/components/StackView.tsx +3 -9
- package/src/integrations/blank-stack/navigators/createBlankStackNavigator.tsx +0 -11
- package/src/integrations/blank-stack/providers/screen-transition-provider.tsx +8 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/index.tsx +1 -1
- package/src/integrations/native-stack/providers/screen-transition-provider.tsx +8 -0
- package/src/integrations/native-stack/views/NativeStackView.native.tsx +1 -1
- package/src/providers/create-screen-transition-provider.tsx +46 -0
- package/src/providers/keys.tsx +28 -16
- package/src/types/blank-stack.navigator.ts +0 -5
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/calculateActiveScreensLimit.js.map +0 -1
- package/lib/commonjs/providers/screen-transition-provider.js +0 -34
- package/lib/commonjs/providers/screen-transition-provider.js.map +0 -1
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/calculateActiveScreensLimit.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/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/calculateActiveScreensLimit.d.ts.map +0 -1
- package/lib/typescript/providers/screen-transition-provider.d.ts +0 -11
- package/lib/typescript/providers/screen-transition-provider.d.ts.map +0 -1
- package/src/providers/screen-transition-provider.tsx +0 -33
- /package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/{calculateActiveScreensLimit.ts → calculate-active-screens-limit.ts} +0 -0
|
@@ -8,6 +8,7 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
|
8
8
|
import { useScreenAnimation } from "../../../hooks/animation/use-screen-animation";
|
|
9
9
|
import { KeysProvider, useKeys } from "../../../providers/keys";
|
|
10
10
|
import type {
|
|
11
|
+
BlankStackDescriptor,
|
|
11
12
|
BlankStackHeaderProps,
|
|
12
13
|
BlankStackScene,
|
|
13
14
|
} from "../../../types/blank-stack.navigator";
|
|
@@ -89,7 +90,6 @@ const FloatHeader = () => {
|
|
|
89
90
|
const next = scenes[headerIndex + 1]?.descriptor;
|
|
90
91
|
|
|
91
92
|
return (
|
|
92
|
-
//@ts-expect-error
|
|
93
93
|
<KeysProvider current={current} previous={previous} next={next}>
|
|
94
94
|
<HeaderHost scene={scene} focusedIndex={focusedIndex} isFloating />
|
|
95
95
|
</KeysProvider>
|
|
@@ -98,17 +98,15 @@ const FloatHeader = () => {
|
|
|
98
98
|
|
|
99
99
|
const ScreenHeader = () => {
|
|
100
100
|
const { focusedIndex } = useStackNavigationContext();
|
|
101
|
-
const { current } = useKeys();
|
|
101
|
+
const { current } = useKeys<BlankStackDescriptor>();
|
|
102
102
|
|
|
103
103
|
const options = current.options;
|
|
104
104
|
|
|
105
|
-
// @ts-expect-error
|
|
106
105
|
if (!options.headerShown || options.headerMode !== "screen") {
|
|
107
106
|
return null;
|
|
108
107
|
}
|
|
109
108
|
|
|
110
109
|
const scene: BlankStackScene = {
|
|
111
|
-
//@ts-expect-error
|
|
112
110
|
descriptor: current,
|
|
113
111
|
route: current.route,
|
|
114
112
|
};
|
|
@@ -5,12 +5,11 @@ import {
|
|
|
5
5
|
} from "@react-navigation/native";
|
|
6
6
|
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
7
7
|
import { ScreenContainer } from "react-native-screens";
|
|
8
|
-
import { RootTransitionAware } from "../../../components/root-transition-aware";
|
|
9
|
-
import { ScreenTransitionProvider } from "../../../providers/screen-transition-provider";
|
|
10
8
|
import type { BlankStackDescriptor } from "../../../types/blank-stack.navigator";
|
|
11
9
|
import { withStackNavigationProvider } from "../utils/with-stack-navigation";
|
|
12
10
|
import { Header } from "./Header";
|
|
13
11
|
import { Screen } from "./Screens";
|
|
12
|
+
import { ScreenTransitionProvider } from "../providers/screen-transition-provider";
|
|
14
13
|
|
|
15
14
|
function isFabric() {
|
|
16
15
|
return "nativeFabricUIManager" in global;
|
|
@@ -28,10 +27,8 @@ const SceneView = ({ descriptor }: SceneViewProps) => {
|
|
|
28
27
|
return (
|
|
29
28
|
<NavigationContext.Provider value={navigation}>
|
|
30
29
|
<NavigationRouteContext.Provider value={route}>
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
{render()}
|
|
34
|
-
</RootTransitionAware>
|
|
30
|
+
{descriptor.options.headerMode === "screen" && <Header.Screen />}
|
|
31
|
+
{render()}
|
|
35
32
|
</NavigationRouteContext.Provider>
|
|
36
33
|
</NavigationContext.Provider>
|
|
37
34
|
);
|
|
@@ -81,11 +78,8 @@ export const StackView = withStackNavigationProvider(
|
|
|
81
78
|
freezeOnBlur={descriptor.options.freezeOnBlur}
|
|
82
79
|
>
|
|
83
80
|
<ScreenTransitionProvider
|
|
84
|
-
// @ts-expect-error
|
|
85
81
|
previous={previousDescriptor}
|
|
86
|
-
// @ts-expect-error
|
|
87
82
|
current={descriptor}
|
|
88
|
-
// @ts-expect-error
|
|
89
83
|
next={nextDescriptor}
|
|
90
84
|
>
|
|
91
85
|
<SceneView
|
|
@@ -109,14 +109,3 @@ export function createBlankStackNavigator<
|
|
|
109
109
|
>(config?: Config): TypedNavigator<TypeBag, Config> {
|
|
110
110
|
return createNavigatorFactory(BlankStackNavigator)(config);
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
import { withLayoutContext } from "expo-router";
|
|
114
|
-
|
|
115
|
-
const { Navigator } = createBlankStackNavigator();
|
|
116
|
-
|
|
117
|
-
export const BlankStack = withLayoutContext<
|
|
118
|
-
BlankStackNavigationOptions,
|
|
119
|
-
typeof Navigator,
|
|
120
|
-
StackNavigationState<ParamListBase>,
|
|
121
|
-
BlankStackNavigationEventMap
|
|
122
|
-
>(Navigator);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BlankStackDescriptor } from "../../../types/blank-stack.navigator";
|
|
2
|
+
import { ScreenLifecycleController } from "../../../components/controllers/screen-lifecycle.blank";
|
|
3
|
+
import { createScreenTransitionProvider } from "../../../providers/create-screen-transition-provider";
|
|
4
|
+
|
|
5
|
+
export const ScreenTransitionProvider =
|
|
6
|
+
createScreenTransitionProvider<BlankStackDescriptor>(
|
|
7
|
+
ScreenLifecycleController,
|
|
8
|
+
);
|
|
@@ -12,7 +12,7 @@ import type {
|
|
|
12
12
|
StackNavigationContextProps,
|
|
13
13
|
StackNavigationContextValue,
|
|
14
14
|
} from "./_types";
|
|
15
|
-
import { calculateActiveScreensLimit } from "./_utils/
|
|
15
|
+
import { calculateActiveScreensLimit } from "./_utils/calculate-active-screens-limit";
|
|
16
16
|
|
|
17
17
|
export const StackNavigationContext =
|
|
18
18
|
createContext<StackNavigationContextValue | null>(null);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { NativeStackDescriptor } from "../../../types/native-stack.navigator";
|
|
2
|
+
import { ScreenLifecycleController } from "../../../components/controllers/screen-lifecycle";
|
|
3
|
+
import { createScreenTransitionProvider } from "../../../providers/create-screen-transition-provider";
|
|
4
|
+
|
|
5
|
+
export const ScreenTransitionProvider =
|
|
6
|
+
createScreenTransitionProvider<NativeStackDescriptor>(
|
|
7
|
+
ScreenLifecycleController
|
|
8
|
+
);
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
ScreenStack,
|
|
33
33
|
ScreenStackItem,
|
|
34
34
|
} from "react-native-screens";
|
|
35
|
-
import { ScreenTransitionProvider } from "
|
|
35
|
+
import { ScreenTransitionProvider } from "../providers/screen-transition-provider";
|
|
36
36
|
import type {
|
|
37
37
|
NativeStackDescriptor,
|
|
38
38
|
NativeStackDescriptorMap,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { Descriptor } from "@react-navigation/native";
|
|
3
|
+
import { RootTransitionAware } from "../components/root-transition-aware";
|
|
4
|
+
import { ScreenGestureProvider } from "./gestures";
|
|
5
|
+
import { KeysProvider } from "./keys";
|
|
6
|
+
import { TransitionStylesProvider } from "./transition-styles";
|
|
7
|
+
|
|
8
|
+
type AnyDescriptor = Descriptor<any, any, any>;
|
|
9
|
+
|
|
10
|
+
type ScreenLifecycleComponent = React.ComponentType<{
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}>;
|
|
13
|
+
|
|
14
|
+
type ScreenTransitionProviderProps<DescriptorType extends AnyDescriptor> = {
|
|
15
|
+
previous?: DescriptorType;
|
|
16
|
+
current: DescriptorType;
|
|
17
|
+
next?: DescriptorType;
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export function createScreenTransitionProvider<
|
|
22
|
+
DescriptorType extends AnyDescriptor,
|
|
23
|
+
>(ScreenLifecycleComponent: ScreenLifecycleComponent) {
|
|
24
|
+
return function ScreenTransitionProvider({
|
|
25
|
+
previous,
|
|
26
|
+
current,
|
|
27
|
+
next,
|
|
28
|
+
children,
|
|
29
|
+
}: ScreenTransitionProviderProps<DescriptorType>) {
|
|
30
|
+
return (
|
|
31
|
+
<KeysProvider<DescriptorType>
|
|
32
|
+
previous={previous}
|
|
33
|
+
current={current}
|
|
34
|
+
next={next}
|
|
35
|
+
>
|
|
36
|
+
<ScreenGestureProvider>
|
|
37
|
+
<ScreenLifecycleComponent>
|
|
38
|
+
<TransitionStylesProvider>
|
|
39
|
+
<RootTransitionAware>{children}</RootTransitionAware>
|
|
40
|
+
</TransitionStylesProvider>
|
|
41
|
+
</ScreenLifecycleComponent>
|
|
42
|
+
</ScreenGestureProvider>
|
|
43
|
+
</KeysProvider>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
}
|
package/src/providers/keys.tsx
CHANGED
|
@@ -1,38 +1,50 @@
|
|
|
1
1
|
import { createContext, useContext, useMemo } from "react";
|
|
2
|
+
import type { Descriptor } from "@react-navigation/native";
|
|
2
3
|
import type { NativeStackDescriptor } from "../types/native-stack.navigator";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
previous?: NativeStackDescriptor;
|
|
6
|
-
current: NativeStackDescriptor;
|
|
7
|
-
next?: NativeStackDescriptor;
|
|
8
|
-
}
|
|
5
|
+
type AnyDescriptor = Descriptor<any, any, any>;
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
type KeysContextValue = {
|
|
8
|
+
previous?: AnyDescriptor;
|
|
9
|
+
current: AnyDescriptor;
|
|
10
|
+
next?: AnyDescriptor;
|
|
11
|
+
};
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
type KeysProviderProps<DescriptorType extends AnyDescriptor> = {
|
|
13
14
|
children: React.ReactNode;
|
|
14
|
-
previous?:
|
|
15
|
-
current:
|
|
16
|
-
next?:
|
|
17
|
-
}
|
|
15
|
+
previous?: DescriptorType;
|
|
16
|
+
current: DescriptorType;
|
|
17
|
+
next?: DescriptorType;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
type KeysContextType<DescriptorType extends AnyDescriptor> = {
|
|
21
|
+
previous?: DescriptorType;
|
|
22
|
+
current: DescriptorType;
|
|
23
|
+
next?: DescriptorType;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const KeysContext = createContext<KeysContextValue | undefined>(undefined);
|
|
18
27
|
|
|
19
|
-
export const KeysProvider = ({
|
|
28
|
+
export const KeysProvider = <DescriptorType extends AnyDescriptor>({
|
|
20
29
|
children,
|
|
21
30
|
previous,
|
|
22
31
|
current,
|
|
23
32
|
next,
|
|
24
|
-
}: KeysProviderProps) => {
|
|
33
|
+
}: KeysProviderProps<DescriptorType>) => {
|
|
25
34
|
const value = useMemo(
|
|
26
35
|
() => ({ previous, current, next }),
|
|
27
36
|
[previous, current, next]
|
|
28
|
-
);
|
|
37
|
+
) as KeysContextValue;
|
|
38
|
+
|
|
29
39
|
return <KeysContext.Provider value={value}>{children}</KeysContext.Provider>;
|
|
30
40
|
};
|
|
31
41
|
|
|
32
|
-
export const useKeys =
|
|
42
|
+
export const useKeys = <
|
|
43
|
+
DescriptorType extends AnyDescriptor = NativeStackDescriptor
|
|
44
|
+
>(): KeysContextType<DescriptorType> => {
|
|
33
45
|
const context = useContext(KeysContext);
|
|
34
46
|
if (context === undefined) {
|
|
35
47
|
throw new Error("useKeys must be used within a KeysProvider");
|
|
36
48
|
}
|
|
37
|
-
return context
|
|
49
|
+
return context as KeysContextType<DescriptorType>;
|
|
38
50
|
};
|
|
@@ -11,7 +11,6 @@ import type {
|
|
|
11
11
|
StackRouterOptions,
|
|
12
12
|
Theme,
|
|
13
13
|
} from "@react-navigation/native";
|
|
14
|
-
import type { StyleProp, ViewStyle } from "react-native";
|
|
15
14
|
import type { DerivedValue } from "react-native-reanimated";
|
|
16
15
|
import type { EdgeInsets } from "react-native-safe-area-context";
|
|
17
16
|
import type { ScreenProps } from "react-native-screens";
|
|
@@ -233,10 +232,6 @@ export type BlankStackNavigationOptions = BlankStackScreenTransitionConfig & {
|
|
|
233
232
|
* @platform android, ios
|
|
234
233
|
*/
|
|
235
234
|
statusBarStyle?: ScreenProps["statusBarStyle"];
|
|
236
|
-
/**
|
|
237
|
-
* Style object for the scene content.
|
|
238
|
-
*/
|
|
239
|
-
contentStyle?: StyleProp<ViewStyle>;
|
|
240
235
|
/**
|
|
241
236
|
* Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
|
|
242
237
|
* Defaults to `true` when `enableFreeze()` is run at the top of the application.
|
|
@@ -1 +0,0 @@
|
|
|
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/calculateActiveScreensLimit.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":[]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ScreenTransitionProvider = ScreenTransitionProvider;
|
|
7
|
-
var _screenLifecycle = require("../components/controllers/screen-lifecycle");
|
|
8
|
-
var _rootTransitionAware = require("../components/root-transition-aware");
|
|
9
|
-
var _gestures = require("../providers/gestures");
|
|
10
|
-
var _keys = require("../providers/keys");
|
|
11
|
-
var _transitionStyles = require("../providers/transition-styles");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function ScreenTransitionProvider({
|
|
14
|
-
previous,
|
|
15
|
-
current,
|
|
16
|
-
next,
|
|
17
|
-
children
|
|
18
|
-
}) {
|
|
19
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_keys.KeysProvider, {
|
|
20
|
-
previous: previous,
|
|
21
|
-
current: current,
|
|
22
|
-
next: next,
|
|
23
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_gestures.ScreenGestureProvider, {
|
|
24
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_screenLifecycle.ScreenLifecycleController, {
|
|
25
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_transitionStyles.TransitionStylesProvider, {
|
|
26
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_rootTransitionAware.RootTransitionAware, {
|
|
27
|
-
children: children
|
|
28
|
-
})
|
|
29
|
-
})
|
|
30
|
-
})
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=screen-transition-provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_screenLifecycle","require","_rootTransitionAware","_gestures","_keys","_transitionStyles","_jsxRuntime","ScreenTransitionProvider","previous","current","next","children","jsx","KeysProvider","ScreenGestureProvider","ScreenLifecycleController","TransitionStylesProvider","RootTransitionAware"],"sourceRoot":"../../../src","sources":["providers/screen-transition-provider.tsx"],"mappings":";;;;;;AACA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAA0E,IAAAK,WAAA,GAAAL,OAAA;AAUnE,SAASM,wBAAwBA,CAAC;EACvCC,QAAQ;EACRC,OAAO;EACPC,IAAI;EACJC;AACK,CAAC,EAAE;EACR,oBACE,IAAAL,WAAA,CAAAM,GAAA,EAACR,KAAA,CAAAS,YAAY;IAACL,QAAQ,EAAEA,QAAS;IAACC,OAAO,EAAEA,OAAQ;IAACC,IAAI,EAAEA,IAAK;IAAAC,QAAA,eAC7D,IAAAL,WAAA,CAAAM,GAAA,EAACT,SAAA,CAAAW,qBAAqB;MAAAH,QAAA,eACpB,IAAAL,WAAA,CAAAM,GAAA,EAACZ,gBAAA,CAAAe,yBAAyB;QAAAJ,QAAA,eACxB,IAAAL,WAAA,CAAAM,GAAA,EAACP,iBAAA,CAAAW,wBAAwB;UAAAL,QAAA,eACvB,IAAAL,WAAA,CAAAM,GAAA,EAACV,oBAAA,CAAAe,mBAAmB;YAAAN,QAAA,EAAEA;UAAQ,CAAsB;QAAC,CAC7B;MAAC,CACF;IAAC,CACP;EAAC,CACZ,CAAC;AAEnB","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
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/calculateActiveScreensLimit.ts"],"mappings":";;AAGA,OAAO,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":[]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { ScreenLifecycleController } from "../components/controllers/screen-lifecycle";
|
|
4
|
-
import { RootTransitionAware } from "../components/root-transition-aware";
|
|
5
|
-
import { ScreenGestureProvider } from "../providers/gestures";
|
|
6
|
-
import { KeysProvider } from "../providers/keys";
|
|
7
|
-
import { TransitionStylesProvider } from "../providers/transition-styles";
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
export function ScreenTransitionProvider({
|
|
10
|
-
previous,
|
|
11
|
-
current,
|
|
12
|
-
next,
|
|
13
|
-
children
|
|
14
|
-
}) {
|
|
15
|
-
return /*#__PURE__*/_jsx(KeysProvider, {
|
|
16
|
-
previous: previous,
|
|
17
|
-
current: current,
|
|
18
|
-
next: next,
|
|
19
|
-
children: /*#__PURE__*/_jsx(ScreenGestureProvider, {
|
|
20
|
-
children: /*#__PURE__*/_jsx(ScreenLifecycleController, {
|
|
21
|
-
children: /*#__PURE__*/_jsx(TransitionStylesProvider, {
|
|
22
|
-
children: /*#__PURE__*/_jsx(RootTransitionAware, {
|
|
23
|
-
children: children
|
|
24
|
-
})
|
|
25
|
-
})
|
|
26
|
-
})
|
|
27
|
-
})
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=screen-transition-provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ScreenLifecycleController","RootTransitionAware","ScreenGestureProvider","KeysProvider","TransitionStylesProvider","jsx","_jsx","ScreenTransitionProvider","previous","current","next","children"],"sourceRoot":"../../../src","sources":["providers/screen-transition-provider.tsx"],"mappings":";;AACA,SAASA,yBAAyB,QAAQ,4CAA4C;AACtF,SAASC,mBAAmB,QAAQ,qCAAqC;AACzE,SAASC,qBAAqB,QAAQ,uBAAuB;AAC7D,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,wBAAwB,QAAQ,gCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAU1E,OAAO,SAASC,wBAAwBA,CAAC;EACvCC,QAAQ;EACRC,OAAO;EACPC,IAAI;EACJC;AACK,CAAC,EAAE;EACR,oBACEL,IAAA,CAACH,YAAY;IAACK,QAAQ,EAAEA,QAAS;IAACC,OAAO,EAAEA,OAAQ;IAACC,IAAI,EAAEA,IAAK;IAAAC,QAAA,eAC7DL,IAAA,CAACJ,qBAAqB;MAAAS,QAAA,eACpBL,IAAA,CAACN,yBAAyB;QAAAW,QAAA,eACxBL,IAAA,CAACF,wBAAwB;UAAAO,QAAA,eACvBL,IAAA,CAACL,mBAAmB;YAAAU,QAAA,EAAEA;UAAQ,CAAsB;QAAC,CAC7B;MAAC,CACF;IAAC,CACP;EAAC,CACZ,CAAC;AAEnB","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculateActiveScreensLimit.d.ts","sourceRoot":"","sources":["../../../../../../../src/integrations/blank-stack/utils/with-stack-navigation/_utils/calculateActiveScreensLimit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAE1F,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC,EAAE,EAChD,WAAW,EAAE,uBAAuB,GACnC,MAAM,CAsBR"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
import type { NativeStackDescriptor } from "../types/native-stack.navigator";
|
|
3
|
-
type Props = {
|
|
4
|
-
previous?: NativeStackDescriptor;
|
|
5
|
-
current: NativeStackDescriptor;
|
|
6
|
-
next?: NativeStackDescriptor;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
export declare function ScreenTransitionProvider({ previous, current, next, children, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=screen-transition-provider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"screen-transition-provider.d.ts","sourceRoot":"","sources":["../../../src/providers/screen-transition-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE7E,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,EACvC,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,QAAQ,GACT,EAAE,KAAK,2CAYP"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
import { ScreenLifecycleController } from "../components/controllers/screen-lifecycle";
|
|
3
|
-
import { RootTransitionAware } from "../components/root-transition-aware";
|
|
4
|
-
import { ScreenGestureProvider } from "../providers/gestures";
|
|
5
|
-
import { KeysProvider } from "../providers/keys";
|
|
6
|
-
import { TransitionStylesProvider } from "../providers/transition-styles";
|
|
7
|
-
import type { NativeStackDescriptor } from "../types/native-stack.navigator";
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
previous?: NativeStackDescriptor;
|
|
11
|
-
current: NativeStackDescriptor;
|
|
12
|
-
next?: NativeStackDescriptor;
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export function ScreenTransitionProvider({
|
|
17
|
-
previous,
|
|
18
|
-
current,
|
|
19
|
-
next,
|
|
20
|
-
children,
|
|
21
|
-
}: Props) {
|
|
22
|
-
return (
|
|
23
|
-
<KeysProvider previous={previous} current={current} next={next}>
|
|
24
|
-
<ScreenGestureProvider>
|
|
25
|
-
<ScreenLifecycleController>
|
|
26
|
-
<TransitionStylesProvider>
|
|
27
|
-
<RootTransitionAware>{children}</RootTransitionAware>
|
|
28
|
-
</TransitionStylesProvider>
|
|
29
|
-
</ScreenLifecycleController>
|
|
30
|
-
</ScreenGestureProvider>
|
|
31
|
-
</KeysProvider>
|
|
32
|
-
);
|
|
33
|
-
}
|