@react-navigation/elements 2.0.0-rc.2 → 2.0.0-rc.20

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.
Files changed (263) hide show
  1. package/lib/commonjs/Background.js +4 -3
  2. package/lib/commonjs/Background.js.map +1 -1
  3. package/lib/commonjs/Button.js +29 -56
  4. package/lib/commonjs/Button.js.map +1 -1
  5. package/lib/commonjs/Header/Header.js +72 -56
  6. package/lib/commonjs/Header/Header.js.map +1 -1
  7. package/lib/commonjs/Header/HeaderBackButton.js +78 -66
  8. package/lib/commonjs/Header/HeaderBackButton.js.map +1 -1
  9. package/lib/commonjs/Header/HeaderBackContext.js +1 -1
  10. package/lib/commonjs/Header/HeaderBackground.js +9 -7
  11. package/lib/commonjs/Header/HeaderBackground.js.map +1 -1
  12. package/lib/commonjs/Header/HeaderButton.js +6 -7
  13. package/lib/commonjs/Header/HeaderButton.js.map +1 -1
  14. package/lib/commonjs/Header/HeaderHeightContext.js +1 -1
  15. package/lib/commonjs/Header/HeaderShownContext.js +1 -1
  16. package/lib/commonjs/Header/HeaderTitle.js +5 -8
  17. package/lib/commonjs/Header/HeaderTitle.js.map +1 -1
  18. package/lib/commonjs/Header/useHeaderHeight.js +1 -1
  19. package/lib/commonjs/Label/Label.js +6 -9
  20. package/lib/commonjs/Label/Label.js.map +1 -1
  21. package/lib/commonjs/MaskedView.android.js +1 -1
  22. package/lib/commonjs/MaskedView.ios.js +1 -1
  23. package/lib/commonjs/MaskedViewNative.js +5 -1
  24. package/lib/commonjs/MaskedViewNative.js.map +1 -1
  25. package/lib/commonjs/MissingIcon.js +6 -9
  26. package/lib/commonjs/MissingIcon.js.map +1 -1
  27. package/lib/commonjs/PlatformPressable.js +57 -4
  28. package/lib/commonjs/PlatformPressable.js.map +1 -1
  29. package/lib/commonjs/ResourceSavingView.js +19 -15
  30. package/lib/commonjs/ResourceSavingView.js.map +1 -1
  31. package/lib/commonjs/SafeAreaProviderCompat.js +26 -19
  32. package/lib/commonjs/SafeAreaProviderCompat.js.map +1 -1
  33. package/lib/commonjs/Screen.js +34 -25
  34. package/lib/commonjs/Screen.js.map +1 -1
  35. package/lib/commonjs/Text.js +6 -7
  36. package/lib/commonjs/Text.js.map +1 -1
  37. package/lib/commonjs/index.js +27 -28
  38. package/lib/commonjs/index.js.map +1 -1
  39. package/lib/commonjs/package.json +1 -0
  40. package/lib/module/Background.js +6 -3
  41. package/lib/module/Background.js.map +1 -1
  42. package/lib/module/Button.js +31 -56
  43. package/lib/module/Button.js.map +1 -1
  44. package/lib/module/Header/Header.js +74 -56
  45. package/lib/module/Header/Header.js.map +1 -1
  46. package/lib/module/Header/HeaderBackButton.js +79 -66
  47. package/lib/module/Header/HeaderBackButton.js.map +1 -1
  48. package/lib/module/Header/HeaderBackContext.js +3 -1
  49. package/lib/module/Header/HeaderBackContext.js.map +1 -1
  50. package/lib/module/Header/HeaderBackground.js +11 -7
  51. package/lib/module/Header/HeaderBackground.js.map +1 -1
  52. package/lib/module/Header/HeaderButton.js +8 -5
  53. package/lib/module/Header/HeaderButton.js.map +1 -1
  54. package/lib/module/Header/HeaderHeightContext.js +3 -1
  55. package/lib/module/Header/HeaderHeightContext.js.map +1 -1
  56. package/lib/module/Header/HeaderShownContext.js +3 -1
  57. package/lib/module/Header/HeaderShownContext.js.map +1 -1
  58. package/lib/module/Header/HeaderTitle.js +7 -6
  59. package/lib/module/Header/HeaderTitle.js.map +1 -1
  60. package/lib/module/Header/getDefaultHeaderHeight.js +2 -0
  61. package/lib/module/Header/getDefaultHeaderHeight.js.map +1 -1
  62. package/lib/module/Header/getHeaderTitle.js +2 -0
  63. package/lib/module/Header/getHeaderTitle.js.map +1 -1
  64. package/lib/module/Header/useHeaderHeight.js +3 -1
  65. package/lib/module/Header/useHeaderHeight.js.map +1 -1
  66. package/lib/module/Label/Label.js +8 -7
  67. package/lib/module/Label/Label.js.map +1 -1
  68. package/lib/module/Label/getLabel.js +2 -0
  69. package/lib/module/Label/getLabel.js.map +1 -1
  70. package/lib/module/MaskedView.android.js +3 -1
  71. package/lib/module/MaskedView.android.js.map +1 -1
  72. package/lib/module/MaskedView.ios.js +3 -1
  73. package/lib/module/MaskedView.ios.js.map +1 -1
  74. package/lib/module/MaskedView.js +2 -0
  75. package/lib/module/MaskedView.js.map +1 -1
  76. package/lib/module/MaskedViewNative.js +7 -1
  77. package/lib/module/MaskedViewNative.js.map +1 -1
  78. package/lib/module/MissingIcon.js +9 -7
  79. package/lib/module/MissingIcon.js.map +1 -1
  80. package/lib/module/PlatformPressable.js +59 -4
  81. package/lib/module/PlatformPressable.js.map +1 -1
  82. package/lib/module/ResourceSavingView.js +21 -15
  83. package/lib/module/ResourceSavingView.js.map +1 -1
  84. package/lib/module/SafeAreaProviderCompat.js +28 -19
  85. package/lib/module/SafeAreaProviderCompat.js.map +1 -1
  86. package/lib/module/Screen.js +36 -25
  87. package/lib/module/Screen.js.map +1 -1
  88. package/lib/module/Text.js +7 -6
  89. package/lib/module/Text.js.map +1 -1
  90. package/lib/module/getDefaultSidebarWidth.js +2 -0
  91. package/lib/module/getDefaultSidebarWidth.js.map +1 -1
  92. package/lib/module/getNamedContext.js +2 -0
  93. package/lib/module/getNamedContext.js.map +1 -1
  94. package/lib/module/index.js +28 -28
  95. package/lib/module/index.js.map +1 -1
  96. package/lib/module/package.json +1 -0
  97. package/lib/module/types.js +2 -0
  98. package/lib/typescript/commonjs/package.json +1 -0
  99. package/lib/typescript/{src → commonjs/src}/Background.d.ts +1 -1
  100. package/lib/typescript/commonjs/src/Background.d.ts.map +1 -0
  101. package/lib/typescript/commonjs/src/Button.d.ts.map +1 -0
  102. package/lib/typescript/{src → commonjs/src}/Header/Header.d.ts +1 -2
  103. package/lib/typescript/commonjs/src/Header/Header.d.ts.map +1 -0
  104. package/lib/typescript/commonjs/src/Header/HeaderBackButton.d.ts +3 -0
  105. package/lib/typescript/commonjs/src/Header/HeaderBackButton.d.ts.map +1 -0
  106. package/lib/typescript/commonjs/src/Header/HeaderBackContext.d.ts.map +1 -0
  107. package/lib/typescript/{src → commonjs/src}/Header/HeaderBackground.d.ts +1 -1
  108. package/lib/typescript/commonjs/src/Header/HeaderBackground.d.ts.map +1 -0
  109. package/lib/typescript/{src → commonjs/src}/Header/HeaderButton.d.ts +1 -2
  110. package/lib/typescript/commonjs/src/Header/HeaderButton.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/src/Header/HeaderHeightContext.d.ts.map +1 -0
  112. package/lib/typescript/commonjs/src/Header/HeaderShownContext.d.ts.map +1 -0
  113. package/lib/typescript/{src → commonjs/src}/Header/HeaderTitle.d.ts +1 -2
  114. package/lib/typescript/commonjs/src/Header/HeaderTitle.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/src/Header/getDefaultHeaderHeight.d.ts.map +1 -0
  116. package/lib/typescript/commonjs/src/Header/getHeaderTitle.d.ts.map +1 -0
  117. package/lib/typescript/commonjs/src/Header/useHeaderHeight.d.ts.map +1 -0
  118. package/lib/typescript/{src → commonjs/src}/Label/Label.d.ts +1 -2
  119. package/lib/typescript/commonjs/src/Label/Label.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/src/Label/getLabel.d.ts.map +1 -0
  121. package/lib/typescript/commonjs/src/MaskedView.android.d.ts.map +1 -0
  122. package/lib/typescript/commonjs/src/MaskedView.d.ts.map +1 -0
  123. package/lib/typescript/commonjs/src/MaskedView.ios.d.ts.map +1 -0
  124. package/lib/typescript/{src → commonjs/src}/MaskedViewNative.d.ts +1 -1
  125. package/lib/typescript/commonjs/src/MaskedViewNative.d.ts.map +1 -0
  126. package/lib/typescript/{src → commonjs/src}/MissingIcon.d.ts +1 -2
  127. package/lib/typescript/commonjs/src/MissingIcon.d.ts.map +1 -0
  128. package/lib/typescript/{src → commonjs/src}/PlatformPressable.d.ts +8 -1
  129. package/lib/typescript/commonjs/src/PlatformPressable.d.ts.map +1 -0
  130. package/lib/typescript/{src → commonjs/src}/ResourceSavingView.d.ts +1 -1
  131. package/lib/typescript/commonjs/src/ResourceSavingView.d.ts.map +1 -0
  132. package/lib/typescript/{src → commonjs/src}/SafeAreaProviderCompat.d.ts +1 -1
  133. package/lib/typescript/commonjs/src/SafeAreaProviderCompat.d.ts.map +1 -0
  134. package/lib/typescript/{src → commonjs/src}/Screen.d.ts +1 -1
  135. package/lib/typescript/commonjs/src/Screen.d.ts.map +1 -0
  136. package/lib/typescript/commonjs/src/Text.d.ts +3 -0
  137. package/lib/typescript/commonjs/src/Text.d.ts.map +1 -0
  138. package/lib/typescript/commonjs/src/getDefaultSidebarWidth.d.ts.map +1 -0
  139. package/lib/typescript/commonjs/src/getNamedContext.d.ts.map +1 -0
  140. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  141. package/lib/typescript/{src → commonjs/src}/types.d.ts +12 -4
  142. package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
  143. package/lib/typescript/commonjs/tsconfig.build.tsbuildinfo +1 -0
  144. package/lib/typescript/module/package.json +1 -0
  145. package/lib/typescript/module/src/Background.d.ts +9 -0
  146. package/lib/typescript/module/src/Background.d.ts.map +1 -0
  147. package/lib/typescript/module/src/Button.d.ts +13 -0
  148. package/lib/typescript/module/src/Button.d.ts.map +1 -0
  149. package/lib/typescript/module/src/Header/Header.d.ts +18 -0
  150. package/lib/typescript/module/src/Header/Header.d.ts.map +1 -0
  151. package/lib/typescript/module/src/Header/HeaderBackButton.d.ts +3 -0
  152. package/lib/typescript/module/src/Header/HeaderBackButton.d.ts.map +1 -0
  153. package/lib/typescript/module/src/Header/HeaderBackContext.d.ts +5 -0
  154. package/lib/typescript/module/src/Header/HeaderBackContext.d.ts.map +1 -0
  155. package/lib/typescript/module/src/Header/HeaderBackground.d.ts +9 -0
  156. package/lib/typescript/module/src/Header/HeaderBackground.d.ts.map +1 -0
  157. package/lib/typescript/module/src/Header/HeaderButton.d.ts +3 -0
  158. package/lib/typescript/module/src/Header/HeaderButton.d.ts.map +1 -0
  159. package/lib/typescript/module/src/Header/HeaderHeightContext.d.ts +2 -0
  160. package/lib/typescript/module/src/Header/HeaderHeightContext.d.ts.map +1 -0
  161. package/lib/typescript/module/src/Header/HeaderShownContext.d.ts +2 -0
  162. package/lib/typescript/module/src/Header/HeaderShownContext.d.ts.map +1 -0
  163. package/lib/typescript/module/src/Header/HeaderTitle.d.ts +9 -0
  164. package/lib/typescript/module/src/Header/HeaderTitle.d.ts.map +1 -0
  165. package/lib/typescript/module/src/Header/getDefaultHeaderHeight.d.ts +3 -0
  166. package/lib/typescript/module/src/Header/getDefaultHeaderHeight.d.ts.map +1 -0
  167. package/lib/typescript/module/src/Header/getHeaderTitle.d.ts +6 -0
  168. package/lib/typescript/module/src/Header/getHeaderTitle.d.ts.map +1 -0
  169. package/lib/typescript/module/src/Header/useHeaderHeight.d.ts +2 -0
  170. package/lib/typescript/module/src/Header/useHeaderHeight.d.ts.map +1 -0
  171. package/lib/typescript/module/src/Label/Label.d.ts +9 -0
  172. package/lib/typescript/module/src/Label/Label.d.ts.map +1 -0
  173. package/lib/typescript/module/src/Label/getLabel.d.ts +5 -0
  174. package/lib/typescript/module/src/Label/getLabel.d.ts.map +1 -0
  175. package/lib/typescript/module/src/MaskedView.android.d.ts +2 -0
  176. package/lib/typescript/module/src/MaskedView.android.d.ts.map +1 -0
  177. package/lib/typescript/module/src/MaskedView.d.ts +11 -0
  178. package/lib/typescript/module/src/MaskedView.d.ts.map +1 -0
  179. package/lib/typescript/module/src/MaskedView.ios.d.ts +2 -0
  180. package/lib/typescript/module/src/MaskedView.ios.d.ts.map +1 -0
  181. package/lib/typescript/module/src/MaskedViewNative.d.ts +11 -0
  182. package/lib/typescript/module/src/MaskedViewNative.d.ts.map +1 -0
  183. package/lib/typescript/module/src/MissingIcon.d.ts +9 -0
  184. package/lib/typescript/module/src/MissingIcon.d.ts.map +1 -0
  185. package/lib/typescript/module/src/PlatformPressable.d.ts +21 -0
  186. package/lib/typescript/module/src/PlatformPressable.d.ts.map +1 -0
  187. package/lib/typescript/module/src/ResourceSavingView.d.ts +10 -0
  188. package/lib/typescript/module/src/ResourceSavingView.d.ts.map +1 -0
  189. package/lib/typescript/module/src/SafeAreaProviderCompat.d.ts +13 -0
  190. package/lib/typescript/module/src/SafeAreaProviderCompat.d.ts.map +1 -0
  191. package/lib/typescript/module/src/Screen.d.ts +18 -0
  192. package/lib/typescript/module/src/Screen.d.ts.map +1 -0
  193. package/lib/typescript/module/src/Text.d.ts +3 -0
  194. package/lib/typescript/module/src/Text.d.ts.map +1 -0
  195. package/lib/typescript/module/src/getDefaultSidebarWidth.d.ts +4 -0
  196. package/lib/typescript/module/src/getDefaultSidebarWidth.d.ts.map +1 -0
  197. package/lib/typescript/module/src/getNamedContext.d.ts +6 -0
  198. package/lib/typescript/module/src/getNamedContext.d.ts.map +1 -0
  199. package/lib/typescript/module/src/index.d.ts +25 -0
  200. package/lib/typescript/module/src/index.d.ts.map +1 -0
  201. package/lib/typescript/module/src/types.d.ts +234 -0
  202. package/lib/typescript/module/src/types.d.ts.map +1 -0
  203. package/lib/typescript/module/tsconfig.build.tsbuildinfo +1 -0
  204. package/package.json +42 -13
  205. package/src/Button.tsx +3 -40
  206. package/src/Header/Header.tsx +17 -9
  207. package/src/Header/HeaderBackButton.tsx +90 -73
  208. package/src/Header/HeaderBackground.tsx +3 -3
  209. package/src/Header/HeaderButton.tsx +0 -1
  210. package/src/Header/HeaderTitle.tsx +0 -1
  211. package/src/Label/Label.tsx +0 -1
  212. package/src/MissingIcon.tsx +3 -4
  213. package/src/PlatformPressable.tsx +65 -1
  214. package/src/SafeAreaProviderCompat.tsx +1 -0
  215. package/src/Screen.tsx +1 -0
  216. package/src/Text.tsx +1 -3
  217. package/src/index.tsx +4 -6
  218. package/src/types.tsx +13 -4
  219. package/lib/typescript/src/Background.d.ts.map +0 -1
  220. package/lib/typescript/src/Button.d.ts.map +0 -1
  221. package/lib/typescript/src/Header/Header.d.ts.map +0 -1
  222. package/lib/typescript/src/Header/HeaderBackButton.d.ts +0 -4
  223. package/lib/typescript/src/Header/HeaderBackButton.d.ts.map +0 -1
  224. package/lib/typescript/src/Header/HeaderBackContext.d.ts.map +0 -1
  225. package/lib/typescript/src/Header/HeaderBackground.d.ts.map +0 -1
  226. package/lib/typescript/src/Header/HeaderButton.d.ts.map +0 -1
  227. package/lib/typescript/src/Header/HeaderHeightContext.d.ts.map +0 -1
  228. package/lib/typescript/src/Header/HeaderShownContext.d.ts.map +0 -1
  229. package/lib/typescript/src/Header/HeaderTitle.d.ts.map +0 -1
  230. package/lib/typescript/src/Header/getDefaultHeaderHeight.d.ts.map +0 -1
  231. package/lib/typescript/src/Header/getHeaderTitle.d.ts.map +0 -1
  232. package/lib/typescript/src/Header/useHeaderHeight.d.ts.map +0 -1
  233. package/lib/typescript/src/Label/Label.d.ts.map +0 -1
  234. package/lib/typescript/src/Label/getLabel.d.ts.map +0 -1
  235. package/lib/typescript/src/MaskedView.android.d.ts.map +0 -1
  236. package/lib/typescript/src/MaskedView.d.ts.map +0 -1
  237. package/lib/typescript/src/MaskedView.ios.d.ts.map +0 -1
  238. package/lib/typescript/src/MaskedViewNative.d.ts.map +0 -1
  239. package/lib/typescript/src/MissingIcon.d.ts.map +0 -1
  240. package/lib/typescript/src/PlatformPressable.d.ts.map +0 -1
  241. package/lib/typescript/src/ResourceSavingView.d.ts.map +0 -1
  242. package/lib/typescript/src/SafeAreaProviderCompat.d.ts.map +0 -1
  243. package/lib/typescript/src/Screen.d.ts.map +0 -1
  244. package/lib/typescript/src/Text.d.ts +0 -4
  245. package/lib/typescript/src/Text.d.ts.map +0 -1
  246. package/lib/typescript/src/getDefaultSidebarWidth.d.ts.map +0 -1
  247. package/lib/typescript/src/getNamedContext.d.ts.map +0 -1
  248. package/lib/typescript/src/index.d.ts.map +0 -1
  249. package/lib/typescript/src/types.d.ts.map +0 -1
  250. /package/lib/typescript/{src → commonjs/src}/Button.d.ts +0 -0
  251. /package/lib/typescript/{src → commonjs/src}/Header/HeaderBackContext.d.ts +0 -0
  252. /package/lib/typescript/{src → commonjs/src}/Header/HeaderHeightContext.d.ts +0 -0
  253. /package/lib/typescript/{src → commonjs/src}/Header/HeaderShownContext.d.ts +0 -0
  254. /package/lib/typescript/{src → commonjs/src}/Header/getDefaultHeaderHeight.d.ts +0 -0
  255. /package/lib/typescript/{src → commonjs/src}/Header/getHeaderTitle.d.ts +0 -0
  256. /package/lib/typescript/{src → commonjs/src}/Header/useHeaderHeight.d.ts +0 -0
  257. /package/lib/typescript/{src → commonjs/src}/Label/getLabel.d.ts +0 -0
  258. /package/lib/typescript/{src → commonjs/src}/MaskedView.android.d.ts +0 -0
  259. /package/lib/typescript/{src → commonjs/src}/MaskedView.d.ts +0 -0
  260. /package/lib/typescript/{src → commonjs/src}/MaskedView.ios.d.ts +0 -0
  261. /package/lib/typescript/{src → commonjs/src}/getDefaultSidebarWidth.d.ts +0 -0
  262. /package/lib/typescript/{src → commonjs/src}/getNamedContext.d.ts +0 -0
  263. /package/lib/typescript/{src → commonjs/src}/index.d.ts +0 -0
