expo-router 58.0.10 → 58.0.12
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/android/build.gradle +2 -2
- package/build/fork/native-stack/createNativeStackNavigator.js +29 -1
- package/build/fork/native-stack/createNativeStackNavigator.js.map +1 -1
- package/build/global-state/getRouteInfoFromState.js +74 -38
- package/build/global-state/getRouteInfoFromState.js.map +1 -1
- package/build/layouts/stack-router.js +1 -2
- package/build/layouts/stack-router.js.map +1 -1
- package/build/link/linking.js +8 -1
- package/build/link/linking.js.map +1 -1
- package/build/native-tabs/NativeTabsView.js +1 -1
- package/build/native-tabs/common/elements.d.ts +5 -4
- package/build/native-tabs/common/elements.js.map +1 -1
- package/build/native-tabs/utils/optionsIconConverter.ios.js +16 -6
- package/build/native-tabs/utils/optionsIconConverter.ios.js.map +1 -1
- package/build/react-navigation/elements/useFrameSize.js +3 -0
- package/build/react-navigation/elements/useFrameSize.js.map +1 -1
- package/build/react-navigation/native-stack/types.d.ts +9 -0
- package/build/react-navigation/native-stack/views/useHeaderConfigProps.d.ts +1 -1
- package/build/react-navigation/native-stack/views/useHeaderConfigProps.js +2 -2
- package/build/react-navigation/native-stack/views/useHeaderConfigProps.js.map +1 -1
- package/build/testing-library/index.d.ts +11 -15
- package/build/testing-library/index.js +15 -39
- package/build/testing-library/index.js.map +1 -1
- package/build/useScreens.js +2 -8
- package/build/useScreens.js.map +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.10/expo.modules.router-58.0.10.module → 58.0.12/expo.modules.router-58.0.12.module} +7 -7
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.12/expo.modules.router-58.0.12.module.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.12/expo.modules.router-58.0.12.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.12/expo.modules.router-58.0.12.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.12/expo.modules.router-58.0.12.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.10/expo.modules.router-58.0.10.pom → 58.0.12/expo.modules.router-58.0.12.pom} +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.12/expo.modules.router-58.0.12.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.12/expo.modules.router-58.0.12.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.12/expo.modules.router-58.0.12.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.12/expo.modules.router-58.0.12.pom.sha512 +1 -0
- package/package.json +10 -11
- package/build/import-mode/index.d.ts +0 -2
- package/build/import-mode/index.js +0 -13
- package/build/import-mode/index.js.map +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.10/expo.modules.router-58.0.10.module.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.10/expo.modules.router-58.0.10.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.10/expo.modules.router-58.0.10.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.10/expo.modules.router-58.0.10.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.10/expo.modules.router-58.0.10.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.10/expo.modules.router-58.0.10.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.10/expo.modules.router-58.0.10.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.10/expo.modules.router-58.0.10.pom.sha512 +0 -1
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.10/expo.modules.router-58.0.10-sources.jar → 58.0.12/expo.modules.router-58.0.12-sources.jar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.10/expo.modules.router-58.0.10-sources.jar.md5 → 58.0.12/expo.modules.router-58.0.12-sources.jar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.10/expo.modules.router-58.0.10-sources.jar.sha1 → 58.0.12/expo.modules.router-58.0.12-sources.jar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.10/expo.modules.router-58.0.10-sources.jar.sha256 → 58.0.12/expo.modules.router-58.0.12-sources.jar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.10/expo.modules.router-58.0.10-sources.jar.sha512 → 58.0.12/expo.modules.router-58.0.12-sources.jar.sha512} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.10/expo.modules.router-58.0.10.aar → 58.0.12/expo.modules.router-58.0.12.aar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.10/expo.modules.router-58.0.10.aar.md5 → 58.0.12/expo.modules.router-58.0.12.aar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.10/expo.modules.router-58.0.10.aar.sha1 → 58.0.12/expo.modules.router-58.0.12.aar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.10/expo.modules.router-58.0.10.aar.sha256 → 58.0.12/expo.modules.router-58.0.12.aar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.10/expo.modules.router-58.0.10.aar.sha512 → 58.0.12/expo.modules.router-58.0.12.aar.sha512} +0 -0
package/android/build.gradle
CHANGED
|
@@ -4,13 +4,13 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'expo.modules.router'
|
|
7
|
-
version = '58.0.
|
|
7
|
+
version = '58.0.12'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.router"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 1
|
|
13
|
-
versionName "58.0.
|
|
13
|
+
versionName "58.0.12"
|
|
14
14
|
}
|
|
15
15
|
lintOptions {
|
|
16
16
|
abortOnError false
|
|
@@ -136,13 +136,41 @@ function NativeStackNavigatorContent({ state, descriptors, emitter, isPreloaded,
|
|
|
136
136
|
computedState,
|
|
137
137
|
registry
|
|
138
138
|
]);
|
|
139
|
+
// Native can push a preloaded screen on its own (link preview commit), so it must not animate.
|
|
140
|
+
// The screen gets its animation back when JS pushes it, which also keeps the pop animated.
|
|
141
|
+
const stackDescriptors = _react().useMemo(()=>{
|
|
142
|
+
const preloadedKeys = computedState.routes.map((route)=>route.key).filter(isComputedRoutePreloaded);
|
|
143
|
+
if (preloadedKeys.length === 0) {
|
|
144
|
+
return mergedDescriptors;
|
|
145
|
+
}
|
|
146
|
+
const result = {
|
|
147
|
+
...mergedDescriptors
|
|
148
|
+
};
|
|
149
|
+
for (const key of preloadedKeys){
|
|
150
|
+
const descriptor = result[key];
|
|
151
|
+
if (descriptor) {
|
|
152
|
+
result[key] = {
|
|
153
|
+
...descriptor,
|
|
154
|
+
options: {
|
|
155
|
+
...descriptor.options,
|
|
156
|
+
animation: 'none'
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return result;
|
|
162
|
+
}, [
|
|
163
|
+
mergedDescriptors,
|
|
164
|
+
computedState,
|
|
165
|
+
isComputedRoutePreloaded
|
|
166
|
+
]);
|
|
139
167
|
return /*#__PURE__*/ (0, _jsxruntime().jsx)(_descriptorscontext.DescriptorsContext, {
|
|
140
168
|
value: fullDescriptors,
|
|
141
169
|
children: /*#__PURE__*/ (0, _jsxruntime().jsx)(_compositionoptions.CompositionContext, {
|
|
142
170
|
value: contextValue,
|
|
143
171
|
children: /*#__PURE__*/ (0, _jsxruntime().jsx)(_nativestack.NativeStackView, {
|
|
144
172
|
state: computedState,
|
|
145
|
-
descriptors:
|
|
173
|
+
descriptors: stackDescriptors,
|
|
146
174
|
emit: emit,
|
|
147
175
|
isPreloaded: isComputedRoutePreloaded,
|
|
148
176
|
isRemovalPrevented: isRemovalPrevented,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["fork/native-stack/createNativeStackNavigator.tsx"],"sourcesContent":[null],"names":["createStandardNativeStackNavigator","GLASS","isLiquidGlassAvailable","NativeStackNavigatorContent","state","descriptors","emitter","isPreloaded","isRemovalPrevented","pop","removeRoutes","subscribePopToTopOnParentTabPress","unstable_nativeProps","fullDescriptors","computedState","emit","isComputedRoutePreloaded","usePreviewTransition","useClearGuardedRoutes","React","useEffect","finalDescriptors","useMemo","needsNewMap","result","key","Object","keys","descriptor","options","internalGestureEnabled","INTERNAL_EXPO_ROUTER_GESTURE_ENABLED_OPTION_NAME","needsGestureFix","undefined","needsGlassFix","presentation","newOptions","gestureEnabled","headerTransparent","contentStyle","backgroundColor","headerShadowVisible","headerLargeTitleShadowVisible","registry","contextValue","useCompositionRegistry","mergedDescriptors","mergeOptions","DescriptorsContext","value","CompositionContext","NativeStackView","createStandardNavigator"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["fork/native-stack/createNativeStackNavigator.tsx"],"sourcesContent":[null],"names":["createStandardNativeStackNavigator","GLASS","isLiquidGlassAvailable","NativeStackNavigatorContent","state","descriptors","emitter","isPreloaded","isRemovalPrevented","pop","removeRoutes","subscribePopToTopOnParentTabPress","unstable_nativeProps","fullDescriptors","computedState","emit","isComputedRoutePreloaded","usePreviewTransition","useClearGuardedRoutes","React","useEffect","finalDescriptors","useMemo","needsNewMap","result","key","Object","keys","descriptor","options","internalGestureEnabled","INTERNAL_EXPO_ROUTER_GESTURE_ENABLED_OPTION_NAME","needsGestureFix","undefined","needsGlassFix","presentation","newOptions","gestureEnabled","headerTransparent","contentStyle","backgroundColor","headerShadowVisible","headerLargeTitleShadowVisible","registry","contextValue","useCompositionRegistry","mergedDescriptors","mergeOptions","stackDescriptors","preloadedKeys","routes","map","route","filter","length","animation","DescriptorsContext","value","CompositionContext","NativeStackView","create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pBC,KAAKA;gBACLG,sBAAsBA;;;;AAKhC;AAEO,MAAMZ,qCAAqC4D,IAAAA,6CAAuB,EAIvEzD"}
|
|
@@ -56,9 +56,8 @@ function areUrlObjectsEqual(a, b) {
|
|
|
56
56
|
}
|
|
57
57
|
function getRouteInfoFromState(state) {
|
|
58
58
|
if (!state) return defaultRouteInfo;
|
|
59
|
-
// TODO(@kitten): Review edge-case type safety
|
|
60
59
|
const index = 'index' in state ? state.index ?? 0 : 0;
|
|
61
|
-
|
|
60
|
+
const route = state.routes[index];
|
|
62
61
|
(0, _navigationParams.warnIfNestedParams)(route.params);
|
|
63
62
|
if (route.name === _constants.NOT_FOUND_ROUTE_NAME || route.name === _constants.SITEMAP_ROUTE_NAME) {
|
|
64
63
|
const path = route.path || (route.name === _constants.NOT_FOUND_ROUTE_NAME ? '/' : `/${route.name}`);
|
|
@@ -75,11 +74,28 @@ function getRouteInfoFromState(state) {
|
|
|
75
74
|
if (route.name !== _constants.INTERNAL_SLOT_NAME) {
|
|
76
75
|
throw new Error(`Expected the first route to be ${_constants.INTERNAL_SLOT_NAME}, but got ${route.name}`);
|
|
77
76
|
}
|
|
78
|
-
|
|
77
|
+
const { segments, params: mergedParams } = collectRouteState(route.state);
|
|
78
|
+
const params = decodeParams(mergedParams);
|
|
79
|
+
const { pathname, pathParams } = resolvePathname(segments, params);
|
|
80
|
+
const { searchParams, pathnameWithParams } = serializeQueryAndHash(pathname, params, pathParams);
|
|
81
|
+
return {
|
|
82
|
+
segments,
|
|
83
|
+
pathname,
|
|
84
|
+
// Navigation params can contain ordinary object values at runtime despite the public search-param type.
|
|
85
|
+
// TODO: address this together with other params serialization issues
|
|
86
|
+
params: params,
|
|
87
|
+
unstable_globalHref: (0, _getPathFromStateforks.appendBaseUrl)(pathnameWithParams),
|
|
88
|
+
searchParams,
|
|
89
|
+
pathnameWithParams,
|
|
90
|
+
// TODO: Remove this, it is not used anywhere
|
|
91
|
+
isIndex: false
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function collectRouteState(state) {
|
|
79
95
|
const segments = [];
|
|
80
|
-
|
|
96
|
+
const params = Object.create(null);
|
|
81
97
|
while(state){
|
|
82
|
-
route = state.routes['index' in state && state.index ? state.index : 0];
|
|
98
|
+
const route = state.routes['index' in state && state.index ? state.index : 0];
|
|
83
99
|
(0, _navigationParams.warnIfNestedParams)(route.params);
|
|
84
100
|
Object.assign(params, route.params);
|
|
85
101
|
let routeName = route.name;
|
|
@@ -89,7 +105,16 @@ function getRouteInfoFromState(state) {
|
|
|
89
105
|
segments.push(...routeName.split('/'));
|
|
90
106
|
state = route.state;
|
|
91
107
|
}
|
|
92
|
-
|
|
108
|
+
if (segments[segments.length - 1] === 'index') {
|
|
109
|
+
segments.pop();
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
segments,
|
|
113
|
+
params
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function decodeParams(params) {
|
|
117
|
+
return Object.fromEntries(Object.entries(params).map(([key, value])=>{
|
|
93
118
|
if (typeof value === 'string') {
|
|
94
119
|
return [
|
|
95
120
|
key,
|
|
@@ -107,25 +132,29 @@ function getRouteInfoFromState(state) {
|
|
|
107
132
|
];
|
|
108
133
|
}
|
|
109
134
|
}));
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
const pathParams = new Set();
|
|
114
|
-
const pathname = '/' + segments.filter((segment)=>{
|
|
115
|
-
return !(segment.startsWith('(') && segment.endsWith(')'));
|
|
116
|
-
}).flatMap((segment)=>{
|
|
135
|
+
}
|
|
136
|
+
function resolvePathname(segments, params) {
|
|
137
|
+
const resolvedSegments = segments.filter((segment)=>!(segment.startsWith('(') && segment.endsWith(')'))).map((segment)=>{
|
|
117
138
|
if (segment === '+not-found') {
|
|
118
139
|
const notFoundPath = params['not-found'];
|
|
119
|
-
pathParams.add('not-found');
|
|
120
140
|
if (typeof notFoundPath === 'undefined') {
|
|
121
141
|
// Not founds are optional, do nothing if its not present
|
|
122
|
-
return
|
|
142
|
+
return {
|
|
143
|
+
parts: [],
|
|
144
|
+
paramName: 'not-found'
|
|
145
|
+
};
|
|
123
146
|
} else if (Array.isArray(notFoundPath)) {
|
|
124
|
-
return
|
|
147
|
+
return {
|
|
148
|
+
parts: notFoundPath.map(String),
|
|
149
|
+
paramName: 'not-found'
|
|
150
|
+
};
|
|
125
151
|
} else {
|
|
126
|
-
return
|
|
127
|
-
|
|
128
|
-
|
|
152
|
+
return {
|
|
153
|
+
parts: [
|
|
154
|
+
String(notFoundPath)
|
|
155
|
+
],
|
|
156
|
+
paramName: 'not-found'
|
|
157
|
+
};
|
|
129
158
|
}
|
|
130
159
|
} else if (segment.startsWith('[...') && segment.endsWith(']')) {
|
|
131
160
|
let paramName = segment.slice(4, -1);
|
|
@@ -134,25 +163,40 @@ function getRouteInfoFromState(state) {
|
|
|
134
163
|
paramName = paramName.slice(0, -1);
|
|
135
164
|
}
|
|
136
165
|
const values = params[paramName];
|
|
137
|
-
pathParams.add(paramName);
|
|
138
166
|
// Catchall params are optional
|
|
139
|
-
|
|
167
|
+
const parts = Array.isArray(values) ? values.filter(isSerializableParam).map(String) : isSerializableParam(values) && values ? [
|
|
140
168
|
String(values)
|
|
141
169
|
] : [];
|
|
170
|
+
return {
|
|
171
|
+
parts,
|
|
172
|
+
paramName
|
|
173
|
+
};
|
|
142
174
|
} else if (segment.startsWith('[') && segment.endsWith(']')) {
|
|
143
175
|
const paramName = segment.slice(1, -1);
|
|
144
176
|
const value = params[paramName];
|
|
145
|
-
pathParams.add(paramName);
|
|
146
177
|
// Optional params are optional
|
|
147
|
-
return
|
|
148
|
-
|
|
149
|
-
|
|
178
|
+
return {
|
|
179
|
+
parts: isSerializableParam(value) && value ? [
|
|
180
|
+
String(value)
|
|
181
|
+
] : [],
|
|
182
|
+
paramName
|
|
183
|
+
};
|
|
150
184
|
} else {
|
|
151
|
-
return
|
|
152
|
-
|
|
153
|
-
|
|
185
|
+
return {
|
|
186
|
+
parts: [
|
|
187
|
+
segment
|
|
188
|
+
]
|
|
189
|
+
};
|
|
154
190
|
}
|
|
155
|
-
})
|
|
191
|
+
});
|
|
192
|
+
const pathname = '/' + resolvedSegments.flatMap(({ parts })=>parts).join('/');
|
|
193
|
+
const pathParams = new Set(resolvedSegments.map(({ paramName })=>paramName).filter((paramName)=>paramName !== undefined));
|
|
194
|
+
return {
|
|
195
|
+
pathname,
|
|
196
|
+
pathParams
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
function serializeQueryAndHash(pathname, params, pathParams) {
|
|
156
200
|
const searchParams = new URLSearchParams(Object.entries(params).flatMap(([key, value])=>{
|
|
157
201
|
// Search params should not include path params
|
|
158
202
|
if (pathParams.has(key)) {
|
|
@@ -182,16 +226,8 @@ function getRouteInfoFromState(state) {
|
|
|
182
226
|
let pathnameWithParams = searchParamString ? pathname + '?' + searchParamString : pathname;
|
|
183
227
|
pathnameWithParams = hash ? pathnameWithParams + '#' + hash : pathnameWithParams;
|
|
184
228
|
return {
|
|
185
|
-
segments,
|
|
186
|
-
pathname,
|
|
187
|
-
// Navigation params can contain ordinary object values at runtime despite the public search-param type.
|
|
188
|
-
// TODO: address this together with other params serialization issues
|
|
189
|
-
params: params,
|
|
190
|
-
unstable_globalHref: (0, _getPathFromStateforks.appendBaseUrl)(pathnameWithParams),
|
|
191
229
|
searchParams,
|
|
192
|
-
pathnameWithParams
|
|
193
|
-
// TODO: Remove this, it is not used anywhere
|
|
194
|
-
isIndex: false
|
|
230
|
+
pathnameWithParams
|
|
195
231
|
};
|
|
196
232
|
}
|
|
197
233
|
function isSerializableParam(value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["global-state/getRouteInfoFromState.ts"],"sourcesContent":[null],"names":["areUrlObjectsEqual","defaultRouteInfo","getRouteInfoFromState","unstable_globalHref","searchParams","URLSearchParams","pathname","params","segments","pathnameWithParams","isIndex","a","b","isArrayEqual","isEqual","state","index","route","routes","warnIfNestedParams","name","NOT_FOUND_ROUTE_NAME","SITEMAP_ROUTE_NAME","path","appendBaseUrl","INTERNAL_SLOT_NAME","Error","Object","create","assign","routeName","startsWith","slice","push","split","fromEntries","entries","map","key","value","safeDecodeURIComponent","Array","isArray","v","
|
|
1
|
+
{"version":3,"sources":["global-state/getRouteInfoFromState.ts"],"sourcesContent":[null],"names":["areUrlObjectsEqual","defaultRouteInfo","getRouteInfoFromState","unstable_globalHref","searchParams","URLSearchParams","pathname","params","segments","pathnameWithParams","isIndex","a","b","isArrayEqual","isEqual","state","index","route","routes","warnIfNestedParams","name","NOT_FOUND_ROUTE_NAME","SITEMAP_ROUTE_NAME","path","appendBaseUrl","INTERNAL_SLOT_NAME","Error","mergedParams","collectRouteState","decodeParams","pathParams","resolvePathname","serializeQueryAndHash","Object","create","assign","routeName","startsWith","slice","push","split","length","pop","fromEntries","entries","map","key","value","safeDecodeURIComponent","Array","isArray","v","resolvedSegments","filter","segment","endsWith","notFoundPath","parts","paramName","String","values","isSerializableParam","flatMap","join","Set","undefined","has","hash","get","delete","searchParamString","toString"],"mappings":";;;;;;;;;;;;;;;;QA+BgBA;eAAAA;;QAXHC;eAAAA;;QAkCGC;eAAAA;;;;gEAtDI;;;;;;2BAEyD;uCAC/C;kCACK;8BACN;qBAEU;;;;;;AAahC,MAAMD,mBAA8B;IACzCE,qBAAqB;IACrBC,cAAc,IAAIC;IAClBC,UAAU;IACVC,QAAQ,CAAC;IACTC,UAAU,EAAE;IACZC,oBAAoB;IACpB,6CAA6C;IAC7CC,SAAS;AACX;AAEO,SAASV,mBAAmBW,CAAY,EAAEC,CAAY;IAC3D,OACED,EAAEL,QAAQ,KAAKM,EAAEN,QAAQ,IACzBK,EAAEF,kBAAkB,KAAKG,EAAEH,kBAAkB,IAC7CE,EAAER,mBAAmB,KAAKS,EAAET,mBAAmB,IAC/CU,IAAAA,0BAAY,EAACF,EAAEH,QAAQ,EAAEI,EAAEJ,QAAQ,KACnCM,IAAAA,2BAAO,EAACH,EAAEJ,MAAM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Override = (original)=>{
|
|
|
103
103
|
params: {
|
|
104
104
|
...action.type === 'NAVIGATE' && action.payload.merge ? previewRoute.params : {},
|
|
105
105
|
...action.payload.params,
|
|
106
|
-
[_navigationParams.INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME]: true
|
|
107
|
-
[_navigationParams.INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME]: true
|
|
106
|
+
[_navigationParams.INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME]: true
|
|
108
107
|
}
|
|
109
108
|
}, action);
|
|
110
109
|
actionResult = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["layouts/stack-router.ts"],"sourcesContent":[null],"names":["StackRouter","stackRouterOverride","isStackAction","action","type","getPreviewKey","payload","__internal__PreviewKey","undefined","getZoomTransitionIdFromAction","allParams","params","internalParams","getInternalExpoRouterParams","val","INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME","original","getStateForAction","state","options","ensureStateType","target","key","actionSingularOptions","singular","getIdFunction","name","actionName","getActionSingularIdFn","routeGetIdList","routeNames","includes","getId","id","activeRoutes","routes","slice","index","preloadedRoutes","previewKey","previewRoute","find","route","currentRoute","shouldCreateSingularRoute","getSingularId","actionResult","attachRouteState","path","merge","INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME","
|
|
1
|
+
{"version":3,"sources":["layouts/stack-router.ts"],"sourcesContent":[null],"names":["StackRouter","stackRouterOverride","isStackAction","action","type","getPreviewKey","payload","__internal__PreviewKey","undefined","getZoomTransitionIdFromAction","allParams","params","internalParams","getInternalExpoRouterParams","val","INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SOURCE_ID_PARAM_NAME","original","getStateForAction","state","options","ensureStateType","target","key","actionSingularOptions","singular","getIdFunction","name","actionName","getActionSingularIdFn","routeGetIdList","routeNames","includes","getId","id","activeRoutes","routes","slice","index","preloadedRoutes","previewKey","previewRoute","find","route","currentRoute","shouldCreateSingularRoute","getSingularId","actionResult","attachRouteState","path","merge","INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME","length","concat","filter","r","affectedRouteKey","minter","createRouteKeyMinter","mint","routeKeySeq","browserHistory","result","filteredState","filterSingular","getStackBrowserHistoryAction","zoomTransitionId","lastRoute","modifiedLastRoute","INTERNAL_EXPO_ROUTER_ZOOM_TRANSITION_SCREEN_ID_PARAM_NAME","map","affectedIndex","findIndex","preloadZoomTransitionId","affectedRoute","toSpliced","actionGetId","currentIndex","current","extendRouter","RNStackRouter","baseRouter"],"mappings":";;;;;;;;;;;;;;;QAmXaA;eAAAA;;QAjSAC;eAAAA;;;kCA5EN;wBAaA;6BAEsC;kCACZ;iCACD;2BACK;+BAEP;AAY9B,SAASC,cACPC,MAAwB;IAExB,OACEA,OAAOC,IAAI,KAAK,UAChBD,OAAOC,IAAI,KAAK,cAChBD,OAAOC,IAAI,KAAK,SAChBD,OAAOC,IAAI,KAAK,gBAChBD,OAAOC,IAAI,KAAK,aAChBD,OAAOC,IAAI,KAAK;AAEpB;AAEA,MAAMC,gBAAgB,CAACF;IACrB,MAAMG,UAAUH,OAAOG,OAAO;IAC9B,OAAOA,WACL,4BAA4BA,WAC5B,OAAOA,QAAQC,sBAAsB,KAAK,WACxCD,QAAQC,sBAAsB,GAC9BC;AACN;AAEA,MAAMC,gCAAgC,CAACN;IACrC,MAAMO,YACJ,CAAC,CAACP,OAAOG,OAAO,IAAI,YAAYH,OAAOG,OAAO,IAAI,OAAOH,OAAOG,OAAO,CAACK,MAAM,KAAK,WAC/ER,OAAOG,OAAO,CAACK,MAAM,GACrBH;IACN,MAAMI,iBAAiBC,IAAAA,6CAA2B,EAACH,aAAaF;IAChE,MAAMM,MAAMF,cAAc,CAACG,2EAAyD,CAAC;IACrF,IAAID,OAAO,OAAOA,QAAQ,UAAU;QAClC,OAAOA;IACT;IACA,OAAON;AACT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O,KAAKD,QAAQ;QAAErB,QAAQkE,QAAQlE,MAAM;IAAC;IAE5C,IAAI,CAACsB,IAAI;QACP,OAAOf;IACT;IAEA,iEAAiE;IACjE,IAAIiB,SAASD;IACbC,SAASA,OAAOkB,MAAM,CAAC,CAACX,OAAOL;QAC7B,8CAA8C;QAC9C,IAAIA,UAAUuC,cAAc;YAC1B,OAAO;QACT;QAEA,qDAAqD;QACrD,OAAOlD,SAASgB,MAAMhB,IAAI,IAAIO,OAAOD,QAAQ;YAAErB,QAAQ+B,MAAM/B,MAAM;QAAC;IACtE;IAEA,OAAO;QACL,GAAGO,KAAK;QACRmB,OAAOF,OAAOgB,MAAM,GAAG;QACvB,uGAAuG;QACvGhB,QAAQ;eAAIA;eAAWG;SAAgB;IACzC;AACF;AAEO,MAAMtC,cAAc8E,IAAAA,oBAAY,EAACC,mBAAa,EAAE,CAAC,EAAEC,UAAU,EAAE,GACpE/E,oBAAoB+E"}
|
package/build/link/linking.js
CHANGED
|
@@ -115,7 +115,14 @@ function getInitialURL() {
|
|
|
115
115
|
let _rootURL;
|
|
116
116
|
function getRootURL() {
|
|
117
117
|
if (_rootURL === undefined) {
|
|
118
|
-
|
|
118
|
+
try {
|
|
119
|
+
_rootURL = _expolinking().createURL('/');
|
|
120
|
+
} catch {
|
|
121
|
+
// `createURL` throws in production when the app has no `scheme`.
|
|
122
|
+
// The root URL only seeds the initial route, so the root path is enough.
|
|
123
|
+
_rootURL = '/';
|
|
124
|
+
return _rootURL;
|
|
125
|
+
}
|
|
119
126
|
if (isExpoGo) {
|
|
120
127
|
_rootURL = (0, _extractPathFromURL.parsePathFromExpoGoLink)(_rootURL);
|
|
121
128
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["link/linking.ts"],"sourcesContent":[null],"names":["getInitialURL","getPathFromState","getRootURL","getStateFromPath","subscribe","isExpoGo","expo","globalThis","modules","ExpoGo","window","Platform","OS","location","href","url","Linking","getLinkingURL","parseExpoGoUrlFromListener","Promise","resolve","getInitialURLWithTimeout","then","_rootURL","undefined","createURL","parsePathFromExpoGoLink","pathname","queryString","parsePathAndParamsFromExpoGoLink","nativeLinking","redirects","listener","callback","legacySubscription","legacy_subscribe","applyRedirects","redirectSystemPath","path","initial","subscription","addEventListener","remove"],"mappings":";;;;;;;;;;;;;;;;;;QAsBgBA;eAAAA;;
|
|
1
|
+
{"version":3,"sources":["link/linking.ts"],"sourcesContent":[null],"names":["getInitialURL","getPathFromState","getRootURL","getStateFromPath","subscribe","isExpoGo","expo","globalThis","modules","ExpoGo","window","Platform","OS","location","href","url","Linking","getLinkingURL","parseExpoGoUrlFromListener","Promise","resolve","getInitialURLWithTimeout","then","_rootURL","undefined","createURL","parsePathFromExpoGoLink","pathname","queryString","parsePathAndParamsFromExpoGoLink","nativeLinking","redirects","listener","callback","legacySubscription","legacy_subscribe","applyRedirects","redirectSystemPath","path","initial","subscription","addEventListener","remove"],"mappings":";;;;;;;;;;;;;;;;;;QAsBgBA;eAAAA;;QA4GWC;eAAAA,kCAAgB;;QA5E3BC;eAAAA;;QA4EPC;eAAAA,kCAAgB;;QA7CTC;eAAAA;;;;iEArFS;;;;;;;yBACA;;;;;;oCAKlB;0CACkC;kCACR;kCACA;oCACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAK/B,MAAMC,WAAW,OAAOC,SAAS,eAAeC,WAAWD,IAAI,EAAEE,SAASC;AAOnE,SAAST;IAGd,IAAI,OAAOU,WAAW,aAAa;QACjC,OAAO;IACT;IACA,IAAIC,uBAAQ,CAACC,EAAE,KAAK,SAASF,OAAOG,QAAQ,EAAEC,MAAM;QAClD,OAAOJ,OAAOG,QAAQ,CAACC,IAAI;IAC7B;IACA,IAAIH,uBAAQ,CAACC,EAAE,KAAK,OAAO;QACzB,mFAAmF;QACnF,MAAMG,MAAMC,eAAQC,aAAa;QACjC,OACEC,2BAA2BH,QAC3B,uFAAuF;QACvF,4DAA4D;QAC5Db;IAEJ;IAEA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KAAKgB;gBAC/B,IAAIjB,QAAQgB,eAAeO,oBAAoB;oBAC7CvB,OAAO,MAAMgB,cAAcO,kBAAkB,CAAC;wBAAEC,MAAMxB;wBAAMyB,SAAS;oBAAM;gBAC7E;gBAEA,IAAIzB,MAAM;oBACRkB,SAASlB;gBACX;YACF;QACF;QAEA,MAAM0B,eAAexB,eAAQyB,gBAAgB,CAAC,OAAOR;QAErD,OAAO;YACL,2FAA2F;YAC3FO,cAAcE;YACdR;QACF;IACF;AACF"}
|
|
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "NativeTabsView", {
|
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
function NativeTabsView(_props) {
|
|
16
|
-
throw new Error('You are using NativeTabs on unsupported platform. This is likely an internal Expo Router bug.');
|
|
16
|
+
throw new Error('You are using NativeTabs on an unsupported platform. This is likely an internal Expo Router bug.');
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
//# sourceMappingURL=NativeTabsView.js.map
|
|
@@ -91,11 +91,12 @@ export interface XcassetIcon {
|
|
|
91
91
|
* The name of the iOS asset catalog image to use as an icon.
|
|
92
92
|
*
|
|
93
93
|
* Xcassets provide automatic multi-resolution (@1x/@2x/@3x), dark mode variants,
|
|
94
|
-
* and device-specific images via `[UIImage imageNamed:]`.
|
|
94
|
+
* and device-specific images via `[UIImage imageNamed:]`. Both image sets and
|
|
95
|
+
* symbol sets are supported.
|
|
95
96
|
*
|
|
96
|
-
* The rendering mode
|
|
97
|
-
*
|
|
98
|
-
*
|
|
97
|
+
* > **Note:** The rendering mode comes from the asset's **Render As** setting in the
|
|
98
|
+
* > asset catalog, not from the `renderingMode` prop. Set it to **Template Image** for
|
|
99
|
+
* > the icon to be tinted with `iconColor` and `selectedIconColor`.
|
|
99
100
|
*
|
|
100
101
|
* The value can be provided in two ways:
|
|
101
102
|
* - As a string with the asset catalog image name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["native-tabs/common/elements.tsx"],"sourcesContent":[null],"names":["NativeTabsBottomAccessory","NativeTabsTriggerBadge","NativeTabsTriggerIcon","NativeTabsTriggerLabel","NativeTabsTriggerPromiseIcon","NativeTabsTriggerVectorIcon","Label","Icon","VectorIcon","props","Badge"],"mappings":";;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["native-tabs/common/elements.tsx"],"sourcesContent":[null],"names":["NativeTabsBottomAccessory","NativeTabsTriggerBadge","NativeTabsTriggerIcon","NativeTabsTriggerLabel","NativeTabsTriggerPromiseIcon","NativeTabsTriggerVectorIcon","Label","Icon","VectorIcon","props","Badge"],"mappings":";;;;;;;;;;;;;;;;;;;QA2RaA;eAAAA;;QA3BAC;eAAAA;;QAhDAC;eAAAA;;QA5LAC;eAAAA;;QAuNAC;eAAAA;;QANAC;eAAAA;;;4BAjOkC;AAgBxC,MAAMF,yBAAgEG,iBAAK;AA4L3E,MAAMJ,wBAA8DK,gBAAI;AAqBxE,MAAMF,8BAA8BG,sBAAU;AAM9C,MAAMJ,+BAA+B,SAASA,6BACnDK,KAAwC;IAExC,OAAO;AACT;AAiBO,MAAMR,yBAAgES,iBAAK;AA2B3E,MAAMV,4BAAsE;IACjF,OAAO;AACT"}
|
|
@@ -41,6 +41,9 @@ function appendIconOptions(options, props) {
|
|
|
41
41
|
} : undefined;
|
|
42
42
|
}
|
|
43
43
|
} else if ('xcasset' in props && props.xcasset) {
|
|
44
|
+
if (process.env.NODE_ENV !== 'production' && 'renderingMode' in props && props.renderingMode !== undefined) {
|
|
45
|
+
console.warn('`renderingMode` has no effect on `xcasset` icons — tinting is controlled by the ' + 'asset\'s "Render As" setting in the asset catalog instead. Remove `renderingMode`, ' + 'or use `src` if you need to control tinting from JavaScript.');
|
|
46
|
+
}
|
|
44
47
|
if (typeof props.xcasset === 'string') {
|
|
45
48
|
options.icon = {
|
|
46
49
|
xcasset: props.xcasset
|
|
@@ -73,6 +76,16 @@ function convertOptionsIconToScreensPropsIcon(icon, renderingMode) {
|
|
|
73
76
|
name: icon.sf
|
|
74
77
|
};
|
|
75
78
|
}
|
|
79
|
+
// Asset catalog icons have to be resolved natively with `[UIImage imageNamed:]`.
|
|
80
|
+
// Passing the name to the image loader as a `{ uri }` source happens to work for
|
|
81
|
+
// image sets, but symbol sets can never be produced that way. Tinting is then
|
|
82
|
+
// controlled by the asset's "Render As" setting in the asset catalog, not `renderingMode`.
|
|
83
|
+
if (icon && 'xcasset' in icon && icon.xcasset) {
|
|
84
|
+
return {
|
|
85
|
+
type: 'xcasset',
|
|
86
|
+
name: icon.xcasset
|
|
87
|
+
};
|
|
88
|
+
}
|
|
76
89
|
const imageSource = getIconImageSource(icon);
|
|
77
90
|
if (!imageSource) {
|
|
78
91
|
return undefined;
|
|
@@ -89,15 +102,12 @@ function convertOptionsIconToScreensPropsIcon(icon, renderingMode) {
|
|
|
89
102
|
templateSource: imageSource
|
|
90
103
|
};
|
|
91
104
|
}
|
|
105
|
+
// Mirrors the precedence in `convertOptionsIconToScreensPropsIcon` — SF Symbols and asset
|
|
106
|
+
// catalog icons aren't resolved through `renderingMode`, so both resolve to `undefined` here.
|
|
92
107
|
function getIconImageSource(icon) {
|
|
93
|
-
if (!icon || 'sf' in icon && icon.sf) {
|
|
108
|
+
if (!icon || 'sf' in icon && icon.sf || 'xcasset' in icon && icon.xcasset) {
|
|
94
109
|
return undefined;
|
|
95
110
|
}
|
|
96
|
-
if ('xcasset' in icon && icon.xcasset) {
|
|
97
|
-
return {
|
|
98
|
-
uri: icon.xcasset
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
111
|
if ('src' in icon && icon.src) {
|
|
102
112
|
return icon.src;
|
|
103
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["native-tabs/utils/optionsIconConverter.ios.ts"],"sourcesContent":[null],"names":["appendIconOptions","convertOptionsIconToScreensPropsIcon","resolveIconRenderingMode","options","props","sf","icon","undefined","selectedIcon","default","selected","xcasset","src","applyIconSrcOptions","applySelectedColor","selectedColor","iconColor","getIconImageSource","
|
|
1
|
+
{"version":3,"sources":["native-tabs/utils/optionsIconConverter.ios.ts"],"sourcesContent":[null],"names":["appendIconOptions","convertOptionsIconToScreensPropsIcon","resolveIconRenderingMode","options","props","sf","icon","undefined","selectedIcon","default","selected","xcasset","process","env","NODE_ENV","renderingMode","console","warn","src","applyIconSrcOptions","applySelectedColor","selectedColor","iconColor","getIconImageSource","type","name","imageSource","effectiveRenderingMode","templateSource"],"mappings":";;;;;;;;;;;;;;;;QAQgBA;eAAAA;;QA2DAC;eAAAA;;QAXAC;eAAAA;;;4CAlDwC;AAEjD,SAASF,kBAAkBG,OAAyB,EAAEC,KAAiC;IAC5F,IAAI,QAAQA,SAASA,MAAMC,EAAE,EAAE;QAC7B,IAAI,OAAOD,MAAMC,EAAE,KAAK,UAAU;YAChCF,QAAQG,IAAI,GAAGF,MAAMC,EAAE,GACnB;gBACEA,IAAID,MAAMC,EAAE;YACd,IACAE;YACJJ,QAAQK,YAAY,GAAGD;QACzB,OAAO,IAAIH,MAAMC,EAAE,EAAE;YACnBF,QAAQG,IAAI,GAAGF,MAAMC,EAAE,CAACI,OAAO,GAC3B;gBACEJ,IAAID,MAAMC,EAAE,CAACI,OAAO;YACtB,IACAF;YACJJ,QAAQK,YAAY,GAAGJ,MAAMC,EAAE,CAACK,QAAQ,GACpC;gBACEL,IAAID,MAAMC,EAAE,CAACK,QAAQ;YACvB,IACAH;QACN;IACF,OAAO,IAAI,aAAaH,SAASA,MAAMO,OAAO,EAAE;QAC9C,IACEC,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBACzB,mBAAmBV,SACnBA,MAAMW,aAAa,KAAKR,WACxB;YACAS,QAAQC,IAAI,CACV,qFACE,wFACA;QAEN;QACA,IAAI,OAAOb,MAAMO,OAAO,KAAK,UAAU;YACrCR,QAAQG,IAAI,GAAG;gBAAEK,SAASP,MAAMO,OAAO;YAAC;YACxCR,QAAQK,YAAY,GAAGD;QACzB,OAAO;YACLJ,QAAQG,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AmBjB,IAA6B;IACvD,IAAI,CAACA,QAAS,QAAQA,QAAQA,KAAKD,EAAE,IAAM,aAAaC,QAAQA,KAAKK,OAAO,EAAG;QAC7E,OAAOJ;IACT;IACA,IAAI,SAASD,QAAQA,KAAKY,GAAG,EAAE;QAC7B,OAAOZ,KAAKY,GAAG;IACjB;IACA,OAAOX;AACT"}
|
|
@@ -206,6 +206,9 @@ function FrameSizeListenerWeb({ onChange }) {
|
|
|
206
206
|
if (elementRef.current == null) {
|
|
207
207
|
return;
|
|
208
208
|
}
|
|
209
|
+
if (typeof elementRef.current.getBoundingClientRect !== 'function') {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
209
212
|
const rect = elementRef.current.getBoundingClientRect();
|
|
210
213
|
onChange({
|
|
211
214
|
width: rect.width,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["react-navigation/elements/useFrameSize.tsx"],"sourcesContent":[null],"names":["FrameSizeProvider","useFrameSize","FrameContext","React","createContext","undefined","selector","throttle","context","use","Error","value","useSyncExternalStoreWithSelector","subscribeThrottled","subscribe","getCurrent","initialFrame","render","frameRef","useRef","width","height","listeners","Set","useLatestCallback","current","listener","add","delete","delay","timer","updated","waiting","throttledListener","clearTimeout","setTimeout","unsubscribe","useMemo","onChange","frame","forEach","viewRef","useEffect","Platform","OS","measure","_x","_y","onLayout","event","nativeEvent","layout","Provider","FrameSizeListenerWeb","ref","elementRef","
|
|
1
|
+
{"version":3,"sources":["react-navigation/elements/useFrameSize.tsx"],"sourcesContent":[null],"names":["FrameSizeProvider","useFrameSize","FrameContext","React","createContext","undefined","selector","throttle","context","use","Error","value","useSyncExternalStoreWithSelector","subscribeThrottled","subscribe","getCurrent","initialFrame","render","frameRef","useRef","width","height","listeners","Set","useLatestCallback","current","listener","add","delete","delay","timer","updated","waiting","throttledListener","clearTimeout","setTimeout","unsubscribe","useMemo","onChange","frame","forEach","viewRef","useEffect","Platform","OS","measure","_x","_y","onLayout","event","nativeEvent","layout","Provider","FrameSizeListenerWeb","ref","elementRef","getBoundingClientRect","rect","observer","ResizeObserver","entries","entry","contentRect","observe","disconnect","div","style","position","left","right","top","bottom","pointerEvents","visibility"],"mappings":"AAAA;;;;;;;;;;;;;;;;QAkDgBA;eAAAA;;QAzBAC;eAAAA;;;;;;;;;;;iEAxBO;;;;;;;yBAEgC;;;;;;0EAEzB;kDACmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBjD,MAAMC,6BAAeC,SAAMC,aAAa,CAA+BC;AAEhE,SAASJ,aAAgBK,QAA6B,EAAEC,QAAkB;IAC/E,MAAMC,UAAUC,IAAAA,YAAG,EAACP;IAEpB,IAAIM,WAAW,MAAM;QACnB,MAAM,IAAIE,MAAM;IAClB;IAEA,MAAMC,QAAQC,IAAAA,kEAAgC,EAC5CL,WAAWC,QAAQK,kBAAkB,GAAGL,QAAQM,SAAS,EACzDN,QAAQO,UAAU,EAClBP,QAAQO,UAAU,EAClBT;IAGF,OAAOK;AACT;AAUO,SAASX,kBAAkB,EAAEgB,YAAY,EAAEC,MAAM,EAA0B;IAChF,MAAMC,WAAWf,SAAMgB,MAAM,CAAQ;QACnCC,OAAOJ,aAAaI,KAAK;QACzBC,QAAQL,aAAaK,MAAM;IAC7B;IAEA,MAAMC,YAAYnB,SAAMgB,MAAM,CAAgB,IAAII;IAElD,MAAMR,aAAaS,IAAAA,0BAAiB,EAAC,IAAMN,SAASO,OAAO;IAE3D,MAAMX,YAAYU,IAAAA,0BAAiB,EAAC,CAACE;QACnCJ,UAAUG,OAAO,CAACE,GAAG,CAACD;QAEtB,OAAO;YACLJ,UAAUG,OAAO,CAACG,MAAM,CAACF;QAC3B;IACF;IAEA,MAAMb,qBAAqBW,IAAAA,0BAAiB,EAAC,CAACE;QAC5C,MAAMG,QAAQ,KAAK,iCAAiC;QAEpD,IAAIC;QACJ,IAAIC,UAAU;QACd,IAAIC,UAAU;QAEd,MAAMC,oBAAoB;YACxBC,aAAa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C,OAAOH;;YAC3BmC,uBAAQ,CAACC,EAAE,KAAK,sBAAQ,uBAACS;gBAAqBf,UAAUA;iBAAe;YACvErB,OAAO;gBAAEqC,KAAKb;gBAASO;YAAS;;;AAGvC;AAEA,uDAAuD;AACvD,gDAAgD;AAChD,SAASK,qBAAqB,EAAEf,QAAQ,EAAwC;IAC9E,MAAMiB,aAAapD,SAAMgB,MAAM,CAAiB;IAEhDhB,SAAMuC,SAAS,CAAC;QACd,IAAIa,WAAW9B,OAAO,IAAI,MAAM;YAC9B;QACF;QAEA,IAAI,OAAO8B,WAAW9B,OAAO,CAAC+B,qBAAqB,KAAK,YAAY;YAClE;QACF;QAEA,MAAMC,OAAOF,WAAW9B,OAAO,CAAC+B,qBAAqB;QAErDlB,SAAS;YACPlB,OAAOqC,KAAKrC,KAAK;YACjBC,QAAQoC,KAAKpC,MAAM;QACrB;QAEA,MAAMqC,WAAW,IAAIC,eAAe,CAACC;YACnC,MAAMC,QAAQD,OAAO,CAAC,EAAE;YAExB,IAAIC,OAAO;gBACT,MAAM,EAAEzC,KAAK,EAAEC,MAAM,EAAE,GAAGwC,MAAMC,WAAW;gBAE3CxB,SAAS;oBAAElB;oBAAOC;gBAAO;YAC3B;QACF;QAEAqC,SAASK,OAAO,CAACR,WAAW9B,OAAO;QAEnC,OAAO;YACLiC,SAASM,UAAU;QACrB;IACF,GAAG;QAAC1B;KAAS;IAEb,qBACE,uBAAC2B;QACCX,KAAKC;QACLW,OAAO;YACLC,UAAU;YACVC,MAAM;YACNC,OAAO;YACPC,KAAK;YACLC,QAAQ;YACRC,eAAe;YACfC,YAAY;QACd;;AAGN"}
|
|
@@ -285,6 +285,15 @@ export type NativeStackNavigationOptions = {
|
|
|
285
285
|
* @platform ios
|
|
286
286
|
*/
|
|
287
287
|
headerBlurEffect?: ScreenStackHeaderConfigProps['blurEffect'];
|
|
288
|
+
/**
|
|
289
|
+
* Interface style of the native header. Defaults to the navigation theme's style. The native
|
|
290
|
+
* header does not support changes to this option while the screen is visible.
|
|
291
|
+
*
|
|
292
|
+
* Only supported on iOS.
|
|
293
|
+
*
|
|
294
|
+
* @platform ios
|
|
295
|
+
*/
|
|
296
|
+
headerUserInterfaceStyle?: 'light' | 'dark';
|
|
288
297
|
/**
|
|
289
298
|
* Tint color for the header. Changes the color of back button and title.
|
|
290
299
|
*/
|
|
@@ -10,5 +10,5 @@ type Props = NativeStackNavigationOptions & {
|
|
|
10
10
|
} | undefined;
|
|
11
11
|
route: Route<string>;
|
|
12
12
|
};
|
|
13
|
-
export declare function useHeaderConfigProps({ headerBackIcon, headerBackImageSource, headerBackButtonDisplayMode, headerBackButtonMenuEnabled, headerBackTitle, headerBackTitleStyle, headerBackVisible, headerShadowVisible, headerLargeStyle, headerLargeTitle: headerLargeTitleDeprecated, headerLargeTitleEnabled, headerLargeTitleShadowVisible, headerLargeTitleStyle, headerBackground, headerLeft, headerRight, headerShown, headerStyle, headerBlurEffect, headerTintColor, headerTitle, headerTitleAlign, headerTitleStyle, headerTransparent, headerSearchBarOptions, headerTopInsetEnabled, headerBack, route, title, unstable_headerLeftItems: headerLeftItems, unstable_headerRightItems: headerRightItems, unstable_nativeProps, }: Props): ScreenStackHeaderConfigProps;
|
|
13
|
+
export declare function useHeaderConfigProps({ headerBackIcon, headerBackImageSource, headerBackButtonDisplayMode, headerBackButtonMenuEnabled, headerBackTitle, headerBackTitleStyle, headerBackVisible, headerShadowVisible, headerLargeStyle, headerLargeTitle: headerLargeTitleDeprecated, headerLargeTitleEnabled, headerLargeTitleShadowVisible, headerLargeTitleStyle, headerBackground, headerLeft, headerRight, headerShown, headerStyle, headerBlurEffect, headerUserInterfaceStyle, headerTintColor, headerTitle, headerTitleAlign, headerTitleStyle, headerTransparent, headerSearchBarOptions, headerTopInsetEnabled, headerBack, route, title, unstable_headerLeftItems: headerLeftItems, unstable_headerRightItems: headerRightItems, unstable_nativeProps, }: Props): ScreenStackHeaderConfigProps;
|
|
14
14
|
export {};
|
|
@@ -133,7 +133,7 @@ const getMenuItem = (item)=>{
|
|
|
133
133
|
subtitle: description
|
|
134
134
|
};
|
|
135
135
|
};
|
|
136
|
-
function useHeaderConfigProps({ headerBackIcon, headerBackImageSource, headerBackButtonDisplayMode, headerBackButtonMenuEnabled, headerBackTitle, headerBackTitleStyle, headerBackVisible, headerShadowVisible, headerLargeStyle, headerLargeTitle: headerLargeTitleDeprecated, headerLargeTitleEnabled = headerLargeTitleDeprecated, headerLargeTitleShadowVisible, headerLargeTitleStyle, headerBackground, headerLeft, headerRight, headerShown, headerStyle, headerBlurEffect, headerTintColor, headerTitle, headerTitleAlign, headerTitleStyle, headerTransparent, headerSearchBarOptions, headerTopInsetEnabled, headerBack, route, title, unstable_headerLeftItems: headerLeftItems, unstable_headerRightItems: headerRightItems, unstable_nativeProps }) {
|
|
136
|
+
function useHeaderConfigProps({ headerBackIcon, headerBackImageSource, headerBackButtonDisplayMode, headerBackButtonMenuEnabled, headerBackTitle, headerBackTitleStyle, headerBackVisible, headerShadowVisible, headerLargeStyle, headerLargeTitle: headerLargeTitleDeprecated, headerLargeTitleEnabled = headerLargeTitleDeprecated, headerLargeTitleShadowVisible, headerLargeTitleStyle, headerBackground, headerLeft, headerRight, headerShown, headerStyle, headerBlurEffect, headerUserInterfaceStyle, headerTintColor, headerTitle, headerTitleAlign, headerTitleStyle, headerTransparent, headerSearchBarOptions, headerTopInsetEnabled, headerBack, route, title, unstable_headerLeftItems: headerLeftItems, unstable_headerRightItems: headerRightItems, unstable_nativeProps }) {
|
|
137
137
|
const { direction } = (0, _native.useLocale)();
|
|
138
138
|
const { colors, fonts, dark } = (0, _native.useTheme)();
|
|
139
139
|
const tintColor = headerTintColor ?? (_reactnative().Platform.OS === 'ios' ? colors.primary : colors.text);
|
|
@@ -345,7 +345,7 @@ function useHeaderConfigProps({ headerBackIcon, headerBackImageSource, headerBac
|
|
|
345
345
|
children,
|
|
346
346
|
headerLeftBarButtonItems: processBarButtonItems(leftItems, colors, fonts),
|
|
347
347
|
headerRightBarButtonItems: processBarButtonItems(rightItems, colors, fonts),
|
|
348
|
-
experimental_userInterfaceStyle: dark ? 'dark' : 'light',
|
|
348
|
+
experimental_userInterfaceStyle: headerUserInterfaceStyle ?? (dark ? 'dark' : 'light'),
|
|
349
349
|
...headerNativeProps
|
|
350
350
|
};
|
|
351
351
|
}
|