@react-navigation/elements 3.0.0-alpha.10 → 3.0.0-alpha.11
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/module/Container.js +8 -1
- package/lib/module/Container.js.map +1 -1
- package/lib/module/Screen.js +11 -7
- package/lib/module/Screen.js.map +1 -1
- package/lib/typescript/src/Container.d.ts +3 -1
- package/lib/typescript/src/Container.d.ts.map +1 -1
- package/lib/typescript/src/Screen.d.ts +2 -2
- package/lib/typescript/src/Screen.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/Container.tsx +13 -2
- package/src/Screen.tsx +13 -13
package/lib/module/Container.js
CHANGED
|
@@ -8,12 +8,19 @@ export function Container({
|
|
|
8
8
|
style
|
|
9
9
|
}) {
|
|
10
10
|
if (Platform.OS === 'web') {
|
|
11
|
+
const {
|
|
12
|
+
backgroundColor,
|
|
13
|
+
...rest
|
|
14
|
+
} = style ?? {};
|
|
11
15
|
return /*#__PURE__*/_jsx("div", {
|
|
12
16
|
inert: inert,
|
|
13
17
|
"aria-hidden": inert,
|
|
14
18
|
style: {
|
|
15
19
|
...DEFAULT_STYLE,
|
|
16
|
-
...
|
|
20
|
+
...rest,
|
|
21
|
+
backgroundColor:
|
|
22
|
+
// In practice we only get string on web instead of OpaqueValue
|
|
23
|
+
typeof backgroundColor === 'string' ? backgroundColor : undefined
|
|
17
24
|
},
|
|
18
25
|
children: children
|
|
19
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","View","jsx","_jsx","Container","inert","children","style","OS","DEFAULT_STYLE","pointerEvents","collapsable","display","alignContent","alignItems","boxSizing","flexBasis","flexDirection","flexShrink","minHeight","minWidth","position"],"sourceRoot":"../../src","sources":["Container.tsx"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,IAAI,QAAwB,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["Platform","View","jsx","_jsx","Container","inert","children","style","OS","backgroundColor","rest","DEFAULT_STYLE","undefined","pointerEvents","collapsable","display","alignContent","alignItems","boxSizing","flexBasis","flexDirection","flexShrink","minHeight","minWidth","position"],"sourceRoot":"../../src","sources":["Container.tsx"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,IAAI,QAAwB,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAW9D,OAAO,SAASC,SAASA,CAAC;EAAEC,KAAK;EAAEC,QAAQ;EAAEC;AAAa,CAAC,EAAE;EAC3D,IAAIP,QAAQ,CAACQ,EAAE,KAAK,KAAK,EAAE;IACzB,MAAM;MAAEC,eAAe;MAAE,GAAGC;IAAK,CAAC,GAAGH,KAAK,IAAI,CAAC,CAAC;IAEhD,oBACEJ,IAAA;MACEE,KAAK,EAAEA,KAAM;MACb,eAAaA,KAAM;MACnBE,KAAK,EAAE;QACL,GAAGI,aAAa;QAChB,GAAGD,IAAI;QACPD,eAAe;QACb;QACA,OAAOA,eAAe,KAAK,QAAQ,GAAGA,eAAe,GAAGG;MAC5D,CAAE;MAAAN,QAAA,EAEDA;IAAQ,CACN,CAAC;EAEV;EAEA,oBACEH,IAAA,CAACF,IAAI;IACH,eAAaI,KAAM;IACnBE,KAAK,EAAE,CAAC;MAAEM,aAAa,EAAER,KAAK,GAAG,MAAM,GAAG;IAAW,CAAC,EAAEE,KAAK,CAAE;IAC/DO,WAAW,EAAE,KAAM;IAAAR,QAAA,EAElBA;EAAQ,CACL,CAAC;AAEX;AAEA,MAAMK,aAAa,GAAG;EACpBI,OAAO,EAAE,MAAM;EACfC,YAAY,EAAE,YAAY;EAC1BC,UAAU,EAAE,SAAS;EACrBC,SAAS,EAAE,YAAY;EACvBC,SAAS,EAAE,MAAM;EACjBC,aAAa,EAAE,QAAQ;EACvBC,UAAU,EAAE,CAAC;EACbC,SAAS,EAAE,CAAC;EACZC,QAAQ,EAAE,CAAC;EACXC,QAAQ,EAAE;AACZ,CAAwC","ignoreList":[]}
|
package/lib/module/Screen.js
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import { NavigationProvider, useTheme } from '@react-navigation/native';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { StyleSheet, View } from 'react-native';
|
|
6
6
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
7
|
import { getDefaultHeaderHeight } from "./Header/getDefaultHeaderHeight.js";
|
|
8
8
|
import { HeaderHeightContext } from "./Header/HeaderHeightContext.js";
|
|
9
9
|
import { HeaderShownContext } from "./Header/HeaderShownContext.js";
|
|
10
|
+
import { Container } from "./internal.js";
|
|
10
11
|
import { useFrameSize } from "./useFrameSize.js";
|
|
11
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
13
|
export function Screen(props) {
|
|
@@ -40,15 +41,18 @@ export function Screen(props) {
|
|
|
40
41
|
setHeaderHeight(height);
|
|
41
42
|
});
|
|
42
43
|
}, [route.name]);
|
|
43
|
-
return /*#__PURE__*/_jsxs(
|
|
44
|
-
|
|
45
|
-
style:
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
return /*#__PURE__*/_jsxs(Container, {
|
|
45
|
+
inert: !focused,
|
|
46
|
+
style: {
|
|
47
|
+
...styles.container,
|
|
48
|
+
backgroundColor: colors.background,
|
|
49
|
+
...style
|
|
50
|
+
}
|
|
48
51
|
// On Fabric we need to disable collapsing for the background to ensure
|
|
49
52
|
// that we won't render unnecessary views due to the view flattening.
|
|
53
|
+
// Container sets `collapsable` to `false` internally
|
|
54
|
+
// This comment is left to make sure refactors don't remove it by mistake
|
|
50
55
|
,
|
|
51
|
-
collapsable: false,
|
|
52
56
|
children: [headerShown ? /*#__PURE__*/_jsx(NavigationProvider, {
|
|
53
57
|
navigation: navigation,
|
|
54
58
|
route: route,
|
package/lib/module/Screen.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NavigationProvider","useTheme","React","
|
|
1
|
+
{"version":3,"names":["NavigationProvider","useTheme","React","StyleSheet","View","useSafeAreaInsets","getDefaultHeaderHeight","HeaderHeightContext","HeaderShownContext","Container","useFrameSize","jsx","_jsx","jsxs","_jsxs","Screen","props","insets","colors","isParentHeaderShown","useContext","parentHeaderHeight","focused","modal","header","headerShown","headerTransparent","headerStatusBarHeight","top","navigation","route","children","style","defaultHeaderHeight","size","landscape","width","height","modalPresentation","topInset","headerRef","useRef","headerHeight","setHeaderHeight","useState","useLayoutEffect","current","measure","_x","_y","_width","name","inert","styles","container","backgroundColor","background","ref","onLayout","e","nativeEvent","layout","absolute","content","Provider","value","create","flex","zIndex","pointerEvents","position","start","end"],"sourceRoot":"../../src","sources":["Screen.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type ViewStyle } from 'react-native';
|
|
2
2
|
export type Props = {
|
|
3
3
|
inert?: boolean;
|
|
4
|
-
style?: React.CSSProperties &
|
|
4
|
+
style?: ViewStyle & Omit<React.CSSProperties, 'backgroundColor'> & {
|
|
5
|
+
backgroundColor?: ViewStyle['backgroundColor'];
|
|
6
|
+
};
|
|
5
7
|
children: React.ReactNode;
|
|
6
8
|
};
|
|
7
9
|
export declare function Container({ inert, children, style }: Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../src/Container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9D,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../src/Container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9D,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,GACf,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,iBAAiB,CAAC,GAAG;QAC7C,eAAe,CAAC,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;KAChD,CAAC;IACJ,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,2CA8B1D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type NavigationProp, type ParamListBase, type RouteProp } from '@react-navigation/native';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { Container } from './internal';
|
|
4
4
|
type Props = {
|
|
5
5
|
focused: boolean;
|
|
6
6
|
modal?: boolean;
|
|
@@ -10,7 +10,7 @@ type Props = {
|
|
|
10
10
|
headerShown?: boolean;
|
|
11
11
|
headerStatusBarHeight?: number;
|
|
12
12
|
headerTransparent?: boolean;
|
|
13
|
-
style?:
|
|
13
|
+
style?: React.ComponentProps<typeof Container>['style'];
|
|
14
14
|
children: React.ReactNode;
|
|
15
15
|
};
|
|
16
16
|
export declare function Screen(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../src/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,aAAa,EAClB,KAAK,SAAS,EAEf,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../src/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,aAAa,EAClB,KAAK,SAAS,EAEf,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvC,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAC1C,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC;IACxD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,2CA+ElC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/elements",
|
|
3
3
|
"description": "UI Components for React Navigation",
|
|
4
|
-
"version": "3.0.0-alpha.
|
|
4
|
+
"version": "3.0.0-alpha.11",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
7
7
|
"react-navigation",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@callstack/liquid-glass": "^0.6.0",
|
|
56
56
|
"@jest/globals": "^30.0.0",
|
|
57
|
-
"@react-navigation/native": "^8.0.0-alpha.
|
|
57
|
+
"@react-navigation/native": "^8.0.0-alpha.11",
|
|
58
58
|
"@testing-library/react-native": "^13.2.1",
|
|
59
59
|
"@types/react": "~19.1.10",
|
|
60
60
|
"@types/use-sync-external-store": "^1.5.0",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@callstack/liquid-glass": ">= 0.6.0",
|
|
71
|
-
"@react-navigation/native": "^8.0.0-alpha.
|
|
71
|
+
"@react-navigation/native": "^8.0.0-alpha.11",
|
|
72
72
|
"react": ">= 19.0.0",
|
|
73
73
|
"react-native": "*",
|
|
74
74
|
"react-native-safe-area-context": ">= 5.5.0",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
]
|
|
93
93
|
]
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "faad2ee23945a5a27090cfb837a35d1db25147ab"
|
|
96
96
|
}
|
package/src/Container.tsx
CHANGED
|
@@ -2,17 +2,28 @@ import { Platform, View, type ViewStyle } from 'react-native';
|
|
|
2
2
|
|
|
3
3
|
export type Props = {
|
|
4
4
|
inert?: boolean;
|
|
5
|
-
style?:
|
|
5
|
+
style?: ViewStyle &
|
|
6
|
+
Omit<React.CSSProperties, 'backgroundColor'> & {
|
|
7
|
+
backgroundColor?: ViewStyle['backgroundColor'];
|
|
8
|
+
};
|
|
6
9
|
children: React.ReactNode;
|
|
7
10
|
};
|
|
8
11
|
|
|
9
12
|
export function Container({ inert, children, style }: Props) {
|
|
10
13
|
if (Platform.OS === 'web') {
|
|
14
|
+
const { backgroundColor, ...rest } = style ?? {};
|
|
15
|
+
|
|
11
16
|
return (
|
|
12
17
|
<div
|
|
13
18
|
inert={inert}
|
|
14
19
|
aria-hidden={inert}
|
|
15
|
-
style={{
|
|
20
|
+
style={{
|
|
21
|
+
...DEFAULT_STYLE,
|
|
22
|
+
...rest,
|
|
23
|
+
backgroundColor:
|
|
24
|
+
// In practice we only get string on web instead of OpaqueValue
|
|
25
|
+
typeof backgroundColor === 'string' ? backgroundColor : undefined,
|
|
26
|
+
}}
|
|
16
27
|
>
|
|
17
28
|
{children}
|
|
18
29
|
</div>
|
package/src/Screen.tsx
CHANGED
|
@@ -6,18 +6,13 @@ import {
|
|
|
6
6
|
useTheme,
|
|
7
7
|
} from '@react-navigation/native';
|
|
8
8
|
import * as React from 'react';
|
|
9
|
-
import {
|
|
10
|
-
Animated,
|
|
11
|
-
type StyleProp,
|
|
12
|
-
StyleSheet,
|
|
13
|
-
View,
|
|
14
|
-
type ViewStyle,
|
|
15
|
-
} from 'react-native';
|
|
9
|
+
import { StyleSheet, View } from 'react-native';
|
|
16
10
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
17
11
|
|
|
18
12
|
import { getDefaultHeaderHeight } from './Header/getDefaultHeaderHeight';
|
|
19
13
|
import { HeaderHeightContext } from './Header/HeaderHeightContext';
|
|
20
14
|
import { HeaderShownContext } from './Header/HeaderShownContext';
|
|
15
|
+
import { Container } from './internal';
|
|
21
16
|
import { useFrameSize } from './useFrameSize';
|
|
22
17
|
|
|
23
18
|
type Props = {
|
|
@@ -29,7 +24,7 @@ type Props = {
|
|
|
29
24
|
headerShown?: boolean;
|
|
30
25
|
headerStatusBarHeight?: number;
|
|
31
26
|
headerTransparent?: boolean;
|
|
32
|
-
style?:
|
|
27
|
+
style?: React.ComponentProps<typeof Container>['style'];
|
|
33
28
|
children: React.ReactNode;
|
|
34
29
|
};
|
|
35
30
|
|
|
@@ -72,12 +67,17 @@ export function Screen(props: Props) {
|
|
|
72
67
|
}, [route.name]);
|
|
73
68
|
|
|
74
69
|
return (
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
style={
|
|
70
|
+
<Container
|
|
71
|
+
inert={!focused}
|
|
72
|
+
style={{
|
|
73
|
+
...styles.container,
|
|
74
|
+
backgroundColor: colors.background,
|
|
75
|
+
...style,
|
|
76
|
+
}}
|
|
78
77
|
// On Fabric we need to disable collapsing for the background to ensure
|
|
79
78
|
// that we won't render unnecessary views due to the view flattening.
|
|
80
|
-
collapsable
|
|
79
|
+
// Container sets `collapsable` to `false` internally
|
|
80
|
+
// This comment is left to make sure refactors don't remove it by mistake
|
|
81
81
|
>
|
|
82
82
|
{headerShown ? (
|
|
83
83
|
<NavigationProvider navigation={navigation} route={route}>
|
|
@@ -105,7 +105,7 @@ export function Screen(props: Props) {
|
|
|
105
105
|
</HeaderHeightContext.Provider>
|
|
106
106
|
</HeaderShownContext.Provider>
|
|
107
107
|
</View>
|
|
108
|
-
</
|
|
108
|
+
</Container>
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
111
|
|