@@ -3,12 +3,15 @@ import * as React from 'react';
3
3
  import {
4
4
  Animated,
5
5
  Image,
6
- type LayoutChangeEvent,
7
6
  Platform,
7
+ type StyleProp,
8
8
  StyleSheet,
9
+ type TextStyle,
9
10
  View,
10
11
  } from 'react-native';
11
12
 
13
+ import backIcon from '../assets/back-icon.png';
14
+ import backIconMask from '../assets/back-icon-mask.png';
12
15
  import { MaskedView } from '../MaskedView';
13
16
  import type { HeaderBackButtonProps } from '../types';
14
17
  import { HeaderButton } from './HeaderButton';
@@ -19,13 +22,13 @@ export function HeaderBackButton({
19
22
  backImage,
20
23
  label,
21
24
  labelStyle,
22
- labelVisible = Platform.OS === 'ios',
25
+ displayMode = Platform.OS === 'ios' ? 'default' : 'minimal',
23
26
  onLabelLayout,
24
27
  onPress,
25
28
  pressColor,
26
29
  pressOpacity,
27
30
  screenLayout,
28
- tintColor: customTintColor,
31
+ tintColor,
29
32
  titleLayout,
30
33
  truncatedLabel = 'Back',
31
34
  accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back',
@@ -36,52 +39,25 @@ export function HeaderBackButton({
36
39
  const { colors, fonts } = useTheme();
37
40
  const { direction } = useLocale();
38
41
 
39
- const [initialLabelWidth, setInitialLabelWidth] = React.useState<
40
- undefined | number
41
- >(undefined);
42
-
43
- const tintColor =
44
- customTintColor !== undefined
45
- ? customTintColor
46
- : Platform.select({
47
- ios: colors.primary,
48
- default: colors.text,
49
- });
50
-
51
- const handleLabelLayout = (e: LayoutChangeEvent) => {
52
- onLabelLayout?.(e);
53
-
54
- const { layout } = e.nativeEvent;
55
-
56
- setInitialLabelWidth(
57
- (direction === 'rtl' ? layout.y : layout.x) + layout.width
58
- );
59
- };
60
-
61
- const shouldTruncateLabel = () => {
62
- return (
63
- !label ||
64
- (initialLabelWidth &&
65
- titleLayout &&
66
- screenLayout &&
67
- (screenLayout.width - titleLayout.width) / 2 < initialLabelWidth + 26)
68
- );
69
- };
42
+ const [labelWidth, setLabelWidth] = React.useState<number | null>(null);
43
+ const [truncatedLabelWidth, setTruncatedLabelWidth] = React.useState<
44
+ number | null
45
+ >(null);
70
46
 
71
47
  const renderBackImage = () => {
72
48
  if (backImage) {
73
- return backImage({ tintColor });
49
+ return backImage({ tintColor: tintColor ?? colors.text });
74
50
  } else {
75
51
  return (
76
52
  <Image
77
53
  style={[
78
54
  styles.icon,
79
55
  direction === 'rtl' && styles.flip,
80
- Boolean(labelVisible) && styles.iconWithLabel,
56
+ displayMode !== 'minimal' && styles.iconWithLabel,
81
57
  Boolean(tintColor) && { tintColor },
82
58
  ]}
83
59
  resizeMode="contain"
84
- source={require('../assets/back-icon.png')}
60
+ source={backIcon}
85
61
  fadeDuration={0}
86
62
  />
87
63
  );
@@ -89,32 +65,74 @@ export function HeaderBackButton({
89
65
  };
90
66
 
91
67
  const renderLabel = () => {
92
- const leftLabelText = shouldTruncateLabel() ? truncatedLabel : label;
93
-
94
- if (!labelVisible || leftLabelText === undefined) {
68
+ if (displayMode === 'minimal') {
95
69
  return null;
96
70
  }
97
71
 
72
+ const availableSpace =
73
+ titleLayout && screenLayout
74
+ ? (screenLayout.width - titleLayout.width) / 2 -
75
+ (ICON_WIDTH + ICON_MARGIN_START)
76
+ : null;
77
+
78
+ const potentialLabelText =
79
+ displayMode === 'default' ? label : truncatedLabel;
80
+ const finalLabelText =
81
+ availableSpace && labelWidth && truncatedLabelWidth
82
+ ? availableSpace > labelWidth
83
+ ? potentialLabelText
84
+ : availableSpace > truncatedLabelWidth
85
+ ? truncatedLabel
86
+ : null
87
+ : potentialLabelText;
88
+
89
+ const commonStyle: Animated.WithAnimatedValue<StyleProp<TextStyle>> = [
90
+ fonts.regular,
91
+ styles.label,
92
+ labelStyle,
93
+ ];
94
+
95
+ const hiddenStyle: Animated.WithAnimatedValue<StyleProp<TextStyle>> = [
96
+ commonStyle,
97
+ {
98
+ position: 'absolute',
99
+ top: 0,
100
+ left: 0,
101
+ opacity: 0,
102
+ },
103
+ ];
104
+
98
105
  const labelElement = (
99
106
  <View style={styles.labelWrapper}>
100
- <Animated.Text
101
- accessible={false}
102
- onLayout={
103
- // This measurement is used to determine if we should truncate the label when it doesn't fit
104
- // Only measure it when label is not truncated because we want the measurement of full label
105
- leftLabelText === label ? handleLabelLayout : undefined
106
- }
107
- style={[
108
- tintColor ? { color: tintColor } : null,
109
- fonts.regular,
110
- styles.label,
111
- labelStyle,
112
- ]}
113
- numberOfLines={1}
114
- allowFontScaling={!!allowFontScaling}
115
- >
116
- {leftLabelText}
117
- </Animated.Text>
107
+ {label && displayMode === 'default' ? (
108
+ <Animated.Text
109
+ style={hiddenStyle}
110
+ numberOfLines={1}
111
+ onLayout={(e) => setLabelWidth(e.nativeEvent.layout.width)}
112
+ >
113
+ {label}
114
+ </Animated.Text>
115
+ ) : null}
116
+ {truncatedLabel ? (
117
+ <Animated.Text
118
+ style={hiddenStyle}
119
+ numberOfLines={1}
120
+ onLayout={(e) => setTruncatedLabelWidth(e.nativeEvent.layout.width)}
121
+ >
122
+ {truncatedLabel}
123
+ </Animated.Text>
124
+ ) : null}
125
+ {finalLabelText ? (
126
+ <Animated.Text
127
+ accessible={false}
128
+ onLayout={onLabelLayout}
129
+ style={[tintColor ? { color: tintColor } : null, commonStyle]}
130
+ numberOfLines={1}
131
+ allowFontScaling={!!allowFontScaling}
132
+ >
133
+ {finalLabelText}
134
+ </Animated.Text>
135
+ ) : null}
118
136
  </View>
119
137
  );
120
138
 
@@ -135,7 +153,7 @@ export function HeaderBackButton({
135
153
  ]}
136
154
  >
137
155
  <Image
138
- source={require('../assets/back-icon-mask.png')}
156
+ source={backIconMask}
139
157
  resizeMode="contain"
140
158
  style={[styles.iconMask, direction === 'rtl' && styles.flip]}
141
159
  />
@@ -173,6 +191,12 @@ export function HeaderBackButton({
173
191
  );
174
192
  }
175
193
 
194
+ const ICON_WIDTH = Platform.OS === 'ios' ? 13 : 24;
195
+ const ICON_HEIGHT = Platform.OS === 'ios' ? 21 : 24;
196
+ const ICON_MARGIN_START = Platform.OS === 'ios' ? 8 : 3;
197
+ const ICON_MARGIN_END = Platform.OS === 'ios' ? 22 : 3;
198
+ const ICON_MARGIN_VERTICAL = Platform.OS === 'ios' ? 8 : 3;
199
+
176
200
  const styles = StyleSheet.create({
177
201
  container: {
178
202
  paddingHorizontal: 0,
@@ -201,20 +225,13 @@ const styles = StyleSheet.create({
201
225
  default: { marginEnd: 3 },
202
226
  }),
203
227
  },
204
- icon: Platform.select({
205
- ios: {
206
- height: 21,
207
- width: 13,
208
- marginStart: 8,
209
- marginEnd: 22,
210
- marginVertical: 8,
211
- },
212
- default: {
213
- height: 24,
214
- width: 24,
215
- margin: 3,
216
- },
217
- }),
228
+ icon: {
229
+ height: ICON_HEIGHT,
230
+ width: ICON_WIDTH,
231
+ marginStart: ICON_MARGIN_START,
232
+ marginEnd: ICON_MARGIN_END,
233
+ marginVertical: ICON_MARGIN_VERTICAL,
234
+ },
218
235
  iconWithLabel:
219
236
  Platform.OS === 'ios'
220
237
  ? {
@@ -15,7 +15,7 @@ type Props = Omit<ViewProps, 'style'> & {
15
15
  };
16
16
 
17
17
  export function HeaderBackground({ style, ...rest }: Props) {
18
- const { colors } = useTheme();
18
+ const { colors, dark } = useTheme();
19
19
 
20
20
  return (
21
21
  <Animated.View
@@ -24,7 +24,7 @@ export function HeaderBackground({ style, ...rest }: Props) {
24
24
  {
25
25
  backgroundColor: colors.card,
26
26
  borderBottomColor: colors.border,
27
- shadowColor: colors.border,
27
+ shadowColor: dark ? 'rgba(255, 255, 255, 0.45)' : 'rgba(0, 0, 0, 1)',
28
28
  },
29
29
  style,
30
30
  ]}
@@ -41,7 +41,7 @@ const styles = StyleSheet.create({
41
41
  elevation: 4,
42
42
  },
43
43
  ios: {
44
- shadowOpacity: 0.85,
44
+ shadowOpacity: 0.3,
45
45
  shadowRadius: 0,
46
46
  shadowOffset: {
47
47
  width: 0,
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { Platform, StyleSheet } from 'react-native';
3
2
 
4
3
  import { PlatformPressable } from '../PlatformPressable';
@@ -1,5 +1,4 @@
1
1
  import { useTheme } from '@react-navigation/native';
2
- import * as React from 'react';
3
2
  import {
4
3
  Animated,
5
4
  Platform,
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import {
3
2
  type StyleProp,
4
3
  StyleSheet,
@@ -1,7 +1,6 @@
1
- // TODO
2
- // @ts-expect-error: investigate why TypeScript errors here
3
- import * as React from 'react';
4
- import { type StyleProp, StyleSheet, Text, type TextStyle } from 'react-native';
1
+ import { type StyleProp, StyleSheet, type TextStyle } from 'react-native';
2
+
3
+ import { Text } from './Text';
5
4
 
6
5
  type Props = {
7
6
  color?: string;
@@ -11,9 +11,16 @@ import {
11
11
  type ViewStyle,
12
12
  } from 'react-native';
13
13
 
14
+ type HoverEffectProps = {
15
+ color?: string;
16
+ hoverOpacity?: number;
17
+ activeOpacity?: number;
18
+ };
19
+
14
20
  export type Props = Omit<PressableProps, 'style'> & {
15
21
  pressColor?: string;
16
22
  pressOpacity?: number;
23
+ hoverEffect?: HoverEffectProps;
17
24
  style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
18
25
  href?: string;
19
26
  children: React.ReactNode;
@@ -36,7 +43,9 @@ export function PlatformPressable({
36
43
  android_ripple,
37
44
  pressColor,
38
45
  pressOpacity = 0.3,
46
+ hoverEffect,
39
47
  style,
48
+ children,
40
49
  ...rest
41
50
  }: Props) {
42
51
  const { dark } = useTheme();
@@ -115,6 +124,61 @@ export function PlatformPressable({
115
124
  style,
116
125
  ]}
117
126
  {...rest}
118
- />
127
+ >
128
+ <HoverEffect {...hoverEffect} />
129
+ {children}
130
+ </AnimatedPressable>
119
131
  );
120
132
  }
133
+
134
+ const css = String.raw;
135
+
136
+ const CLASS_NAME = `__react-navigation_elements_Pressable_hover`;
137
+
138
+ const CSS_TEXT = css`
139
+ .${CLASS_NAME} {
140
+ position: absolute;
141
+ top: 0;
142
+ left: 0;
143
+ right: 0;
144
+ bottom: 0;
145
+ border-radius: inherit;
146
+ background-color: var(--overlay-color);
147
+ opacity: 0;
148
+ transition: opacity 0.15s;
149
+ }
150
+
151
+ a:hover > .${CLASS_NAME}, button:hover > .${CLASS_NAME} {
152
+ opacity: var(--overlay-hover-opacity);
153
+ }
154
+
155
+ a:active > .${CLASS_NAME}, button:active > .${CLASS_NAME} {
156
+ opacity: var(--overlay-active-opacity);
157
+ }
158
+ `;
159
+
160
+ const HoverEffect = ({
161
+ color,
162
+ hoverOpacity = 0.08,
163
+ activeOpacity = 0.16,
164
+ }: HoverEffectProps) => {
165
+ if (Platform.OS !== 'web' || color == null) {
166
+ return null;
167
+ }
168
+
169
+ return (
170
+ <>
171
+ {/* eslint-disable-next-line @eslint-react/dom/no-dangerously-set-innerhtml */}
172
+ <style dangerouslySetInnerHTML={{ __html: CSS_TEXT }} />
173
+ <div
174
+ className={CLASS_NAME}
175
+ style={{
176
+ // @ts-expect-error: CSS variables are not typed
177
+ '--overlay-color': color,
178
+ '--overlay-hover-opacity': hoverOpacity,
179
+ '--overlay-active-opacity': activeOpacity,
180
+ }}
181
+ />
182
+ </>
183
+ );
184
+ };
@@ -77,6 +77,7 @@ const SafeAreaFrameProvider = ({
77
77
 
78
78
  const rect = element.current.getBoundingClientRect();
79
79
 
80
+ // eslint-disable-next-line @eslint-react/hooks-extra/no-direct-set-state-in-use-effect
80
81
  setFrame({
81
82
  x: rect.x,
82
83
  y: rect.y,
package/src/Screen.tsx CHANGED
@@ -49,6 +49,7 @@ export function Screen(props: Props) {
49
49
  header,
50
50
  headerShown = true,
51
51
  headerTransparent,
52
+ // eslint-disable-next-line @eslint-react/no-unstable-default-props
52
53
  headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top,
53
54
  navigation,
54
55
  route,
package/src/Text.tsx CHANGED
@@ -1,7 +1,5 @@
1
1
  import { useTheme } from '@react-navigation/native';
2
- // TODO
3
- // @ts-expect-error: investigate why TypeScript errors here
4
- import * as React from 'react';
2
+ // eslint-disable-next-line no-restricted-imports
5
3
  import { Text as NativeText, type TextProps } from 'react-native';
6
4
 
7
5
  export function Text({ style, ...rest }: TextProps) {
package/src/index.tsx CHANGED
@@ -1,3 +1,6 @@
1
+ import backIcon from './assets/back-icon.png';
2
+ import backIconMask from './assets/back-icon-mask.png';
3
+
1
4
  export { Background } from './Background';
2
5
  export { Button } from './Button';
3
6
  export { getDefaultSidebarWidth } from './getDefaultSidebarWidth';
@@ -21,11 +24,6 @@ export { SafeAreaProviderCompat } from './SafeAreaProviderCompat';
21
24
  export { Screen } from './Screen';
22
25
  export { Text } from './Text';
23
26
 
24
- export const Assets = [
25
- // eslint-disable-next-line import/no-commonjs
26
- require('./assets/back-icon.png'),
27
- // eslint-disable-next-line import/no-commonjs
28
- require('./assets/back-icon-mask.png'),
29
- ];
27
+ export const Assets = [backIcon, backIconMask];
30
28
 
31
29
  export * from './types';
package/src/types.tsx CHANGED
@@ -6,6 +6,8 @@ import type {
6
6
  ViewStyle,
7
7
  } from 'react-native';
8
8
 
9
+ export type HeaderBackButtonDisplayMode = 'default' | 'generic' | 'minimal';
10
+
9
11
  export type Layout = { width: number; height: number };
10
12
 
11
13
  export type HeaderOptions = {
@@ -41,13 +43,20 @@ export type HeaderOptions = {
41
43
  tintColor?: string;
42
44
  pressColor?: string;
43
45
  pressOpacity?: number;
44
- labelVisible?: boolean;
46
+ displayMode?: HeaderBackButtonDisplayMode;
45
47
  href?: undefined;
46
48
  }) => React.ReactNode;
47
49
  /**
48
- * Whether a label is visible in the left button. Used to add extra padding.
50
+ * How the back button displays icon and title.
51
+ *
52
+ * Supported values:
53
+ * - "default" - Displays one of the following depending on the available space: previous screen's title, truncated title (e.g. 'Back') or no title (only icon).
54
+ * - "generic" – Displays one of the following depending on the available space: truncated title (e.g. 'Back') or no title (only icon).
55
+ * - "minimal" – Always displays only the icon without a title.
56
+ *
57
+ * Defaults to "default" on iOS, and "minimal" on Android.
49
58
  */
50
- headerLeftLabelVisible?: boolean;
59
+ headerBackButtonDisplayMode?: HeaderBackButtonDisplayMode;
51
60
  /**
52
61
  * Style object for the container of the `headerLeft` element`.
53
62
  */
@@ -209,7 +218,7 @@ export type HeaderBackButtonProps = Omit<HeaderButtonProps, 'children'> & {
209
218
  * Whether the label text is visible.
210
219
  * Defaults to `true` on iOS and `false` on Android.
211
220
  */
212
- labelVisible?: boolean;
221
+ displayMode?: HeaderBackButtonDisplayMode;
213
222
  /**
214
223
  * Style object for the label.
215
224
  */
@@ -1 +0,0 @@
1
- {"version":3,"file":"Background.d.ts","sourceRoot":"","sources":["../../../src/Background.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EACR,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,KAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG;IACtC,KAAK,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IACzD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,qBASnD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAEL,KAAK,KAAK,IAAI,sBAAsB,EACrC,MAAM,qBAAqB,CAAC;AAG7B,KAAK,eAAe,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,GAAG;IAChE,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC7B,CAAC;AAEF,KAAK,eAAe,CAAC,SAAS,SAAS,eAAe,CAAC,aAAa,IAClE,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;AAI1D,wBAAgB,MAAM,CAAC,SAAS,SAAS,eAAe,CAAC,aAAa,EACpE,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,GAChC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;AAErB,wBAAgB,MAAM,CAAC,KAAK,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/Header/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAStD,KAAK,KAAK,GAAG,aAAa,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAkBF,wBAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,qBA6PlC"}
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import type { HeaderBackButtonProps } from '../types';
3
- export declare function HeaderBackButton({ disabled, allowFontScaling, backImage, label, labelStyle, labelVisible, onLabelLayout, onPress, pressColor, pressOpacity, screenLayout, tintColor: customTintColor, titleLayout, truncatedLabel, accessibilityLabel, testID, style, href, }: HeaderBackButtonProps): React.JSX.Element;
4
- //# sourceMappingURL=HeaderBackButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderBackButton.d.ts","sourceRoot":"","sources":["../../../../src/Header/HeaderBackButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGtD,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,UAAU,EACV,YAAoC,EACpC,aAAa,EACb,OAAO,EACP,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,SAAS,EAAE,eAAe,EAC1B,WAAW,EACX,cAAuB,EACvB,kBAA6E,EAC7E,MAAM,EACN,KAAK,EACL,IAAI,GACL,EAAE,qBAAqB,qBA2IvB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderBackContext.d.ts","sourceRoot":"","sources":["../../../../src/Header/HeaderBackContext.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;WACnB,MAAM,GAAG,SAAS;UAAQ,MAAM,GAAG,SAAS;cACtB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderBackground.d.ts","sourceRoot":"","sources":["../../../../src/Header/HeaderBackground.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EAER,KAAK,SAAS,EAEd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,KAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG;IACtC,KAAK,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IACzD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,qBAiBzD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderButton.d.ts","sourceRoot":"","sources":["../../../../src/Header/HeaderButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,OAAO,EACP,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,MAAM,EACN,KAAK,EACL,IAAI,EACJ,QAAQ,GACT,EAAE,iBAAiB,qBAoBnB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderHeightContext.d.ts","sourceRoot":"","sources":["../../../../src/Header/HeaderHeightContext.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,6CAG/B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderShownContext.d.ts","sourceRoot":"","sources":["../../../../src/Header/HeaderShownContext.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,kCAA+C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderTitle.d.ts","sourceRoot":"","sources":["../../../../src/Header/HeaderTitle.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EAER,KAAK,SAAS,EAEd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,KAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;CAC1D,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,qBAiB/D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDefaultHeaderHeight.d.ts","sourceRoot":"","sources":["../../../../src/Header/getDefaultHeaderHeight.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,OAAO,EAC1B,QAAQ,EAAE,MAAM,GACf,MAAM,CAkCR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getHeaderTitle.d.ts","sourceRoot":"","sources":["../../../../src/Header/getHeaderTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,wBAAgB,cAAc,CAC5B,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;CAAE,EACvE,QAAQ,EAAE,MAAM,GACf,MAAM,CAMR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useHeaderHeight.d.ts","sourceRoot":"","sources":["../../../../src/Header/useHeaderHeight.tsx"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,WAU9B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../src/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,KAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEF,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,qBAQzD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getLabel.d.ts","sourceRoot":"","sources":["../../../../src/Label/getLabel.tsx"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CACtB,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3C,QAAQ,EAAE,MAAM,GACf,MAAM,CAMR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MaskedView.android.d.ts","sourceRoot":"","sources":["../../../src/MaskedView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MaskedView.d.ts","sourceRoot":"","sources":["../../../src/MaskedView.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,KAAK,KAAK,GAAG;IACX,WAAW,EAAE,KAAK,CAAC,YAAY,CAAC;IAChC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;CAC9B,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,sEAE7C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MaskedView.ios.d.ts","sourceRoot":"","sources":["../../../src/MaskedView.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MaskedViewNative.d.ts","sourceRoot":"","sources":["../../../src/MaskedViewNative.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,cAAc,GACjB,cAAc,uCAAuC,EAAE,OAAO,CAAC;AAEjE,KAAK,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IAClD,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;CAC9B,CAAC;AAgBF,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,qBAMtD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"MissingIcon.d.ts","sourceRoot":"","sources":["../../../src/MissingIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,SAAS,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,qBAExD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"PlatformPressable.d.ts","sourceRoot":"","sources":["../../../src/PlatformPressable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EAKR,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,GAAG;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAQF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,cAAc,EACd,UAAU,EACV,YAAkB,EAClB,KAAK,EACL,GAAG,IAAI,EACR,EAAE,KAAK,qBA+EP"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResourceSavingView.d.ts","sourceRoot":"","sources":["../../../src/ResourceSavingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,SAAS,EAGd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAIF,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,QAAQ,EACR,KAAK,EACL,GAAG,IAAI,EACR,EAAE,KAAK,qBAuCP"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SafeAreaProviderCompat.d.ts","sourceRoot":"","sources":["../../../src/SafeAreaProviderCompat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,KAAK,SAAS,EAGd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,KAAK,OAAO,EAIb,MAAM,gCAAgC,CAAC;AAExC,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAeF,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,qBAuBhE;yBAvBe,sBAAsB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../src/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EACR,KAAK,SAAS,EAGd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAWtB,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,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IACzD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,qBA8DlC"}
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import { type TextProps } from 'react-native';
3
- export declare function Text({ style, ...rest }: TextProps): React.JSX.Element;
4
- //# sourceMappingURL=Text.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/Text.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAElE,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,qBASjD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDefaultSidebarWidth.d.ts","sourceRoot":"","sources":["../../../src/getDefaultSidebarWidth.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,cAAe;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,WAWlE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getNamedContext.d.ts","sourceRoot":"","sources":["../../../src/getNamedContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,qCAAqC,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;CAC5E;AAMD,wBAAgB,eAAe,CAAC,CAAC,EAC/B,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,CAAC,GACd,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAalB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MA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