expo-router 58.0.31 → 58.0.32
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/global-state/router.js +3 -2
- package/build/global-state/router.js.map +1 -1
- package/build/layouts/stack-utils/toolbar/StackToolbarButton/index.js +1 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarButton/index.js.map +1 -1
- package/build/layouts/stack-utils/toolbar/StackToolbarMenu/index.js +3 -0
- package/build/layouts/stack-utils/toolbar/StackToolbarMenu/index.js.map +1 -1
- package/build/layouts/stack-utils/toolbar/shared.d.ts +5 -0
- package/build/layouts/stack-utils/toolbar/shared.js +10 -1
- package/build/layouts/stack-utils/toolbar/shared.js.map +1 -1
- package/build/native-tabs/NativeTabsView.ios.js +15 -16
- package/build/native-tabs/NativeTabsView.ios.js.map +1 -1
- package/build/native-tabs/NativeTabsView.shared.d.ts +2 -0
- package/build/native-tabs/common/elements.d.ts +25 -15
- package/build/native-tabs/common/elements.js.map +1 -1
- package/build/native-tabs/types.d.ts +14 -8
- package/build/native-tabs/types.js.map +1 -1
- package/build/native-tabs/utils/icon.d.ts +3 -1
- package/build/native-tabs/utils/icon.js +1 -7
- package/build/native-tabs/utils/icon.js.map +1 -1
- package/build/native-tabs/utils/optionsIconConverter.android.js +21 -25
- package/build/native-tabs/utils/optionsIconConverter.android.js.map +1 -1
- package/build/native-tabs/utils/optionsIconConverter.d.ts +2 -3
- package/build/native-tabs/utils/optionsIconConverter.ios.d.ts +6 -3
- package/build/native-tabs/utils/optionsIconConverter.ios.js +25 -66
- package/build/native-tabs/utils/optionsIconConverter.ios.js.map +1 -1
- package/build/native-tabs/utils/optionsIconConverter.js +3 -10
- package/build/native-tabs/utils/optionsIconConverter.js.map +1 -1
- package/build/native-tabs/utils/optionsIconConverter.shared.d.ts +18 -6
- package/build/native-tabs/utils/optionsIconConverter.shared.js +41 -34
- package/build/native-tabs/utils/optionsIconConverter.shared.js.map +1 -1
- package/build/optional-libraries/react-native-screens.d.ts +1 -0
- package/build/optional-libraries/react-native-screens.js +6 -1
- package/build/optional-libraries/react-native-screens.js.map +1 -1
- package/build/react-navigation/core/isRenderingComponent.d.ts +6 -0
- package/build/react-navigation/core/isRenderingComponent.js +34 -3
- package/build/react-navigation/core/isRenderingComponent.js.map +1 -1
- package/build/react-navigation/core/types.d.ts +3 -1
- package/build/react-navigation/core/types.js.map +1 -1
- package/build/react-navigation/core/useDescriptors.js +4 -1
- package/build/react-navigation/core/useDescriptors.js.map +1 -1
- package/build/react-navigation/core/useNavigationCache.js +2 -8
- package/build/react-navigation/core/useNavigationCache.js.map +1 -1
- package/build/react-navigation/core/useNavigationHelpers.js +4 -5
- package/build/react-navigation/core/useNavigationHelpers.js.map +1 -1
- package/build/react-navigation/core/useRouteCache.js +20 -1
- package/build/react-navigation/core/useRouteCache.js.map +1 -1
- package/build/standard-navigation/useVisibleTabsWithRedirect.d.ts +2 -1
- package/build/standard-navigation/useVisibleTabsWithRedirect.js +27 -21
- package/build/standard-navigation/useVisibleTabsWithRedirect.js.map +1 -1
- package/build/ui/Tabs.js +3 -1
- package/build/ui/Tabs.js.map +1 -1
- package/build/useScreens.js +3 -5
- package/build/useScreens.js.map +1 -1
- package/build/views/NavigationActivityContext.d.ts +3 -1
- package/build/views/NavigationActivityContext.js +13 -4
- package/build/views/NavigationActivityContext.js.map +1 -1
- package/build/views/NavigationAwareActivity.d.ts +10 -1
- package/build/views/NavigationAwareActivity.js +45 -3
- package/build/views/NavigationAwareActivity.js.map +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.31/expo.modules.router-58.0.31.module → 58.0.32/expo.modules.router-58.0.32.module} +7 -7
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.32/expo.modules.router-58.0.32.module.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.32/expo.modules.router-58.0.32.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.32/expo.modules.router-58.0.32.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.32/expo.modules.router-58.0.32.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.31/expo.modules.router-58.0.31.pom → 58.0.32/expo.modules.router-58.0.32.pom} +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.32/expo.modules.router-58.0.32.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.32/expo.modules.router-58.0.32.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.32/expo.modules.router-58.0.32.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.32/expo.modules.router-58.0.32.pom.sha512 +1 -0
- package/package.json +5 -5
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.31/expo.modules.router-58.0.31.module.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.31/expo.modules.router-58.0.31.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.31/expo.modules.router-58.0.31.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.31/expo.modules.router-58.0.31.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.31/expo.modules.router-58.0.31.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.31/expo.modules.router-58.0.31.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.31/expo.modules.router-58.0.31.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/58.0.31/expo.modules.router-58.0.31.pom.sha512 +0 -1
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.31/expo.modules.router-58.0.31-sources.jar → 58.0.32/expo.modules.router-58.0.32-sources.jar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.31/expo.modules.router-58.0.31-sources.jar.md5 → 58.0.32/expo.modules.router-58.0.32-sources.jar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.31/expo.modules.router-58.0.31-sources.jar.sha1 → 58.0.32/expo.modules.router-58.0.32-sources.jar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.31/expo.modules.router-58.0.31-sources.jar.sha256 → 58.0.32/expo.modules.router-58.0.32-sources.jar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.31/expo.modules.router-58.0.31-sources.jar.sha512 → 58.0.32/expo.modules.router-58.0.32-sources.jar.sha512} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.31/expo.modules.router-58.0.31.aar → 58.0.32/expo.modules.router-58.0.32.aar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.31/expo.modules.router-58.0.31.aar.md5 → 58.0.32/expo.modules.router-58.0.32.aar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.31/expo.modules.router-58.0.31.aar.sha1 → 58.0.32/expo.modules.router-58.0.32.aar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.31/expo.modules.router-58.0.31.aar.sha256 → 58.0.32/expo.modules.router-58.0.32.aar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{58.0.31/expo.modules.router-58.0.31.aar.sha512 → 58.0.32/expo.modules.router-58.0.32.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.32'
|
|
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.32"
|
|
14
14
|
}
|
|
15
15
|
lintOptions {
|
|
16
16
|
abortOnError false
|
|
@@ -104,6 +104,7 @@ function _reactnative() {
|
|
|
104
104
|
const _emitDomEvent = require("../domComponents/emitDomEvent");
|
|
105
105
|
const _href = require("../link/href");
|
|
106
106
|
const _CanDismissContext = require("../react-navigation/core/CanDismissContext");
|
|
107
|
+
const _isRenderingComponent = require("../react-navigation/core/isRenderingComponent");
|
|
107
108
|
const _url = require("../utils/url");
|
|
108
109
|
const _navigationRef = require("./navigationRef");
|
|
109
110
|
function _getRequireWildcardCache(nodeInterop) {
|
|
@@ -291,11 +292,11 @@ function createImperativeRouter(enqueue, setTransitionMode) {
|
|
|
291
292
|
dismiss: (count, options)=>dismissImpl(enqueue, count, options),
|
|
292
293
|
dismissAll: (options)=>dismissAllImpl(enqueue, options),
|
|
293
294
|
dismissTo: (href, options)=>dismissToImpl(enqueue, href, options),
|
|
294
|
-
canDismiss,
|
|
295
|
+
canDismiss: (0, _isRenderingComponent.withWarnOnceIfCalledDuringRender)(canDismiss, 'router.canDismiss() was called during render, which can return a stale value. Use the useCanDismiss() hook to read it during render, or call router.canDismiss() in an effect or event handler.'),
|
|
295
296
|
replace: (href, options)=>replaceImpl(enqueue, href, options),
|
|
296
297
|
back: (options)=>goBackImpl(enqueue, options),
|
|
297
298
|
goBack: (options)=>goBackImpl(enqueue, options),
|
|
298
|
-
canGoBack,
|
|
299
|
+
canGoBack: (0, _isRenderingComponent.withWarnOnceIfCalledDuringRender)(canGoBack, 'router.canGoBack() was called during render, which can return a stale value. Use the useCanGoBack() hook to read it during render, or call router.canGoBack() in an effect or event handler.'),
|
|
299
300
|
reload,
|
|
300
301
|
prefetch: (href, options)=>prefetchImpl(enqueue, href, options),
|
|
301
302
|
setTransitionMode: (mode)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["global-state/router.ts"],"sourcesContent":[null],"names":["canDismiss","canGoBack","createImperativeRouter","dismiss","dismissAll","dismissTo","getDefaultTransitionMode","goBack","linkTo","navigate","prefetch","push","reload","replace","router","setParams","unboundRouter","assertIsMounted","navigationRef","current","Error","navigateImpl","enqueue","url","options","linkToImpl","resolveHref","event","prefetchImpl","href","pushImpl","enqueueAction","action","inTransition","type","payload","dismissImpl","count","emitDomDismiss","dismissToImpl","replaceImpl","dismissAllImpl","emitDomDismissAll","goBackImpl","emitDomGoBack","IS_DOM","getCanDismiss","getRootState","params","emitDomSetParams","originalHref","navigationOptions","emitDomLinkEvent","shouldLinkExternally","startsWith","Platform","OS","Linking","openURL","linkAction","setTransitionMode","back","mode","setDefaultTransitionMode","throwBeforeFirstRender","defaultTransitionMode","args"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["global-state/router.ts"],"sourcesContent":[null],"names":["canDismiss","canGoBack","createImperativeRouter","dismiss","dismissAll","dismissTo","getDefaultTransitionMode","goBack","linkTo","navigate","prefetch","push","reload","replace","router","setParams","unboundRouter","assertIsMounted","navigationRef","current","Error","navigateImpl","enqueue","url","options","linkToImpl","resolveHref","event","prefetchImpl","href","pushImpl","enqueueAction","action","inTransition","type","payload","dismissImpl","count","emitDomDismiss","dismissToImpl","replaceImpl","dismissAllImpl","emitDomDismissAll","goBackImpl","emitDomGoBack","IS_DOM","getCanDismiss","getRootState","params","emitDomSetParams","originalHref","navigationOptions","emitDomLinkEvent","shouldLinkExternally","startsWith","Platform","OS","Linking","openURL","linkAction","setTransitionMode","withWarnOnceIfCalledDuringRender","back","mode","setDefaultTransitionMode","throwBeforeFirstRender","defaultTransitionMode","args"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAmIgBA;eAAAA;;QAjBAC;eAAAA;;QA2KAC;eAAAA;;QAqEHC;eAAAA;;QACAC;eAAAA;;QAEAC;eAAAA;;QAlCGC;eAAAA;;QAqCHC;eAAAA;;QAGAC;eAAAA;;QAZAC;eAAAA;;QAUAC;eAAAA;;QARAC;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M,IAAI2D"}
|
|
@@ -82,6 +82,7 @@ function convertStackToolbarButtonPropsToRNHeaderItem(props) {
|
|
|
82
82
|
if (props.hidden) {
|
|
83
83
|
return undefined;
|
|
84
84
|
}
|
|
85
|
+
(0, _shared.warnIfHeaderItemHasImage)('Stack.Toolbar.Button', props.image);
|
|
85
86
|
return {
|
|
86
87
|
...(0, _shared.convertStackHeaderSharedPropsToRNSharedHeaderItem)(props),
|
|
87
88
|
type: 'button',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["layouts/stack-utils/toolbar/StackToolbarButton/index.tsx"],"sourcesContent":[null],"names":["StackToolbarButton","convertStackToolbarButtonPropsToRNHeaderItem","props","placement","useToolbarPlacement","validChildren","useMemo","filterAllowedChildrenElements","children","ALLOWED_CHILDREN","process","env","NODE_ENV","allChildren","Children","toArray","length","Error","hasBadge","getFirstChildOfType","StackToolbarBadge","console","warn","EXPO_OS","sharedProps","convertStackHeaderSharedPropsToRNSharedHeaderItem","icon","type","name","undefined","source","xcassetName","extractXcassetName","imageRenderingMode","extractIconRenderingMode","iconRenderingMode","NativeToolbarButton","image","hidden","onPress","selected","StackToolbarLabel","StackToolbarIcon"],"mappings":"AAAA;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["layouts/stack-utils/toolbar/StackToolbarButton/index.tsx"],"sourcesContent":[null],"names":["StackToolbarButton","convertStackToolbarButtonPropsToRNHeaderItem","props","placement","useToolbarPlacement","validChildren","useMemo","filterAllowedChildrenElements","children","ALLOWED_CHILDREN","process","env","NODE_ENV","allChildren","Children","toArray","length","Error","hasBadge","getFirstChildOfType","StackToolbarBadge","console","warn","EXPO_OS","sharedProps","convertStackHeaderSharedPropsToRNSharedHeaderItem","icon","type","name","undefined","source","xcassetName","extractXcassetName","imageRenderingMode","extractIconRenderingMode","iconRenderingMode","NativeToolbarButton","image","hidden","warnIfHeaderItemHasImage","onPress","selected","StackToolbarLabel","StackToolbarIcon"],"mappings":"AAAA;;;;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AUA,MAAMiC,iBAAiB;IACrF,qBACE,uBAACC,2BAAmB;QACjB,GAAGZ,WAAW;QACfE,MAAMA;QACNI,QAAQA;QACRC,aAAaA;QACbM,OAAOnC,MAAMmC,KAAK;QAClBJ,oBAAoBA;;AAG1B;AAEO,SAAShC,6CACdC,KAA8B;IAE9B,IAAIA,MAAMoC,MAAM,EAAE;QAChB,OAAOT;IACT;IACAU,IAAAA,gCAAwB,EAAC,wBAAwBrC,MAAMmC,KAAK;IAE5D,OAAO;QACL,GAAGZ,IAAAA,yDAAiD,EAACvB,MAAM;QAC3DyB,MAAM;QACNa,SAAStC,MAAMsC,OAAO,IAAK,CAAA,KAAO,CAAA;QAClCC,UAAU,CAAC,CAACvC,MAAMuC,QAAQ;IAC5B;AACF;AAEA,MAAMhC,mBAAmB;IAACiC,oCAAiB;IAAEC,mCAAgB;IAAEvB,oCAAiB;CAAC"}
|
|
@@ -118,6 +118,7 @@ function convertStackToolbarMenuPropsToRNHeaderItem(props, isBottomPlacement = f
|
|
|
118
118
|
if (props.hidden) {
|
|
119
119
|
return undefined;
|
|
120
120
|
}
|
|
121
|
+
(0, _shared.warnIfHeaderItemHasImage)('Stack.Toolbar.Menu', props.image);
|
|
121
122
|
const { title, ...rest } = props;
|
|
122
123
|
const actions = _react().Children.toArray(props.children).filter((child)=>(0, _children.isChildOfType)(child, StackToolbarMenuAction) || (0, _children.isChildOfType)(child, StackToolbarMenu));
|
|
123
124
|
const { label: computedLabel, menuTitle: computedMenuTitle } = computeMenuLabelAndTitle(props.children, title);
|
|
@@ -145,6 +146,7 @@ function convertStackToolbarSubmenuMenuPropsToRNHeaderItem(props) {
|
|
|
145
146
|
if (props.hidden) {
|
|
146
147
|
return undefined;
|
|
147
148
|
}
|
|
149
|
+
(0, _shared.warnIfHeaderItemHasImage)('Stack.Toolbar.Menu', props.image);
|
|
148
150
|
const sharedProps = (0, _shared.convertStackHeaderSharedPropsToRNSharedHeaderItem)(props);
|
|
149
151
|
const actions = _react().Children.toArray(props.children).filter((child)=>(0, _children.isChildOfType)(child, StackToolbarMenuAction) || (0, _children.isChildOfType)(child, StackToolbarMenu));
|
|
150
152
|
const item = {
|
|
@@ -190,6 +192,7 @@ const StackToolbarMenuAction = (props)=>{
|
|
|
190
192
|
});
|
|
191
193
|
};
|
|
192
194
|
function convertStackToolbarMenuActionPropsToRNHeaderItem(props) {
|
|
195
|
+
(0, _shared.warnIfHeaderItemHasImage)('Stack.Toolbar.MenuAction', props.image);
|
|
193
196
|
const { children, isOn, unstable_keepPresented, icon, ...rest } = props;
|
|
194
197
|
const sharedProps = (0, _shared.convertStackHeaderSharedPropsToRNSharedHeaderItem)(props);
|
|
195
198
|
const item = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["layouts/stack-utils/toolbar/StackToolbarMenu/index.tsx"],"sourcesContent":[null],"names":["StackToolbarMenu","StackToolbarMenuAction","convertStackToolbarMenuActionPropsToRNHeaderItem","convertStackToolbarMenuPropsToRNHeaderItem","computeMenuLabelAndTitle","children","title","labelChild","getFirstChildOfType","StackToolbarLabel","labelFromChild","props","label","menuTitle","filterMenuChildren","validChildren","filterAllowedChildrenElements","ALLOWED_CHILDREN","process","env","NODE_ENV","Children","toArray","length","Error","map","child","isChildOfType","NativeToolbarMenu","inline","cloneElement","placement","useToolbarPlacement","EXPO_OS","useMemo","sharedProps","convertStackHeaderSharedPropsToRNSharedHeaderItem","computedLabel","computedMenuTitle","icon","type","name","undefined","source","xcassetName","extractXcassetName","imageRenderingMode","extractIconRenderingMode","iconRenderingMode","hasBadge","StackToolbarBadge","console","warn","image","badge","isBottomPlacement","hidden","rest","actions","filter","item","menu","multiselectable","items","action","convertStackToolbarSubmenuMenuPropsToRNHeaderItem","i","palette","layout","destructive","NativeToolbarMenuAction","isOn","unstable_keepPresented","description","subtitle","state","onPress","keepsMenuPresented","StackToolbarIcon"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["layouts/stack-utils/toolbar/StackToolbarMenu/index.tsx"],"sourcesContent":[null],"names":["StackToolbarMenu","StackToolbarMenuAction","convertStackToolbarMenuActionPropsToRNHeaderItem","convertStackToolbarMenuPropsToRNHeaderItem","computeMenuLabelAndTitle","children","title","labelChild","getFirstChildOfType","StackToolbarLabel","labelFromChild","props","label","menuTitle","filterMenuChildren","validChildren","filterAllowedChildrenElements","ALLOWED_CHILDREN","process","env","NODE_ENV","Children","toArray","length","Error","map","child","isChildOfType","NativeToolbarMenu","inline","cloneElement","placement","useToolbarPlacement","EXPO_OS","useMemo","sharedProps","convertStackHeaderSharedPropsToRNSharedHeaderItem","computedLabel","computedMenuTitle","icon","type","name","undefined","source","xcassetName","extractXcassetName","imageRenderingMode","extractIconRenderingMode","iconRenderingMode","hasBadge","StackToolbarBadge","console","warn","image","badge","isBottomPlacement","hidden","warnIfHeaderItemHasImage","rest","actions","filter","item","menu","multiselectable","items","action","convertStackToolbarSubmenuMenuPropsToRNHeaderItem","i","palette","layout","destructive","NativeToolbarMenuAction","isOn","unstable_keepPresented","description","subtitle","state","onPress","keepsMenuPresented","StackToolbarIcon"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;QA6GaA;eAAAA;;QAqKAC;eAAAA;;QAqBGC;eAAAA;;QAxIAC;eAAAA;;;;;;;;;;;yBA9JmE;;;;;;0BAW5E;yBAC6B;wBAM7B;mCACgE;wBACZ;AAU3D;;;;;;CAMC,GACD,SAASC,yBACPC,QAAmB,EACnBC,KAAyB;IAEzB,MAAMC,aAAaC,IAAAA,6BAAmB,EAACH,UAAUI,oCAAiB;IAClE,MAAMC,iBAAiBH,YAAYI,MAAMN;IACzC,OAAO;QACLO,OAAOF,kBAAkBJ,SAAS;QAClCO,WAAWP,SAAS;IACtB;AACF;AAEA;;;;CAIC,GACD,SAASQ,mBAAmBT,QAAmB;IAC7C,MAAMU,gBAAgBC,IAAAA,uCAA6B,EAACX,UAAUY;IAC9D,IACEC,QAAQC,GAAG,CAACC,QAAQ,KAAK,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}
|
|
@@ -48,6 +48,11 @@ export declare function extractXcassetName(props: StackHeaderItemSharedProps): s
|
|
|
48
48
|
* @internal
|
|
49
49
|
*/
|
|
50
50
|
export declare function extractIconRenderingMode(props: StackHeaderItemSharedProps): 'template' | 'original' | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Warns in development that iOS header items ignore `image`. Only `placement="bottom"` supports it.
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
export declare function warnIfHeaderItemHasImage(componentName: string, image: unknown): void;
|
|
51
56
|
export declare function areAllChildrenPrimitiveValues(children: ReactNode): boolean;
|
|
52
57
|
export declare function convertChildrenToString(children: ReactNode): string;
|
|
53
58
|
export declare function convertStackHeaderSharedPropsToRNSharedHeaderItem(props: StackHeaderItemSharedProps, isBottomPlacement?: boolean): RNSharedHeaderItem;
|
|
@@ -7,7 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
convertChildrenToString: null,
|
|
8
8
|
convertStackHeaderSharedPropsToRNSharedHeaderItem: null,
|
|
9
9
|
extractIconRenderingMode: null,
|
|
10
|
-
extractXcassetName: null
|
|
10
|
+
extractXcassetName: null,
|
|
11
|
+
warnIfHeaderItemHasImage: null
|
|
11
12
|
});
|
|
12
13
|
function _export(target, all) {
|
|
13
14
|
for(var name in all)Object.defineProperty(target, name, {
|
|
@@ -30,6 +31,9 @@ _export(exports, {
|
|
|
30
31
|
},
|
|
31
32
|
get extractXcassetName () {
|
|
32
33
|
return extractXcassetName;
|
|
34
|
+
},
|
|
35
|
+
get warnIfHeaderItemHasImage () {
|
|
36
|
+
return warnIfHeaderItemHasImage;
|
|
33
37
|
}
|
|
34
38
|
});
|
|
35
39
|
function _react() {
|
|
@@ -56,6 +60,11 @@ function extractIconRenderingMode(props) {
|
|
|
56
60
|
}
|
|
57
61
|
return undefined;
|
|
58
62
|
}
|
|
63
|
+
function warnIfHeaderItemHasImage(componentName, image) {
|
|
64
|
+
if (process.env.NODE_ENV !== 'production' && image != null) {
|
|
65
|
+
console.warn(`${componentName} does not support the image prop in header toolbars (placement="left" or "right") on iOS. Use the icon prop instead.`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
59
68
|
const PRIMITIVE_TYPES = [
|
|
60
69
|
'string',
|
|
61
70
|
'number'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["layouts/stack-utils/toolbar/shared.ts"],"sourcesContent":[null],"names":["areAllChildrenPrimitiveValues","convertChildrenToString","convertStackHeaderSharedPropsToRNSharedHeaderItem","extractIconRenderingMode","extractXcassetName","props","iconComponentProps","getFirstChildOfType","children","StackToolbarIcon","xcasset","undefined","renderingMode","PRIMITIVE_TYPES","childrenArray","Children","toArray","filter","child","includes","length","join","isBottomPlacement","style","separateBackground","icon","rest","stringChildren","label","StackToolbarLabel","iconPropConvertedToIcon","sf","src","badgeComponent","StackToolbarBadge","rnsIcon","type","name","source","uri","explicitRenderingMode","effectiveRenderingMode","iconRenderingMode","tintColor","tinted","item","sharesBackground","convertedStyle","convertTextStyleToRNTextStyle","labelStyle","badge","value","badgeStyle"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["layouts/stack-utils/toolbar/shared.ts"],"sourcesContent":[null],"names":["areAllChildrenPrimitiveValues","convertChildrenToString","convertStackHeaderSharedPropsToRNSharedHeaderItem","extractIconRenderingMode","extractXcassetName","warnIfHeaderItemHasImage","props","iconComponentProps","getFirstChildOfType","children","StackToolbarIcon","xcasset","undefined","renderingMode","componentName","image","process","env","NODE_ENV","console","warn","PRIMITIVE_TYPES","childrenArray","Children","toArray","filter","child","includes","length","join","isBottomPlacement","style","separateBackground","icon","rest","stringChildren","label","StackToolbarLabel","iconPropConvertedToIcon","sf","src","badgeComponent","StackToolbarBadge","rnsIcon","type","name","source","uri","explicitRenderingMode","effectiveRenderingMode","iconRenderingMode","tintColor","tinted","item","sharesBackground","convertedStyle","convertTextStyleToRNTextStyle","labelStyle","badge","value","badgeStyle"],"mappings":";;;;;;;;;;;;;;;;;;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,iBAAiBC,IAAAA,mCAA6B,EAACzB,UAAU,CAAC;QAChEsB,KAAKI,UAAU,GAAGF;IACpB;IACA,IAAId,gBAAgB;QAClBY,KAAKK,KAAK,GAAG;YACXC,OAAOlB,eAAenC,KAAK,CAACG,QAAQ,IAAI;QAC1C;QACA,MAAMmD,aAAaJ,IAAAA,mCAA6B,EAACf,eAAenC,KAAK,CAACyB,KAAK;QAC3E,IAAI6B,YAAY;YACdP,KAAKK,KAAK,CAAC3B,KAAK,GAAG6B;QACrB;IACF;IACA,IAAIjB,SAAS;QACXU,KAAKpB,IAAI,GAAGU;IACd;IACA,OAAOU;AACT"}
|
|
@@ -36,6 +36,7 @@ function _reactnativescreens() {
|
|
|
36
36
|
};
|
|
37
37
|
return data;
|
|
38
38
|
}
|
|
39
|
+
const _reactnativescreens1 = require("../optional-libraries/react-native-screens");
|
|
39
40
|
const _useDeprecated = require("../useDeprecated");
|
|
40
41
|
const _children = require("../utils/children");
|
|
41
42
|
const _NativeTabsViewshared = require("./NativeTabsView.shared");
|
|
@@ -65,7 +66,8 @@ function NativeTabsView(props) {
|
|
|
65
66
|
if (process.env.NODE_ENV !== 'production' && bottomAccessory && rawIosProps && 'bottomAccessory' in rawIosProps) {
|
|
66
67
|
console.warn('<NativeTabs.BottomAccessory> is being overridden by `unstable_nativeProps.ios.bottomAccessory`. ' + 'Either remove the `<NativeTabs.BottomAccessory>` child or stop passing `ios.bottomAccessory` via `unstable_nativeProps`.');
|
|
67
68
|
}
|
|
68
|
-
const children = tabs.map((tab, index)
|
|
69
|
+
const children = tabs.map((tab, index)=>// react-native-screens picks UISearchTab vs UITab once at creation, so remount when the search role changes.
|
|
70
|
+
/*#__PURE__*/ (0, _jsxruntime().jsx)(Screen, {
|
|
69
71
|
name: tab.name,
|
|
70
72
|
routeKey: tab.routeKey,
|
|
71
73
|
options: tab.options,
|
|
@@ -73,7 +75,7 @@ function NativeTabsView(props) {
|
|
|
73
75
|
standardAppearance: iosAppearances[index].standardAppearance,
|
|
74
76
|
scrollEdgeAppearance: iosAppearances[index].scrollEdgeAppearance,
|
|
75
77
|
contentRenderer: tab.contentRenderer
|
|
76
|
-
}, tab.name));
|
|
78
|
+
}, tab.options.role === 'search' ? `${tab.name}:search` : tab.name));
|
|
77
79
|
if (children.length === 0) {
|
|
78
80
|
return null;
|
|
79
81
|
}
|
|
@@ -111,18 +113,15 @@ function Screen(props) {
|
|
|
111
113
|
const { options, standardAppearance, scrollEdgeAppearance, contentRenderer } = props;
|
|
112
114
|
const shared = (0, _NativeTabsViewshared.useSharedScreenProps)(props);
|
|
113
115
|
const selectedIcon = shared.selectedIcon ?? shared.icon;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
//
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const effectiveRenderingMode = normalRenderingMode ?? selectedRenderingMode;
|
|
124
|
-
const iosIcon = (0, _optionsIconConverter.convertOptionsIconToScreensPropsIcon)(shared.icon, effectiveRenderingMode);
|
|
125
|
-
const iosSelectedIcon = (0, _optionsIconConverter.convertOptionsIconToScreensPropsIcon)(selectedIcon, effectiveRenderingMode);
|
|
116
|
+
const iosIcon = (0, _optionsIconConverter.convertOptionsIconToScreensPropsIcon)(shared.icon, standardAppearance?.stacked?.normal?.tabBarItemIconColor);
|
|
117
|
+
const iosSelectedIcon = (0, _optionsIconConverter.convertOptionsIconToScreensPropsIcon)(selectedIcon, standardAppearance?.stacked?.selected?.tabBarItemIconColor);
|
|
118
|
+
// TODO(ENG-28937): Pass `xcasset` icons once react-native-screens 5 supports them.
|
|
119
|
+
// react-native-screens 5 throws for any `xcasset` tab icon, even in one state, so drop both.
|
|
120
|
+
const hasUnsupportedXcassetIcon = _reactnativescreens1.isScreens5 && [
|
|
121
|
+
iosIcon,
|
|
122
|
+
iosSelectedIcon
|
|
123
|
+
].some((converted)=>converted?.icon.type === 'xcasset');
|
|
124
|
+
(0, _useDeprecated.useWarnOnce)(`The "${props.name}" tab uses an \`xcasset\` icon, which NativeTabs cannot show with react-native-screens 5 yet. ` + 'Use the `sf` or `src` prop of `NativeTabs.Trigger.Icon` instead.', hasUnsupportedXcassetIcon);
|
|
126
125
|
const content = /*#__PURE__*/ (0, _jsxruntime().jsx)(_NativeTabsViewshared.ScreenContent, {
|
|
127
126
|
options: options,
|
|
128
127
|
contentRenderer: contentRenderer
|
|
@@ -136,8 +135,8 @@ function Screen(props) {
|
|
|
136
135
|
...shared.options,
|
|
137
136
|
pointerEvents: shared.pointerEvents,
|
|
138
137
|
ios: {
|
|
139
|
-
icon: iosIcon?.platform === 'ios' ? iosIcon.icon : undefined,
|
|
140
|
-
selectedIcon: iosSelectedIcon?.platform === 'ios' ? iosSelectedIcon.icon : undefined,
|
|
138
|
+
icon: !hasUnsupportedXcassetIcon && iosIcon?.platform === 'ios' ? iosIcon.icon : undefined,
|
|
139
|
+
selectedIcon: !hasUnsupportedXcassetIcon && iosSelectedIcon?.platform === 'ios' ? iosSelectedIcon.icon : undefined,
|
|
141
140
|
standardAppearance,
|
|
142
141
|
scrollEdgeAppearance,
|
|
143
142
|
systemItem: options.role,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["native-tabs/NativeTabsView.ios.tsx"],"sourcesContent":[null],"names":["NativeTabsView","props","minimizeBehavior","tabs","sidebarAdaptable","preferredPlacement","nonTriggerChildren","unstable_nativeProps","ios","rawIosProps","android","_ignoredRawAndroidProps","rawHostRestProps","selectedScreenKey","provenance","useSelectedScreenKey","onTabSelected","useOnTabSelectedHandler","onTabChange","onTabSelectionPrevented","useOnTabSelectionPreventedHandler","prominentScreenKey","useProminentScreenKey","iosAppearances","map","tab","standardAppearance","createStandardAppearanceFromOptions","options","scrollEdgeAppearance","createScrollEdgeAppearanceFromOptions","bottomAccessory","useMemo","getFirstChildOfType","NativeTabsBottomAccessory","bottomAccessoryFn","useBottomAccessoryFunctionFromBottomAccessories","useWarnOnce","undefined","process","env","NODE_ENV","console","warn","children","index","Screen","name","routeKey","isFocused","contentRenderer","length","tabBarControllerMode","TabsHostWrapper","tabBarTintColor","tintColor","tabBarMinimizeBehavior","tabBarSidebarPreferredPlacement","tabBarHiddenAnimationEnabled","disableHiddenAnimation","tabBarHidden","hidden","navStateRequest","baseProvenance","prominentTab","otherProminentTabs","filter","prominent","join","shared","useSharedScreenProps","selectedIcon","icon","
|
|
1
|
+
{"version":3,"sources":["native-tabs/NativeTabsView.ios.tsx"],"sourcesContent":[null],"names":["NativeTabsView","props","minimizeBehavior","tabs","sidebarAdaptable","preferredPlacement","nonTriggerChildren","unstable_nativeProps","ios","rawIosProps","android","_ignoredRawAndroidProps","rawHostRestProps","selectedScreenKey","provenance","useSelectedScreenKey","onTabSelected","useOnTabSelectedHandler","onTabChange","onTabSelectionPrevented","useOnTabSelectionPreventedHandler","prominentScreenKey","useProminentScreenKey","iosAppearances","map","tab","standardAppearance","createStandardAppearanceFromOptions","options","scrollEdgeAppearance","createScrollEdgeAppearanceFromOptions","bottomAccessory","useMemo","getFirstChildOfType","NativeTabsBottomAccessory","bottomAccessoryFn","useBottomAccessoryFunctionFromBottomAccessories","useWarnOnce","undefined","process","env","NODE_ENV","console","warn","children","index","Screen","name","routeKey","isFocused","contentRenderer","role","length","tabBarControllerMode","TabsHostWrapper","tabBarTintColor","tintColor","tabBarMinimizeBehavior","tabBarSidebarPreferredPlacement","tabBarHiddenAnimationEnabled","disableHiddenAnimation","tabBarHidden","hidden","navStateRequest","baseProvenance","prominentTab","otherProminentTabs","filter","prominent","join","shared","useSharedScreenProps","selectedIcon","icon","iosIcon","convertOptionsIconToScreensPropsIcon","stacked","normal","tabBarItemIconColor","iosSelectedIcon","selected","hasUnsupportedXcassetIcon","isScreens5","some","converted","type","content","ScreenContent","wrappedContent","SafeAreaProvider","TabsScreen","pointerEvents","platform","systemItem","automaticallyActivatesSearch","disableAutomaticSearchActivation","overrideScrollViewContentInsetAdjustmentBehavior","disableAutomaticContentInsets","nativeIosOverrides","title","preventNativeSelection","disabled","nativeRestOverrides","screenKey","nativeID","supportedTabBarMinimizeBehaviorsSet","Set","SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS","validatedIos","has","behavior","Tabs","Host"],"mappings":";;;;+BAyBgBA;;;eAAAA;;;;;;;;;;;yBAzBQ;;;;;;;yBACS;;;;;;;yBACsC;;;;;;qCAE5C;+BACC;0BACQ;sCAS7B;4BAIA;0BACmC;uBACqC;iCACf;sCACX;AAE9C,SAASA,eAAeC,KAA0B;IACvD,MAAM,EACJC,gBAAgB,EAChBC,IAAI,EACJC,gBAAgB,EAChBC,kBAAkB,EAClBC,kBAAkB,EAClBC,oBAAoB,EACrB,GAAGN;IACJ,6FAA6F;IAC7F,kGAAkG;IAClG,MAAM,EACJO,KAAKC,WAAW,EAChBC,SAASC,uBAAuB,EAChC,GAAGC,kBACJ,GAAGL,wBAAwB,CAAC;IAE7B,MAAM,EAAEM,iBAAiB,EAAEC,UAAU,EAAE,GAAGC,IAAAA,0CAAoB,EAACd;IAC/D,MAAMe,gBAAgBC,IAAAA,6CAAuB,EAAChB,MAAMiB,WAAW;IAC/D,MAAMC,0BAA0BC,IAAAA,uDAAiC,EAACnB,MAAMiB,WAAW;IACnF,MAAMG,qBAAqBC,sBAAsBnB;IAEjD,MAAMoB,iBAAiBpB,KAAKqB,GAAG,CAAC,CAACC,MAAS,CAAA;YACxCC,oBAAoBC,IAAAA,+CAAmC,EAACF,IAAIG,OAAO;YACnEC,sBAAsBC,IAAAA,iDAAqC,EAACL,IAAIG,OAAO;QACzE,CAAA;IAEA,MAAMG,kBAAkBC,IAAAA,gBAAO,EAC7B,IAAMC,IAAAA,6BAAmB,EAAC3B,oBAAoB4B,mCAAyB,GACvE;QAAC5B;KAAmB;IAGtB,MAAM6B,oBAAoBC,IAAAA,gEAA+C,EAACL;IAE1EM,IAAAA,0BAAW,EACT,oFACE,gFACA,2FACFjC,qBAAqB,SAASC,uBAAuBiC;IAGvD,IACEC,QAAQC,G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ols-typescript").SFSymbol;
|
|
53
53
|
xcasset?: string;
|
|
54
54
|
drawable?: string;
|
|
55
|
+
renderingMode?: import("./types").IconRenderingMode;
|
|
55
56
|
} | {
|
|
56
57
|
src?: import("react-native").ImageSourcePropType;
|
|
57
58
|
renderingMode?: import("./types").IconRenderingMode;
|
|
@@ -60,6 +61,7 @@ export declare function useSharedScreenProps(props: InternalTabScreenProps): {
|
|
|
60
61
|
sf?: import("sf-symbols-typescript").SFSymbol;
|
|
61
62
|
xcasset?: string;
|
|
62
63
|
drawable?: string;
|
|
64
|
+
renderingMode?: import("./types").IconRenderingMode;
|
|
63
65
|
} | {
|
|
64
66
|
src?: import("react-native").ImageSourcePropType;
|
|
65
67
|
renderingMode?: import("./types").IconRenderingMode;
|
|
@@ -45,21 +45,6 @@ export interface SrcIcon {
|
|
|
45
45
|
default?: ImageSourcePropType | React.ReactElement;
|
|
46
46
|
selected: ImageSourcePropType | React.ReactElement;
|
|
47
47
|
};
|
|
48
|
-
/**
|
|
49
|
-
* Controls how the image icon is rendered on iOS.
|
|
50
|
-
*
|
|
51
|
-
* - `'template'`: iOS applies tint color to the icon (selected/unselected states)
|
|
52
|
-
* - `'original'`: Preserves original icon colors
|
|
53
|
-
*
|
|
54
|
-
* **Default behavior:**
|
|
55
|
-
* - If tab bar icon color is configured, defaults to `'template'`
|
|
56
|
-
* - If no icon color is set, defaults to `'original'`
|
|
57
|
-
*
|
|
58
|
-
* @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiimage/renderingmode-swift.enum) for more information.
|
|
59
|
-
*
|
|
60
|
-
* @platform ios
|
|
61
|
-
*/
|
|
62
|
-
renderingMode?: IconRenderingMode;
|
|
63
48
|
}
|
|
64
49
|
export interface SFSymbolIcon {
|
|
65
50
|
/**
|
|
@@ -174,6 +159,31 @@ export interface MaterialIcon {
|
|
|
174
159
|
}
|
|
175
160
|
export type NativeTabsTriggerIconProps = {
|
|
176
161
|
selectedColor?: ColorValue;
|
|
162
|
+
/**
|
|
163
|
+
* Controls how the `src`, `sf`, `drawable`, or `md` icon is drawn.
|
|
164
|
+
*
|
|
165
|
+
* - `'template'`: The icon is drawn in the tab's icon color. SF Symbols use the monochrome rendering.
|
|
166
|
+
* - `'original'`: The icon keeps its own colors. SF Symbols use the multicolor rendering.
|
|
167
|
+
*
|
|
168
|
+
* The value can be a single mode, or an object with a distinct mode for the selected state.
|
|
169
|
+
*
|
|
170
|
+
* When not set, Android tints the icon. iOS uses `'template'` for a `src` icon in a state with
|
|
171
|
+
* an icon color, and `'original'` in a state without one.
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```tsx
|
|
175
|
+
* <Icon src={require('./path/to/icon.png')} renderingMode={{ default: 'template', selected: 'original' }} />
|
|
176
|
+
* ```
|
|
177
|
+
*
|
|
178
|
+
* @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiimage/renderingmode-swift.enum) for more information.
|
|
179
|
+
*
|
|
180
|
+
* @platform Android
|
|
181
|
+
* @platform iOS
|
|
182
|
+
*/
|
|
183
|
+
renderingMode?: IconRenderingMode | {
|
|
184
|
+
default?: IconRenderingMode;
|
|
185
|
+
selected: IconRenderingMode;
|
|
186
|
+
};
|
|
177
187
|
} & ((SFSymbolIcon & DrawableIcon) | (SFSymbolIcon & MaterialIcon) | (SFSymbolIcon & SrcIcon) | (XcassetIcon & DrawableIcon) | (XcassetIcon & MaterialIcon) | (XcassetIcon & SrcIcon) | (MaterialIcon & SrcIcon) | (DrawableIcon & SrcIcon) | SrcIcon);
|
|
178
188
|
/**
|
|
179
189
|
* Renders an icon for the tab.
|
|
@@ -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":";;;;;;;;;;;;;;;;;;;QAoSaA;eAAAA;;QA3BAC;eAAAA;;QAhDAC;eAAAA;;QArMAC;eAAAA;;QAgOAC;eAAAA;;QANAC;eAAAA;;;4BA1OkC;AAgBxC,MAAMF,yBAAgEG,iBAAK;AAqM3E,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"}
|
|
@@ -193,12 +193,12 @@ export interface NativeTabOptions extends DefaultRouterOptions {
|
|
|
193
193
|
* @platform android
|
|
194
194
|
* @platform iOS
|
|
195
195
|
*/
|
|
196
|
-
contentStyle?: Pick<ViewStyle, 'backgroundColor' | 'experimental_backgroundImage' | 'padding' | 'paddingTop' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingBlock' | 'paddingBlockEnd' | 'paddingBlockStart' | 'paddingInline' | 'paddingInlineEnd' | 'paddingInlineStart' | 'paddingEnd' | 'paddingHorizontal' | 'paddingVertical' | 'paddingStart' | 'alignContent' | 'alignItems' | 'justifyContent' | 'flexDirection' | 'gap'>;
|
|
196
|
+
contentStyle?: Pick<ViewStyle, 'backgroundColor' | 'backgroundImage' | 'experimental_backgroundImage' | 'padding' | 'paddingTop' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingBlock' | 'paddingBlockEnd' | 'paddingBlockStart' | 'paddingInline' | 'paddingInlineEnd' | 'paddingInlineStart' | 'paddingEnd' | 'paddingHorizontal' | 'paddingVertical' | 'paddingStart' | 'alignContent' | 'alignItems' | 'justifyContent' | 'flexDirection' | 'gap'>;
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
|
-
* How
|
|
200
|
-
* `original` keeps the
|
|
201
|
-
*
|
|
199
|
+
* How a tab icon is drawn: `template` draws the icon in the tab's icon color,
|
|
200
|
+
* `original` keeps the icon's own colors. For SF Symbols, `template` is the monochrome
|
|
201
|
+
* rendering and `original` is the multicolor rendering.
|
|
202
202
|
*/
|
|
203
203
|
export type IconRenderingMode = 'template' | 'original';
|
|
204
204
|
export type SymbolOrImageSource = {
|
|
@@ -217,15 +217,21 @@ export type SymbolOrImageSource = {
|
|
|
217
217
|
* @platform android
|
|
218
218
|
*/
|
|
219
219
|
drawable?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Controls how the SF Symbol or drawable icon is drawn. `xcasset` icons ignore it.
|
|
222
|
+
*/
|
|
223
|
+
renderingMode?: IconRenderingMode;
|
|
220
224
|
} | {
|
|
221
225
|
/**
|
|
222
226
|
* The image source to use as an icon.
|
|
223
227
|
*/
|
|
224
228
|
src?: ImageSourcePropType | Promise<ImageSourcePropType | null>;
|
|
225
229
|
/**
|
|
226
|
-
* Controls how the icon is
|
|
227
|
-
*
|
|
228
|
-
*
|
|
230
|
+
* Controls how the icon is drawn.
|
|
231
|
+
*
|
|
232
|
+
* When not set:
|
|
233
|
+
* - iOS uses `template` if the tab state has an icon color, and `original` if it does not.
|
|
234
|
+
* - Android always uses `template`.
|
|
229
235
|
*/
|
|
230
236
|
renderingMode?: IconRenderingMode;
|
|
231
237
|
};
|
|
@@ -597,7 +603,7 @@ export interface NativeTabTriggerProps {
|
|
|
597
603
|
*
|
|
598
604
|
* The `"search"` role makes this tab the system search tab
|
|
599
605
|
* ([`UISearchTab`](https://developer.apple.com/documentation/uikit/uisearchtab)) on iOS 26.1 and later.
|
|
600
|
-
*
|
|
606
|
+
* Changing `role` to or from `"search"` remounts the tab and resets its state.
|
|
601
607
|
*
|
|
602
608
|
* @see The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem).
|
|
603
609
|
* @platform ios
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["native-tabs/types.ts"],"sourcesContent":[null],"names":["SUPPORTED_BLUR_EFFECTS","SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES","SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS","SUPPORTED_TAB_BAR_ITEM_ROLES"],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["native-tabs/types.ts"],"sourcesContent":[null],"names":["SUPPORTED_BLUR_EFFECTS","SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES","SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS","SUPPORTED_TAB_BAR_ITEM_ROLES"],"mappings":";;;;;;;;;;;;;;;;QAiSaA;eAAAA;;QAgTAC;eAAAA;;QAeAC;eAAAA;;;AA/TN,MAAMF,yBAAyB;IACpC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAyRM,MAAMC,gDAAgD;IAC3D;IACA;IACA;IACA;CACD;AAUM,MAAMC,uCAAuC;IAClD;IACA;IACA;IACA;CACD;AA8OD,MAAMC,+BAA+B;IACnC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD"}
|
|
@@ -9,6 +9,7 @@ export type AwaitedIcon = {
|
|
|
9
9
|
sf?: SFSymbol;
|
|
10
10
|
xcasset?: string;
|
|
11
11
|
drawable?: string;
|
|
12
|
+
renderingMode?: IconRenderingMode;
|
|
12
13
|
} | {
|
|
13
14
|
src?: ImageSourcePropType;
|
|
14
15
|
renderingMode?: IconRenderingMode;
|
|
@@ -17,11 +18,12 @@ export declare function useAwaitedScreensIcon(icon: NativeTabOptions['icon']): {
|
|
|
17
18
|
sf?: SFSymbol;
|
|
18
19
|
xcasset?: string;
|
|
19
20
|
drawable?: string;
|
|
21
|
+
renderingMode?: IconRenderingMode;
|
|
20
22
|
} | {
|
|
21
23
|
src?: ImageSourcePropType;
|
|
22
24
|
renderingMode?: IconRenderingMode;
|
|
23
25
|
} | undefined;
|
|
24
|
-
export declare function convertComponentSrcToImageSource(src: React.ReactElement
|
|
26
|
+
export declare function convertComponentSrcToImageSource(src: React.ReactElement): {
|
|
25
27
|
src?: ImageSourcePropType | Promise<ImageSourcePropType | null>;
|
|
26
28
|
renderingMode?: IconRenderingMode;
|
|
27
29
|
} | undefined;
|
|
@@ -85,7 +85,7 @@ function useAwaitedScreensIcon(icon) {
|
|
|
85
85
|
function isAwaitedIcon(icon) {
|
|
86
86
|
return !icon || !('src' in icon && icon.src instanceof Promise);
|
|
87
87
|
}
|
|
88
|
-
function convertComponentSrcToImageSource(src
|
|
88
|
+
function convertComponentSrcToImageSource(src) {
|
|
89
89
|
let result;
|
|
90
90
|
if ((0, _children.isChildOfType)(src, _elements.NativeTabsTriggerVectorIcon)) {
|
|
91
91
|
const props = src.props;
|
|
@@ -100,12 +100,6 @@ function convertComponentSrcToImageSource(src, renderingMode) {
|
|
|
100
100
|
console.warn('Only VectorIcon is supported as a React element in Icon.src');
|
|
101
101
|
return undefined;
|
|
102
102
|
}
|
|
103
|
-
if (renderingMode) {
|
|
104
|
-
result = {
|
|
105
|
-
...result,
|
|
106
|
-
renderingMode
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
103
|
return result;
|
|
110
104
|
}
|
|
111
105
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["native-tabs/utils/icon.ts"],"sourcesContent":[null],"names":["convertComponentSrcToImageSource","convertIconColorPropToObject","useAwaitedScreensIcon","iconColor","default","icon","src","undefined","renderingMode","awaitedIcon","setAwaitedIcon","useState","useEffect","loadIcon","Promise","awaitedSrc","useMemo","resolved","isAwaitedIcon","result","isChildOfType","NativeTabsTriggerVectorIcon","props","family","getImageSource","name","NativeTabsTriggerPromiseIcon","loader","console","warn"],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["native-tabs/utils/icon.ts"],"sourcesContent":[null],"names":["convertComponentSrcToImageSource","convertIconColorPropToObject","useAwaitedScreensIcon","iconColor","default","icon","src","undefined","renderingMode","awaitedIcon","setAwaitedIcon","useState","useEffect","loadIcon","Promise","awaitedSrc","useMemo","resolved","isAwaitedIcon","result","isChildOfType","NativeTabsTriggerVectorIcon","props","family","getImageSource","name","NativeTabsTriggerPromiseIcon","loader","console","warn"],"mappings":";;;;;;;;;;;;;;;;QA2EgBA;eAAAA;;QA9DAC;eAAAA;;QA2BAC;eAAAA;;;;yBAxC6B;;;;;;0BAIf;0BAC4C;AAQnE,SAASD,6BAA6BE,SAAuC;IAIlF,IAAIA,WAAW;QACb,IAAI,OAAOA,cAAc,YAAa,CAAA,aAAaA,aAAa,cAAcA,SAAQ,GAAI;YACxF,OAAOA;QACT;QACA,OAAO;YACLC,SAASD;QACX;IACF;IACA,OAAO,CAAC;AACV;AAcO,SAASD,sBAAsBG,IAA8B;IAClE,MAAMC,MAAMD,QAAQ,OAAOA,SAAS,YAAY,SAASA,OAAOA,KAAKC,GAAG,GAAGC;IAC3E,MAAMC,gBACJH,QAAQ,OAAOA,SAAS,YAAY,mBAAmBA,OAAOA,KAAKG,aAAa,GAAGD;IACrF,MAAM,CAACE,aAAaC,eAAe,GAAGC,IAAAA,iBAAQ,EAA0BJ;IAExEK,IAAAA,kBAAS,EAAC;QACR,MAAMC,WAAW;YACf,IAAIP,OAAOA,eAAeQ,SAAS;gBACjC,MAAMC,aAAa,MAAMT;gBACzB,IAAIS,YAAY;oBACdL,eAAe;wBAAEJ,KAAKS;oBAAW;gBACnC;YACF;QACF;QACAF;IACA,wEAAwE;IACxE,mEAAmE;IACnE,kGAAkG;IAClG,8CAA8C;IAChD,GAAG;QAACP;KAAI;IAER,OAAOU,IAAAA,gBAAO,EAA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