expo-router 56.0.4 → 56.1.0
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/native-tabs/NativeTabsView.android.js +1 -1
- package/build/native-tabs/NativeTabsView.android.js.map +1 -1
- package/build/native-tabs/NativeTabsView.ios.js +1 -1
- package/build/native-tabs/NativeTabsView.ios.js.map +1 -1
- package/build/native-tabs/NativeTabsView.shared.d.ts.map +1 -1
- package/build/native-tabs/NativeTabsView.shared.js +4 -1
- package/build/native-tabs/NativeTabsView.shared.js.map +1 -1
- package/build/native-tabs/types.d.ts +5 -5
- package/build/native-tabs/types.d.ts.map +1 -1
- package/build/native-tabs/types.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/{56.0.4/expo.modules.router-56.0.4.module → 56.1.0/expo.modules.router-56.1.0.module} +7 -7
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.1.0/expo.modules.router-56.1.0.module.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.1.0/expo.modules.router-56.1.0.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.1.0/expo.modules.router-56.1.0.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.1.0/expo.modules.router-56.1.0.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/{56.0.4/expo.modules.router-56.0.4.pom → 56.1.0/expo.modules.router-56.1.0.pom} +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.1.0/expo.modules.router-56.1.0.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.1.0/expo.modules.router-56.1.0.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.1.0/expo.modules.router-56.1.0.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.1.0/expo.modules.router-56.1.0.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha512 +1 -1
- package/package.json +11 -11
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.0.4/expo.modules.router-56.0.4.module.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.0.4/expo.modules.router-56.0.4.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.0.4/expo.modules.router-56.0.4.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.0.4/expo.modules.router-56.0.4.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.0.4/expo.modules.router-56.0.4.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.0.4/expo.modules.router-56.0.4.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.0.4/expo.modules.router-56.0.4.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/router/expo.modules.router/56.0.4/expo.modules.router-56.0.4.pom.sha512 +0 -1
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.0.4/expo.modules.router-56.0.4-sources.jar → 56.1.0/expo.modules.router-56.1.0-sources.jar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.0.4/expo.modules.router-56.0.4-sources.jar.md5 → 56.1.0/expo.modules.router-56.1.0-sources.jar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.0.4/expo.modules.router-56.0.4-sources.jar.sha1 → 56.1.0/expo.modules.router-56.1.0-sources.jar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.0.4/expo.modules.router-56.0.4-sources.jar.sha256 → 56.1.0/expo.modules.router-56.1.0-sources.jar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.0.4/expo.modules.router-56.0.4-sources.jar.sha512 → 56.1.0/expo.modules.router-56.1.0-sources.jar.sha512} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.0.4/expo.modules.router-56.0.4.aar → 56.1.0/expo.modules.router-56.1.0.aar} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.0.4/expo.modules.router-56.0.4.aar.md5 → 56.1.0/expo.modules.router-56.1.0.aar.md5} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.0.4/expo.modules.router-56.0.4.aar.sha1 → 56.1.0/expo.modules.router-56.1.0.aar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.0.4/expo.modules.router-56.0.4.aar.sha256 → 56.1.0/expo.modules.router-56.1.0.aar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/router/expo.modules.router/{56.0.4/expo.modules.router-56.0.4.aar.sha512 → 56.1.0/expo.modules.router-56.1.0.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 = '56.0
|
|
7
|
+
version = '56.1.0'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.router"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 1
|
|
13
|
-
versionName "56.0
|
|
13
|
+
versionName "56.1.0"
|
|
14
14
|
}
|
|
15
15
|
lintOptions {
|
|
16
16
|
abortOnError false
|
|
@@ -35,7 +35,7 @@ function NativeTabsView(props) {
|
|
|
35
35
|
// TODO(@ubax): Adjust docs and add support for tabBarRespectsIMEInsets
|
|
36
36
|
, {
|
|
37
37
|
// TODO(@ubax): Adjust docs and add support for tabBarRespectsIMEInsets
|
|
38
|
-
android: { ...rawAndroidProps }, tabBarHidden: props.hidden, ...rawHostRestProps,
|
|
38
|
+
android: { ...rawAndroidProps }, tabBarHidden: props.hidden, ...rawHostRestProps, navStateRequest: { selectedScreenKey, baseProvenance: provenance }, onTabSelected: onTabSelected, children: children }));
|
|
39
39
|
}
|
|
40
40
|
function Screen(props) {
|
|
41
41
|
const { options, androidAppearance, contentRenderer } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeTabsView.android.js","sourceRoot":"","sources":["../../src/native-tabs/NativeTabsView.android.tsx"],"names":[],"mappings":";;AAeA,wCAyDC;;AAxED,iCAAgC;AAChC,+DAA8E;AAC9E,oEAAiE;AAEjE,mEAMiC;AACjC,6CAA6D;AAC7D,mCAAkG;AAClG,uEAAoF;AAEpF,SAAgB,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,KAAK,CAAC;IAC/D,MAAM,EACJ,OAAO,EAAE,eAAe,EACxB,GAAG,EAAE,mBAAmB,EACxB,GAAG,gBAAgB,EACpB,GAAG,oBAAoB,IAAI,EAAE,CAAC;IAE/B,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,GAAG,IAAA,4CAAoB,EAAC,KAAK,CAAC,CAAC;IACtE,MAAM,aAAa,GAAG,IAAA,+CAAuB,EAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAEjE,wEAAwE;IACxE,IAAI,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;IACpD,IAAI,mBAAmB,IAAI,CAAC,0CAA0C,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAChG,OAAO,CAAC,IAAI,CACV,oCAAoC,mBAAmB,2BAA2B,qDAA6C,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,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,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAClB,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,YACtB,OAAO,GACK,CAChB,CAAC;QACJ,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC,CAAC;IAErD,OAAO,CACL,uBAAC,2BAAI,CAAC,MAAM,OACN,MAAM,CAAC,OAAO,EAClB,aAAa,EAAE,MAAM,CAAC,aAAa,EACnC,OAAO,EAAE;YACP,IAAI,EAAE,WAAW;YACjB,YAAY,EAAE,mBAAmB;YACjC,kBAAkB,EAAE,iBAAiB;YACrC,GAAG,MAAM,CAAC,sBAAsB;SACjC,EACD,KAAK,EAAE,MAAM,CAAC,KAAK,KACf,MAAM,CAAC,mBAAmB,EAC9B,SAAS,EAAE,MAAM,CAAC,SAAS,YAC1B,cAAc,GACH,CACf,CAAC;AACJ,CAAC;AAED,MAAM,0CAA0C,GAAG,IAAI,GAAG,CACxD,qDAA6C,CAC9C,CAAC","sourcesContent":["import { useMemo } from 'react';\nimport { Tabs, type TabsScreenAppearanceAndroid } from 'react-native-screens';\nimport { SafeAreaView } from 'react-native-screens/experimental';\n\nimport {\n type InternalTabScreenProps as SharedInternalTabScreenProps,\n ScreenContent,\n useOnTabSelectedHandler,\n useSelectedScreenKey,\n useSharedScreenProps,\n} from './NativeTabsView.shared';\nimport { createAndroidScreenAppearance } from './appearance';\nimport { SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES, type NativeTabsViewProps } from './types';\nimport { convertOptionsIconToScreensPropsIcon } from './utils/optionsIconConverter';\n\nexport function NativeTabsView(props: NativeTabsViewProps) {\n const { disableIndicator, tabs, unstable_nativeProps } = props;\n const {\n android: rawAndroidProps,\n ios: _ignoredRawIosProps,\n ...rawHostRestProps\n } = unstable_nativeProps ?? {};\n\n const { selectedScreenKey, provenance } = useSelectedScreenKey(props);\n const onTabSelected = useOnTabSelectedHandler(props.onTabChange);\n\n // TODO(@ubax): add per screen labelVisibilityMode + validation function\n let labelVisibilityMode = props.labelVisibilityMode;\n if (labelVisibilityMode && !supportedTabBarItemLabelVisibilityModesSet.has(labelVisibilityMode)) {\n console.warn(\n `Unsupported labelVisibilityMode: ${labelVisibilityMode}. Supported values are: ${SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES.map((mode) => `\"${mode}\"`).join(', ')}`\n );\n labelVisibilityMode = undefined;\n }\n\n const androidAppearances = tabs.map((tab) =>\n createAndroidScreenAppearance({\n options: tab.options,\n tintColor: props.tintColor,\n rippleColor: props.rippleColor,\n disableIndicator,\n labelVisibilityMode,\n })\n );\n\n const children = tabs.map((tab, index) => (\n <Screen\n key={tab.routeKey}\n routeKey={tab.routeKey}\n name={tab.name}\n options={tab.options}\n isFocused={selectedScreenKey === tab.routeKey}\n androidAppearance={androidAppearances[index]!}\n contentRenderer={tab.contentRenderer}\n />\n ));\n\n if (children.length === 0) {\n return null;\n }\n\n return (\n <Tabs.Host\n // TODO(@ubax): Adjust docs and add support for tabBarRespectsIMEInsets\n android={{ ...rawAndroidProps }}\n tabBarHidden={props.hidden}\n {...rawHostRestProps}\n navStateRequest={{ selectedScreenKey, baseProvenance: provenance }}\n onTabSelected={onTabSelected}>\n {children}\n </Tabs.Host>\n );\n}\n\ninterface InternalTabScreenProps extends SharedInternalTabScreenProps {\n androidAppearance: TabsScreenAppearanceAndroid;\n}\n\nfunction Screen(props: InternalTabScreenProps) {\n const { options, androidAppearance, contentRenderer } = props;\n\n const shared = useSharedScreenProps(props);\n\n const androidIcon = convertOptionsIconToScreensPropsIcon(shared.icon);\n const androidSelectedIcon = convertOptionsIconToScreensPropsIcon(shared.selectedIcon);\n\n const content = <ScreenContent options={options} contentRenderer={contentRenderer} />;\n const wrappedContent = useMemo(() => {\n if (!options.disableAutomaticContentInsets) {\n return (\n <SafeAreaView\n // https://github.com/software-mansion/react-native-screens/issues/2662#issuecomment-2757735088\n collapsable={false}\n style={{ flex: 1 }}\n edges={{ bottom: true }}>\n {content}\n </SafeAreaView>\n );\n }\n return content;\n }, [content, options.disableAutomaticContentInsets]);\n\n return (\n <Tabs.Screen\n {...shared.options}\n pointerEvents={shared.pointerEvents}\n android={{\n icon: androidIcon,\n selectedIcon: androidSelectedIcon,\n standardAppearance: androidAppearance,\n ...shared.nativeAndroidOverrides,\n }}\n title={shared.title}\n {...shared.nativeRestOverrides}\n screenKey={shared.screenKey}>\n {wrappedContent}\n </Tabs.Screen>\n );\n}\n\nconst supportedTabBarItemLabelVisibilityModesSet = new Set<string>(\n SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES\n);\n"]}
|
|
@@ -43,7 +43,7 @@ function NativeTabsView(props) {
|
|
|
43
43
|
tabBarControllerMode,
|
|
44
44
|
bottomAccessory: bottomAccessoryFn,
|
|
45
45
|
...rawIosProps,
|
|
46
|
-
}, tabBarHidden: props.hidden, ...rawHostRestProps,
|
|
46
|
+
}, tabBarHidden: props.hidden, ...rawHostRestProps, navStateRequest: { selectedScreenKey, baseProvenance: provenance }, onTabSelected: onTabSelected, children: children }));
|
|
47
47
|
}
|
|
48
48
|
function Screen(props) {
|
|
49
49
|
const { options, standardAppearance, scrollEdgeAppearance, contentRenderer } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeTabsView.ios.js","sourceRoot":"","sources":["../../src/native-tabs/NativeTabsView.ios.tsx"],"names":[],"mappings":";;AAqBA,wCA0EC;;AA/FD,iCAAgC;AAChC,mFAAkE;AAClE,+DAA8F;AAE9F,mEAMiC;AACjC,6CAGsB;AACtB,gDAA8D;AAC9D,mCAAyF;AACzF,6DAA0F;AAC1F,uEAAoF;AACpF,gDAAwD;AAExD,SAAgB,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,GAC1F,KAAK,CAAC;IACR,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sourcesContent":["import { useMemo } from 'react';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\nimport { Tabs, type TabsHostProps, type TabsScreenAppearanceIOS } from 'react-native-screens';\n\nimport {\n type InternalTabScreenProps as SharedInternalTabScreenProps,\n ScreenContent,\n useOnTabSelectedHandler,\n useSelectedScreenKey,\n useSharedScreenProps,\n} from './NativeTabsView.shared';\nimport {\n createScrollEdgeAppearanceFromOptions,\n createStandardAppearanceFromOptions,\n} from './appearance';\nimport { NativeTabsBottomAccessory } from './common/elements';\nimport { SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS, type NativeTabsViewProps } from './types';\nimport { useBottomAccessoryFunctionFromBottomAccessories } from './utils/bottomAccessory';\nimport { convertOptionsIconToScreensPropsIcon } from './utils/optionsIconConverter';\nimport { getFirstChildOfType } from '../utils/children';\n\nexport function NativeTabsView(props: NativeTabsViewProps) {\n const { minimizeBehavior, tabs, sidebarAdaptable, nonTriggerChildren, unstable_nativeProps } =\n props;\n // `ios`/`android` are the only platform-nested keys on `TabsHostProps`. We drop the inactive\n // platform's slice so users writing universal code don't pass Android-only props to the iOS host.\n const {\n ios: rawIosProps,\n android: _ignoredRawAndroidProps,\n ...rawHostRestProps\n } = unstable_nativeProps ?? {};\n\n const { selectedScreenKey, provenance } = useSelectedScreenKey(props);\n const onTabSelected = useOnTabSelectedHandler(props.onTabChange);\n\n const iosAppearances = tabs.map((tab) => ({\n standardAppearance: createStandardAppearanceFromOptions(tab.options),\n scrollEdgeAppearance: createScrollEdgeAppearanceFromOptions(tab.options),\n }));\n\n const bottomAccessory = useMemo(\n () => getFirstChildOfType(nonTriggerChildren, NativeTabsBottomAccessory),\n [nonTriggerChildren]\n );\n\n const bottomAccessoryFn = useBottomAccessoryFunctionFromBottomAccessories(bottomAccessory);\n\n if (\n process.env.NODE_ENV !== 'production' &&\n bottomAccessory &&\n rawIosProps &&\n 'bottomAccessory' in rawIosProps\n ) {\n console.warn(\n '<NativeTabs.BottomAccessory> is being overridden by `unstable_nativeProps.ios.bottomAccessory`. ' +\n 'Either remove the `<NativeTabs.BottomAccessory>` child or stop passing `ios.bottomAccessory` via `unstable_nativeProps`.'\n );\n }\n\n const children = tabs.map((tab, index) => (\n <Screen\n key={tab.routeKey}\n routeKey={tab.routeKey}\n name={tab.name}\n options={tab.options}\n isFocused={selectedScreenKey === tab.routeKey}\n standardAppearance={iosAppearances[index]!.standardAppearance}\n scrollEdgeAppearance={iosAppearances[index]!.scrollEdgeAppearance}\n contentRenderer={tab.contentRenderer}\n />\n ));\n\n if (children.length === 0) {\n return null;\n }\n\n const tabBarControllerMode: NonNullable<TabsHostProps['ios']>['tabBarControllerMode'] =\n sidebarAdaptable ? 'tabSidebar' : sidebarAdaptable === false ? 'tabBar' : 'automatic';\n\n return (\n <TabsHostWrapper\n ios={{\n tabBarTintColor: props.tintColor,\n tabBarMinimizeBehavior: minimizeBehavior,\n tabBarControllerMode,\n bottomAccessory: bottomAccessoryFn,\n ...rawIosProps,\n }}\n tabBarHidden={props.hidden}\n {...rawHostRestProps}\n navStateRequest={{ selectedScreenKey, baseProvenance: provenance }}\n onTabSelected={onTabSelected}>\n {children}\n </TabsHostWrapper>\n );\n}\n\ninterface InternalTabScreenProps extends SharedInternalTabScreenProps {\n standardAppearance: TabsScreenAppearanceIOS;\n scrollEdgeAppearance: TabsScreenAppearanceIOS;\n}\n\nfunction Screen(props: InternalTabScreenProps) {\n const { options, standardAppearance, scrollEdgeAppearance, contentRenderer } = props;\n\n const shared = useSharedScreenProps(props);\n\n const iosIcon = convertOptionsIconToScreensPropsIcon(\n shared.icon,\n standardAppearance?.stacked?.normal?.tabBarItemIconColor\n );\n const iosSelectedIcon = convertOptionsIconToScreensPropsIcon(\n shared.selectedIcon,\n standardAppearance?.stacked?.selected?.tabBarItemIconColor\n );\n\n const content = <ScreenContent options={options} contentRenderer={contentRenderer} />;\n const wrappedContent = useMemo(() => <SafeAreaProvider>{content}</SafeAreaProvider>, [content]);\n\n return (\n <Tabs.Screen\n {...shared.options}\n pointerEvents={shared.pointerEvents}\n ios={{\n icon: iosIcon,\n selectedIcon: iosSelectedIcon,\n standardAppearance,\n scrollEdgeAppearance,\n systemItem: options.role,\n overrideScrollViewContentInsetAdjustmentBehavior: !options.disableAutomaticContentInsets,\n ...shared.nativeIosOverrides,\n }}\n title={shared.title}\n {...shared.nativeRestOverrides}\n screenKey={shared.screenKey}>\n {wrappedContent}\n </Tabs.Screen>\n );\n}\n\nconst supportedTabBarMinimizeBehaviorsSet = new Set<string>(SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS);\n\nfunction TabsHostWrapper(props: TabsHostProps) {\n // TODO(@ubax): add function for validation\n let validatedIos = props.ios;\n if (validatedIos?.tabBarMinimizeBehavior) {\n if (!supportedTabBarMinimizeBehaviorsSet.has(validatedIos.tabBarMinimizeBehavior)) {\n console.warn(\n `Unsupported minimizeBehavior: ${validatedIos.tabBarMinimizeBehavior}. Supported values are: ${SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS.map((behavior) => `\"${behavior}\"`).join(', ')}`\n );\n validatedIos = { ...validatedIos, tabBarMinimizeBehavior: undefined };\n }\n }\n\n return <Tabs.Host {...props} ios={validatedIos} />;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeTabsView.shared.d.ts","sourceRoot":"","sources":["../../src/native-tabs/NativeTabsView.shared.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAIrE,wBAAgB,oBAAoB,CAAC,EACnC,YAAY,EACZ,UAAU,EACV,IAAI,GACL,EAAE,IAAI,CAAC,mBAAmB,EAAE,cAAc,GAAG,YAAY,GAAG,MAAM,CAAC,GAAG;IACrE,iBAAiB,EAAE,MAAM,CAAC;IAC1B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AE,gBAAgB,CAAC;IAC1B,eAAe,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;CACxC,2CAcA"}
|
|
@@ -23,7 +23,10 @@ function useSelectedScreenKey({ focusedIndex, provenance, tabs, }) {
|
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
function useOnTabSelectedHandler(onTabChange) {
|
|
26
|
-
return (0, react_1.useCallback)(({ nativeEvent: { selectedScreenKey, provenance,
|
|
26
|
+
return (0, react_1.useCallback)(({ nativeEvent: { selectedScreenKey, provenance, actionOrigin } }) => {
|
|
27
|
+
// Treat anything other than a JS-driven echo as a native action so the
|
|
28
|
+
// navigator emits `tabPress` and dispatches `JUMP_TO`.
|
|
29
|
+
const isNativeAction = actionOrigin !== 'programmatic-js';
|
|
27
30
|
onTabChange({ selectedKey: selectedScreenKey, provenance, isNativeAction });
|
|
28
31
|
}, [onTabChange]);
|
|
29
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeTabsView.shared.js","sourceRoot":"","sources":["../../src/native-tabs/NativeTabsView.shared.tsx"],"names":[],"mappings":";;AAQA,oDAuBC;AAED,
|
|
1
|
+
{"version":3,"file":"NativeTabsView.shared.js","sourceRoot":"","sources":["../../src/native-tabs/NativeTabsView.shared.tsx"],"names":[],"mappings":";;AAQA,oDAuBC;AAED,0DAYC;AAeD,oDAyBC;AAED,sCAoBC;;AA3GD,iCAAsE;AACtE,+CAAoC;AAIpC,uCAAqD;AACrD,uDAAsD;AAEtD,SAAgB,oBAAoB,CAAC,EACnC,YAAY,EACZ,UAAU,EACV,IAAI,GAC8D;IAIlE,MAAM,WAAW,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;IAC9F,MAAM,EAAE,YAAY,EAAE,oBAAoB,EAAE,UAAU,EAAE,kBAAkB,EAAE,GAC1E,IAAA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QAChG,aAAa,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAwB;QACvE,KAAK;QACL,kBAAkB;QAClB,sBAAsB;QACtB,mBAAmB;QACnB,SAAS,EAAE,QAAQ;QACnB,IAAI;QACJ,YAAY;KACb,CAAC;AACJ,CAAC;AAED,SAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,eAAe,GAIhB;IACC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,iBAAQ,GAAE,CAAC;IAC9B,OAAO,CACL,uBAAC,mBAAI;IACH,+FAA+F;;QAA/F,+FAA+F;QAC/F,WAAW,EAAE,KAAK,EAClB,KAAK,EAAE;YACL,EAAE,eAAe,EAAE,MAAM,CAAC,UAAU,EAAE;YACtC,OAAO,CAAC,YAAY;YACpB,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE;SACtD,YACA,eAAe,EAAE,GACb,CACR,CAAC;AACJ,CAAC","sourcesContent":["import React, { useCallback, useDeferredValue, useMemo } from 'react';\nimport { View } from 'react-native';\nimport type { TabsHostProps } from 'react-native-screens';\n\nimport type { NativeTabOptions, NativeTabsViewProps } from './types';\nimport { useAwaitedScreensIcon } from './utils/icon';\nimport { useTheme } from '../react-navigation/native';\n\nexport function useSelectedScreenKey({\n focusedIndex,\n provenance,\n tabs,\n}: Pick<NativeTabsViewProps, 'focusedIndex' | 'provenance' | 'tabs'>): {\n selectedScreenKey: string;\n provenance: number;\n} {\n const stableState = useMemo(() => ({ focusedIndex, provenance }), [focusedIndex, provenance]);\n const { focusedIndex: deferredFocusedIndex, provenance: deferredProvenance } =\n useDeferredValue(stableState);\n\n // We need to check if the deferred index is not out of bounds\n // This can happen when the focused index is the last tab, and user removes that tab\n // In that case the deferred index will still point to the last tab, but after re-render\n // it will be out of bounds\n const inBoundsDeferredFocusedIndex =\n deferredFocusedIndex < tabs.length ? deferredFocusedIndex : focusedIndex;\n\n return {\n selectedScreenKey: tabs[inBoundsDeferredFocusedIndex]!.routeKey,\n provenance: deferredProvenance,\n };\n}\n\nexport function useOnTabSelectedHandler(\n onTabChange: NativeTabsViewProps['onTabChange']\n): NonNullable<TabsHostProps['onTabSelected']> {\n return useCallback<NonNullable<TabsHostProps['onTabSelected']>>(\n ({ nativeEvent: { selectedScreenKey, provenance, actionOrigin } }) => {\n // Treat anything other than a JS-driven echo as a native action so the\n // navigator emits `tabPress` and dispatches `JUMP_TO`.\n const isNativeAction = actionOrigin !== 'programmatic-js';\n onTabChange({ selectedKey: selectedScreenKey, provenance, isNativeAction });\n },\n [onTabChange]\n );\n}\n\n/**\n * Cross-platform fields used to render a single tab screen. Each platform\n * extends this with its own appearance fields.\n */\nexport interface InternalTabScreenProps {\n routeKey: string;\n name: string;\n // TODO(@ubax): https://linear.app/expo/issue/ENG-20736/remove-pointerevents-from-nativetabsview\n isFocused: boolean;\n options: NativeTabOptions;\n contentRenderer: () => React.ReactNode;\n}\n\nexport function useSharedScreenProps(props: InternalTabScreenProps) {\n const { options, isFocused, name, routeKey } = props;\n const title = options.title ?? name;\n const {\n ios: nativeIosOverrides,\n android: nativeAndroidOverrides,\n ...nativeRestOverrides\n } = options.nativeProps ?? {};\n\n // We need to await the icon, as VectorIcon will load asynchronously\n const icon = useAwaitedScreensIcon(options.icon);\n const selectedIcon = useAwaitedScreensIcon(options.selectedIcon);\n\n return {\n options,\n // TODO(@ubax): https://linear.app/expo/issue/ENG-20736/remove-pointerevents-from-nativetabsview\n pointerEvents: (isFocused ? 'box-none' : 'none') as 'box-none' | 'none',\n title,\n nativeIosOverrides,\n nativeAndroidOverrides,\n nativeRestOverrides,\n screenKey: routeKey,\n icon,\n selectedIcon,\n };\n}\n\nexport function ScreenContent({\n options,\n contentRenderer,\n}: {\n options: NativeTabOptions;\n contentRenderer: () => React.ReactNode;\n}) {\n const { colors } = useTheme();\n return (\n <View\n // https://github.com/software-mansion/react-native-screens/issues/2662#issuecomment-2757735088\n collapsable={false}\n style={[\n { backgroundColor: colors.background },\n options.contentStyle,\n { flex: 1, position: 'relative', overflow: 'hidden' },\n ]}>\n {contentRenderer()}\n </View>\n );\n}\n"]}
|
|
@@ -19,7 +19,7 @@ export type NativeScreenProps = Partial<Omit<TabsScreenProps, 'screenKey'>>;
|
|
|
19
19
|
/**
|
|
20
20
|
* Props passed to the underlying tab host implementation in `react-native-screens`.
|
|
21
21
|
*/
|
|
22
|
-
export type NativeTabsHostNativeProps = Partial<Omit<TabsHostProps, '
|
|
22
|
+
export type NativeTabsHostNativeProps = Partial<Omit<TabsHostProps, 'navStateRequest' | 'onTabSelected' | 'children'>>;
|
|
23
23
|
export interface NativeTabOptions extends DefaultRouterOptions {
|
|
24
24
|
icon?: SymbolOrImageSource;
|
|
25
25
|
selectedIcon?: SymbolOrImageSource;
|
|
@@ -263,10 +263,10 @@ export interface OnTabChangeEventPayload {
|
|
|
263
263
|
/**
|
|
264
264
|
* The provenance value reported by the native side for this selection.
|
|
265
265
|
*
|
|
266
|
-
* The navigator echoes this back via `
|
|
267
|
-
* JS-driven updates so the native side can distinguish stale
|
|
268
|
-
* fresh ones. See `
|
|
269
|
-
* contract.
|
|
266
|
+
* The navigator echoes this back via `navStateRequest.baseProvenance` on
|
|
267
|
+
* subsequent JS-driven updates so the native side can distinguish stale
|
|
268
|
+
* updates from fresh ones. See `TabsHostNavStateRequest` in
|
|
269
|
+
* `react-native-screens` for the full contract.
|
|
270
270
|
*/
|
|
271
271
|
provenance: number;
|
|
272
272
|
isNativeAction: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/native-tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OA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pC,MAAM;IACN,eAAe;IACf,YAAY;IACZ,OAAO;IACP,MAAM;IACN,SAAS;IACT,WAAW;IACX,yBAAyB;IACzB,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;IACrB,sBAAsB;IACtB,8BAA8B;IAC9B,yBAAyB;IACzB,qBAAqB;IACrB,0BAA0B;IAC1B,2BAA2B;IAC3B,6BAA6B;IAC7B,wBAAwB;IACxB,oBAAoB;IACpB,yBAAyB;IACzB,0BAA0B;CAClB,CAAC;AAqOE,QAAA,6CAA6C,GAAG;IAC3D,MAAM;IACN,UAAU;IACV,SAAS;IACT,WAAW;CACH,CAAC;AAUE,QAAA,oCAAoC,GAAG;IAClD,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;CACJ,CAAC;AAiIX,MAAM,4BAA4B,GAAG;IACnC,WAAW;IACX,UAAU;IACV,WAAW;IACX,WAAW;IACX,UAAU;IACV,SAAS;IACT,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC","sourcesContent":["import type { PropsWithChildren } from 'react';\nimport type {\n ColorValue,\n ImageSourcePropType,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native';\nimport type { TabsHostProps, TabsScreenProps } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport type {\n DefaultRouterOptions,\n EventMapBase,\n NavigationState,\n ParamListBase,\n RouteProp,\n ScreenListeners,\n TabNavigationState,\n} from '../react-navigation/native';\n\n/**\n * Event map for `NativeTabs` navigation events.\n * Only `tabPress` is currently supported.\n */\nexport type NativeTabNavigationEventMap = {\n tabPress: { data: { __internalTabsType: 'native' }; canPreventDefault: false };\n};\n\nexport type NativeScreenProps = Partial<Omit<TabsScreenProps, 'screenKey'>>;\n\n/**\n * Props passed to the underlying tab host implementation in `react-native-screens`.\n */\nexport type NativeTabsHostNativeProps = Partial<\n Omit<TabsHostProps, 'navState' | 'onTabSelected' | 'children'>\n>;\n\nexport interface NativeTabOptions extends DefaultRouterOptions {\n icon?: SymbolOrImageSource;\n selectedIcon?: SymbolOrImageSource;\n title?: string;\n badgeValue?: string;\n selectedLabelStyle?: NativeTabsLabelStyle;\n labelStyle?: NativeTabsLabelStyle;\n role?: NativeTabsTabBarItemRole;\n selectedIconColor?: ColorValue;\n selectedBadgeBackgroundColor?: ColorValue;\n badgeBackgroundColor?: ColorValue;\n badgeTextColor?: ColorValue;\n backgroundColor?: ColorValue;\n blurEffect?: NativeTabsBlurEffect;\n shadowColor?: ColorValue;\n iconColor?: ColorValue;\n disableTransparentOnScrollEdge?: boolean;\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n selectedTitlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n indicatorColor?: ColorValue;\n hidden?: boolean;\n specialEffects?: TabsScreenProps['specialEffects'];\n nativeProps?: NativeScreenProps;\n disableAutomaticContentInsets?: boolean;\n contentStyle?: Pick<\n ViewStyle,\n | 'backgroundColor'\n | 'experimental_backgroundImage'\n | 'padding'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingBlock'\n | 'paddingBlockEnd'\n | 'paddingBlockStart'\n | 'paddingInline'\n | 'paddingInlineEnd'\n | 'paddingInlineStart'\n | 'paddingEnd'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingStart'\n | 'alignContent'\n | 'alignItems'\n | 'justifyContent'\n | 'flexDirection'\n | 'gap'\n >;\n}\n\nexport type SymbolOrImageSource =\n | {\n /**\n * The name of the SF Symbol to use as an icon.\n * @platform iOS\n */\n sf?: SFSymbol;\n /**\n * The name of the iOS asset catalog image to use as an icon.\n * @platform iOS\n */\n xcasset?: string;\n /**\n * The name of the drawable resource to use as an icon.\n * @platform android\n */\n drawable?: string;\n }\n | {\n /**\n * The image source to use as an icon.\n */\n src?: ImageSourcePropType | Promise<ImageSourcePropType | null>;\n /**\n * Controls how the icon is rendered on iOS.\n * @platform ios\n * @default 'template'\n */\n renderingMode?: 'template' | 'original';\n };\n\nexport type NativeTabsLabelStyle = Pick<\n TextStyle,\n 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'color'\n>;\n\nexport const SUPPORTED_BLUR_EFFECTS = [\n 'none',\n 'systemDefault',\n 'extraLight',\n 'light',\n 'dark',\n 'regular',\n 'prominent',\n 'systemUltraThinMaterial',\n 'systemThinMaterial',\n 'systemMaterial',\n 'systemThickMaterial',\n 'systemChromeMaterial',\n 'systemUltraThinMaterialLight',\n 'systemThinMaterialLight',\n 'systemMaterialLight',\n 'systemThickMaterialLight',\n 'systemChromeMaterialLight',\n 'systemUltraThinMaterialDark',\n 'systemThinMaterialDark',\n 'systemMaterialDark',\n 'systemThickMaterialDark',\n 'systemChromeMaterialDark',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiblureffect/style)\n */\nexport type NativeTabsBlurEffect = (typeof SUPPORTED_BLUR_EFFECTS)[number];\n\nexport interface NativeTabsProps extends PropsWithChildren {\n // #region common props\n /**\n * The style of the every tab label in the tab bar.\n */\n labelStyle?:\n | StyleProp<NativeTabsLabelStyle>\n | {\n default?: StyleProp<NativeTabsLabelStyle>;\n selected?: StyleProp<NativeTabsLabelStyle>;\n };\n /**\n * The color of every tab icon in the tab bar.\n */\n iconColor?: ColorValue | { default?: ColorValue; selected?: ColorValue };\n /**\n * The tint color of the tab icon.\n *\n * Can be overridden by icon color and label color for each tab individually.\n */\n tintColor?: ColorValue;\n /**\n * The background color of the tab bar.\n */\n backgroundColor?: ColorValue;\n /**\n * The background color of every badge in the tab bar.\n */\n badgeBackgroundColor?: ColorValue;\n /**\n * When set to `true`, hides the tab bar.\n *\n * @default false\n */\n hidden?: boolean;\n // #endregion common props\n // #region iOS props\n /**\n * Specifies the minimize behavior for the tab bar.\n *\n * Available starting from iOS 26.\n *\n * The following values are currently supported:\n *\n * - `automatic` - resolves to the system default minimize behavior\n * - `never` - the tab bar does not minimize\n * - `onScrollDown` - the tab bar minimizes when scrolling down and\n * expands when scrolling back up\n * - `onScrollUp` - the tab bar minimizes when scrolling up and expands\n * when scrolling back down\n *\n * @see The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior).\n *\n * @default automatic\n *\n * @platform iOS 26+\n */\n minimizeBehavior?: NativeTabsTabBarMinimizeBehavior;\n /**\n * The blur effect applied to the tab bar.\n *\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * The color of the shadow.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uibarappearance/shadowcolor)\n *\n * @platform iOS\n */\n shadowColor?: ColorValue;\n /**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/titlepositionadjustment)\n *\n * @platform iOS\n */\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * When set to `true`, enables the sidebarAdaptable tab bar style on iPadOS and macOS. This prop has no effect on iPhone.\n *\n * @platform iOS 18+\n */\n sidebarAdaptable?: boolean;\n // #endregion iOS props\n // #region android props\n /**\n * Disables the active indicator for the tab bar.\n *\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * The behavior when navigating back with the back button.\n *\n * @platform android\n */\n backBehavior?: 'none' | 'initialRoute' | 'history';\n /**\n * The visibility mode of the tab item label.\n *\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * The color of the ripple effect when the tab is pressed.\n *\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * The color of the tab indicator.\n *\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n /**\n * The color of the badge text.\n *\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n // #endregion android props\n /**\n * Listeners for navigation events on all tabs.\n *\n * Supported events:\n * - `tabPress` - called when a tab is pressed\n * - `focus` - called when the screen comes into focus\n * - `blur` - called when the screen loses focus\n *\n * @example\n * ```tsx\n * <NativeTabs\n * screenListeners={{\n * tabPress: (e) => {\n * console.log('Any tab pressed');\n * },\n * }}\n * >\n * ...\n * </NativeTabs>\n * ```\n */\n screenListeners?:\n | ScreenListeners<TabNavigationState<ParamListBase>, NativeTabNavigationEventMap>\n | ((prop: {\n route: RouteProp<ParamListBase, string>;\n }) => ScreenListeners<TabNavigationState<ParamListBase>, NativeTabNavigationEventMap>);\n /**\n * Props passed to the underlying native tab host implementation in `react-native-screens`.\n * Use this to configure props that are not directly exposed by Expo Router.\n *\n * > **Note**: This is an unstable API and may change or be removed in minor versions.\n *\n * @platform android\n * @platform ios\n */\n unstable_nativeProps?: NativeTabsHostNativeProps;\n}\n\nexport interface InternalNativeTabsProps extends NativeTabsProps {\n nonTriggerChildren?: React.ReactNode;\n}\nexport interface OnTabChangeEventPayload {\n /**\n * The route key of the tab the native side has just selected.\n */\n selectedKey: string;\n /**\n * The provenance value reported by the native side for this selection.\n *\n * The navigator echoes this back via `navState.provenance` on subsequent\n * JS-driven updates so the native side can distinguish stale updates from\n * fresh ones. See `TabsHostNavState` in `react-native-screens` for the full\n * contract.\n */\n provenance: number;\n // TODO(@ubax): consider renaming this field\n isNativeAction: boolean;\n}\n\nexport interface NativeTabsViewProps\n extends Omit<\n InternalNativeTabsProps,\n | 'labelStyle'\n | 'iconColor'\n | 'backgroundColor'\n | 'badgeBackgroundColor'\n | 'blurEffect'\n | 'indicatorColor'\n | 'badgeTextColor'\n > {\n focusedIndex: number;\n /**\n * Provenance counter associated with the currently rendered `focusedIndex`.\n */\n provenance: number;\n tabs: NativeTabsViewTabItem[];\n onTabChange: (event: OnTabChangeEventPayload) => void;\n}\n\nexport interface NativeTabsViewTabItem {\n options: NativeTabOptions;\n routeKey: string;\n name: string;\n contentRenderer: () => React.ReactNode;\n}\n\nexport const SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES = [\n 'auto',\n 'selected',\n 'labeled',\n 'unlabeled',\n] as const;\n\n/**\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\nexport type NativeTabsTabBarItemLabelVisibilityMode =\n (typeof SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES)[number];\n\nexport const SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS = [\n 'automatic',\n 'never',\n 'onScrollDown',\n 'onScrollUp',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior)\n *\n * @platform iOS 26\n */\nexport type NativeTabsTabBarMinimizeBehavior =\n (typeof SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS)[number];\n\nexport interface NativeTabTriggerProps {\n /**\n * The name of the route.\n *\n * This is required when used inside a Layout component.\n *\n * When used in a route it has no effect.\n */\n name?: string;\n /**\n * If true, the tab will be hidden from the tab bar.\n *\n * > **Note**: Marking a tab as `hidden` means it cannot be navigated to in any way.\n *\n * > **Note**: Dynamically hiding tabs will remount the navigator and the state will be reset.\n */\n hidden?: boolean;\n /**\n * Props passed to the underlying native tab screen implementation.\n * Use this to configure props not directly exposed by Expo Router, but available in `react-native-screens`.\n *\n * > **Note**: This will override any other props set by Expo Router and may lead to unexpected behavior.\n *\n * > **Note**: This is an unstable API and may change or be removed in minor versions.\n *\n * @platform android\n * @platform iOS\n */\n unstable_nativeProps?: NativeScreenProps;\n /**\n * If true, the tab will not pop stack to the root when selected again.\n *\n * @default false\n * @platform iOS\n */\n disablePopToTop?: boolean;\n /**\n * If true, the tab will not scroll to the top when selected again.\n * @default false\n *\n * @platform iOS\n */\n disableScrollToTop?: boolean;\n /**\n * The children of the trigger.\n *\n * Use `Icon`, `Label`, and `Badge` components to customize the tab.\n */\n children?: React.ReactNode;\n /**\n * System-provided tab bar item with predefined icon and title\n *\n * Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with\n * standard iOS styling and localized titles. Custom `icon` or `selectedIcon`\n * properties will override the system icon, but the system-defined title cannot\n * be customized.\n *\n * @see The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem).\n * @platform ios\n */\n role?: NativeTabsTabBarItemRole;\n /**\n * The default behavior differs between iOS and Android.\n *\n * On **Android**, the content of a native tabs screen is automatically wrapped in a `SafeAreaView`,\n * and the **bottom** inset is applied. Other insets must be handled manually.\n *\n * On **iOS**, the first scroll view nested inside a native tabs screen has\n * [automatic content inset adjustment](https://reactnative.dev/docs/scrollview#contentinsetadjustmentbehavior-ios) enabled\n *\n * When this property is set to `true`, automatic content inset adjustment is disabled for the screen\n * and must be managed manually. You can use `SafeAreaView` from `react-native-screens/experimental`\n * to handle safe area insets.\n *\n * @platform android\n * @platform ios\n */\n disableAutomaticContentInsets?: boolean;\n /**\n * The style applied to the content of the tab\n *\n * Note: Only certain style properties are supported.\n */\n contentStyle?: NativeTabOptions['contentStyle'];\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * When set on a trigger, it takes precedence over the value set on `NativeTabs`.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * Listeners for navigation events on this tab.\n *\n * Supported events:\n * - `tabPress` - called when this tab is pressed\n * - `focus` - called when this screen comes into focus\n * - `blur` - called when this screen loses focus\n *\n * @example\n * ```tsx\n * <NativeTabs.Trigger\n * name=\"home\"\n * listeners={{\n * tabPress: (e) => {\n * console.log('Home tab pressed');\n * },\n * }}\n * />\n * ```\n */\n listeners?:\n | ScreenListeners<NavigationState, EventMapBase>\n | ((prop: {\n route: RouteProp<ParamListBase, string>;\n }) => ScreenListeners<NavigationState, EventMapBase>);\n}\n\nconst SUPPORTED_TAB_BAR_ITEM_ROLES = [\n 'bookmarks',\n 'contacts',\n 'downloads',\n 'favorites',\n 'featured',\n 'history',\n 'more',\n 'mostRecent',\n 'mostViewed',\n 'recents',\n 'search',\n 'topRated',\n] as const;\n\nexport type NativeTabsTabBarItemRole = (typeof SUPPORTED_TAB_BAR_ITEM_ROLES)[number];\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/native-tabs/types.ts"],"names":[],"mappings":";;;AAmIa,QAAA,sBAAsB,GAAG;IACpC,MAAM;IACN,eAAe;IACf,YAAY;IACZ,OAAO;IACP,MAAM;IACN,SAAS;IACT,WAAW;IACX,yBAAyB;IACzB,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;IACrB,sBAAsB;IACtB,8BAA8B;IAC9B,yBAAyB;IACzB,qBAAqB;IACrB,0BAA0B;IAC1B,2BAA2B;IAC3B,6BAA6B;IAC7B,wBAAwB;IACxB,oBAAoB;IACpB,yBAAyB;IACzB,0BAA0B;CAClB,CAAC;AAqOE,QAAA,6CAA6C,GAAG;IAC3D,MAAM;IACN,UAAU;IACV,SAAS;IACT,WAAW;CACH,CAAC;AAUE,QAAA,oCAAoC,GAAG;IAClD,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;CACJ,CAAC;AAiIX,MAAM,4BAA4B,GAAG;IACnC,WAAW;IACX,UAAU;IACV,WAAW;IACX,WAAW;IACX,UAAU;IACV,SAAS;IACT,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC","sourcesContent":["import type { PropsWithChildren } from 'react';\nimport type {\n ColorValue,\n ImageSourcePropType,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native';\nimport type { TabsHostProps, TabsScreenProps } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport type {\n DefaultRouterOptions,\n EventMapBase,\n NavigationState,\n ParamListBase,\n RouteProp,\n ScreenListeners,\n TabNavigationState,\n} from '../react-navigation/native';\n\n/**\n * Event map for `NativeTabs` navigation events.\n * Only `tabPress` is currently supported.\n */\nexport type NativeTabNavigationEventMap = {\n tabPress: { data: { __internalTabsType: 'native' }; canPreventDefault: false };\n};\n\nexport type NativeScreenProps = Partial<Omit<TabsScreenProps, 'screenKey'>>;\n\n/**\n * Props passed to the underlying tab host implementation in `react-native-screens`.\n */\nexport type NativeTabsHostNativeProps = Partial<\n Omit<TabsHostProps, 'navStateRequest' | 'onTabSelected' | 'children'>\n>;\n\nexport interface NativeTabOptions extends DefaultRouterOptions {\n icon?: SymbolOrImageSource;\n selectedIcon?: SymbolOrImageSource;\n title?: string;\n badgeValue?: string;\n selectedLabelStyle?: NativeTabsLabelStyle;\n labelStyle?: NativeTabsLabelStyle;\n role?: NativeTabsTabBarItemRole;\n selectedIconColor?: ColorValue;\n selectedBadgeBackgroundColor?: ColorValue;\n badgeBackgroundColor?: ColorValue;\n badgeTextColor?: ColorValue;\n backgroundColor?: ColorValue;\n blurEffect?: NativeTabsBlurEffect;\n shadowColor?: ColorValue;\n iconColor?: ColorValue;\n disableTransparentOnScrollEdge?: boolean;\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n selectedTitlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n indicatorColor?: ColorValue;\n hidden?: boolean;\n specialEffects?: TabsScreenProps['specialEffects'];\n nativeProps?: NativeScreenProps;\n disableAutomaticContentInsets?: boolean;\n contentStyle?: Pick<\n ViewStyle,\n | 'backgroundColor'\n | 'experimental_backgroundImage'\n | 'padding'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingBlock'\n | 'paddingBlockEnd'\n | 'paddingBlockStart'\n | 'paddingInline'\n | 'paddingInlineEnd'\n | 'paddingInlineStart'\n | 'paddingEnd'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingStart'\n | 'alignContent'\n | 'alignItems'\n | 'justifyContent'\n | 'flexDirection'\n | 'gap'\n >;\n}\n\nexport type SymbolOrImageSource =\n | {\n /**\n * The name of the SF Symbol to use as an icon.\n * @platform iOS\n */\n sf?: SFSymbol;\n /**\n * The name of the iOS asset catalog image to use as an icon.\n * @platform iOS\n */\n xcasset?: string;\n /**\n * The name of the drawable resource to use as an icon.\n * @platform android\n */\n drawable?: string;\n }\n | {\n /**\n * The image source to use as an icon.\n */\n src?: ImageSourcePropType | Promise<ImageSourcePropType | null>;\n /**\n * Controls how the icon is rendered on iOS.\n * @platform ios\n * @default 'template'\n */\n renderingMode?: 'template' | 'original';\n };\n\nexport type NativeTabsLabelStyle = Pick<\n TextStyle,\n 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'color'\n>;\n\nexport const SUPPORTED_BLUR_EFFECTS = [\n 'none',\n 'systemDefault',\n 'extraLight',\n 'light',\n 'dark',\n 'regular',\n 'prominent',\n 'systemUltraThinMaterial',\n 'systemThinMaterial',\n 'systemMaterial',\n 'systemThickMaterial',\n 'systemChromeMaterial',\n 'systemUltraThinMaterialLight',\n 'systemThinMaterialLight',\n 'systemMaterialLight',\n 'systemThickMaterialLight',\n 'systemChromeMaterialLight',\n 'systemUltraThinMaterialDark',\n 'systemThinMaterialDark',\n 'systemMaterialDark',\n 'systemThickMaterialDark',\n 'systemChromeMaterialDark',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiblureffect/style)\n */\nexport type NativeTabsBlurEffect = (typeof SUPPORTED_BLUR_EFFECTS)[number];\n\nexport interface NativeTabsProps extends PropsWithChildren {\n // #region common props\n /**\n * The style of the every tab label in the tab bar.\n */\n labelStyle?:\n | StyleProp<NativeTabsLabelStyle>\n | {\n default?: StyleProp<NativeTabsLabelStyle>;\n selected?: StyleProp<NativeTabsLabelStyle>;\n };\n /**\n * The color of every tab icon in the tab bar.\n */\n iconColor?: ColorValue | { default?: ColorValue; selected?: ColorValue };\n /**\n * The tint color of the tab icon.\n *\n * Can be overridden by icon color and label color for each tab individually.\n */\n tintColor?: ColorValue;\n /**\n * The background color of the tab bar.\n */\n backgroundColor?: ColorValue;\n /**\n * The background color of every badge in the tab bar.\n */\n badgeBackgroundColor?: ColorValue;\n /**\n * When set to `true`, hides the tab bar.\n *\n * @default false\n */\n hidden?: boolean;\n // #endregion common props\n // #region iOS props\n /**\n * Specifies the minimize behavior for the tab bar.\n *\n * Available starting from iOS 26.\n *\n * The following values are currently supported:\n *\n * - `automatic` - resolves to the system default minimize behavior\n * - `never` - the tab bar does not minimize\n * - `onScrollDown` - the tab bar minimizes when scrolling down and\n * expands when scrolling back up\n * - `onScrollUp` - the tab bar minimizes when scrolling up and expands\n * when scrolling back down\n *\n * @see The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior).\n *\n * @default automatic\n *\n * @platform iOS 26+\n */\n minimizeBehavior?: NativeTabsTabBarMinimizeBehavior;\n /**\n * The blur effect applied to the tab bar.\n *\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * The color of the shadow.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uibarappearance/shadowcolor)\n *\n * @platform iOS\n */\n shadowColor?: ColorValue;\n /**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/titlepositionadjustment)\n *\n * @platform iOS\n */\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * When set to `true`, enables the sidebarAdaptable tab bar style on iPadOS and macOS. This prop has no effect on iPhone.\n *\n * @platform iOS 18+\n */\n sidebarAdaptable?: boolean;\n // #endregion iOS props\n // #region android props\n /**\n * Disables the active indicator for the tab bar.\n *\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * The behavior when navigating back with the back button.\n *\n * @platform android\n */\n backBehavior?: 'none' | 'initialRoute' | 'history';\n /**\n * The visibility mode of the tab item label.\n *\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * The color of the ripple effect when the tab is pressed.\n *\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * The color of the tab indicator.\n *\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n /**\n * The color of the badge text.\n *\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n // #endregion android props\n /**\n * Listeners for navigation events on all tabs.\n *\n * Supported events:\n * - `tabPress` - called when a tab is pressed\n * - `focus` - called when the screen comes into focus\n * - `blur` - called when the screen loses focus\n *\n * @example\n * ```tsx\n * <NativeTabs\n * screenListeners={{\n * tabPress: (e) => {\n * console.log('Any tab pressed');\n * },\n * }}\n * >\n * ...\n * </NativeTabs>\n * ```\n */\n screenListeners?:\n | ScreenListeners<TabNavigationState<ParamListBase>, NativeTabNavigationEventMap>\n | ((prop: {\n route: RouteProp<ParamListBase, string>;\n }) => ScreenListeners<TabNavigationState<ParamListBase>, NativeTabNavigationEventMap>);\n /**\n * Props passed to the underlying native tab host implementation in `react-native-screens`.\n * Use this to configure props that are not directly exposed by Expo Router.\n *\n * > **Note**: This is an unstable API and may change or be removed in minor versions.\n *\n * @platform android\n * @platform ios\n */\n unstable_nativeProps?: NativeTabsHostNativeProps;\n}\n\nexport interface InternalNativeTabsProps extends NativeTabsProps {\n nonTriggerChildren?: React.ReactNode;\n}\nexport interface OnTabChangeEventPayload {\n /**\n * The route key of the tab the native side has just selected.\n */\n selectedKey: string;\n /**\n * The provenance value reported by the native side for this selection.\n *\n * The navigator echoes this back via `navStateRequest.baseProvenance` on\n * subsequent JS-driven updates so the native side can distinguish stale\n * updates from fresh ones. See `TabsHostNavStateRequest` in\n * `react-native-screens` for the full contract.\n */\n provenance: number;\n // TODO(@ubax): consider renaming this field\n isNativeAction: boolean;\n}\n\nexport interface NativeTabsViewProps\n extends Omit<\n InternalNativeTabsProps,\n | 'labelStyle'\n | 'iconColor'\n | 'backgroundColor'\n | 'badgeBackgroundColor'\n | 'blurEffect'\n | 'indicatorColor'\n | 'badgeTextColor'\n > {\n focusedIndex: number;\n /**\n * Provenance counter associated with the currently rendered `focusedIndex`.\n */\n provenance: number;\n tabs: NativeTabsViewTabItem[];\n onTabChange: (event: OnTabChangeEventPayload) => void;\n}\n\nexport interface NativeTabsViewTabItem {\n options: NativeTabOptions;\n routeKey: string;\n name: string;\n contentRenderer: () => React.ReactNode;\n}\n\nexport const SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES = [\n 'auto',\n 'selected',\n 'labeled',\n 'unlabeled',\n] as const;\n\n/**\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\nexport type NativeTabsTabBarItemLabelVisibilityMode =\n (typeof SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES)[number];\n\nexport const SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS = [\n 'automatic',\n 'never',\n 'onScrollDown',\n 'onScrollUp',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior)\n *\n * @platform iOS 26\n */\nexport type NativeTabsTabBarMinimizeBehavior =\n (typeof SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS)[number];\n\nexport interface NativeTabTriggerProps {\n /**\n * The name of the route.\n *\n * This is required when used inside a Layout component.\n *\n * When used in a route it has no effect.\n */\n name?: string;\n /**\n * If true, the tab will be hidden from the tab bar.\n *\n * > **Note**: Marking a tab as `hidden` means it cannot be navigated to in any way.\n *\n * > **Note**: Dynamically hiding tabs will remount the navigator and the state will be reset.\n */\n hidden?: boolean;\n /**\n * Props passed to the underlying native tab screen implementation.\n * Use this to configure props not directly exposed by Expo Router, but available in `react-native-screens`.\n *\n * > **Note**: This will override any other props set by Expo Router and may lead to unexpected behavior.\n *\n * > **Note**: This is an unstable API and may change or be removed in minor versions.\n *\n * @platform android\n * @platform iOS\n */\n unstable_nativeProps?: NativeScreenProps;\n /**\n * If true, the tab will not pop stack to the root when selected again.\n *\n * @default false\n * @platform iOS\n */\n disablePopToTop?: boolean;\n /**\n * If true, the tab will not scroll to the top when selected again.\n * @default false\n *\n * @platform iOS\n */\n disableScrollToTop?: boolean;\n /**\n * The children of the trigger.\n *\n * Use `Icon`, `Label`, and `Badge` components to customize the tab.\n */\n children?: React.ReactNode;\n /**\n * System-provided tab bar item with predefined icon and title\n *\n * Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with\n * standard iOS styling and localized titles. Custom `icon` or `selectedIcon`\n * properties will override the system icon, but the system-defined title cannot\n * be customized.\n *\n * @see The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem).\n * @platform ios\n */\n role?: NativeTabsTabBarItemRole;\n /**\n * The default behavior differs between iOS and Android.\n *\n * On **Android**, the content of a native tabs screen is automatically wrapped in a `SafeAreaView`,\n * and the **bottom** inset is applied. Other insets must be handled manually.\n *\n * On **iOS**, the first scroll view nested inside a native tabs screen has\n * [automatic content inset adjustment](https://reactnative.dev/docs/scrollview#contentinsetadjustmentbehavior-ios) enabled\n *\n * When this property is set to `true`, automatic content inset adjustment is disabled for the screen\n * and must be managed manually. You can use `SafeAreaView` from `react-native-screens/experimental`\n * to handle safe area insets.\n *\n * @platform android\n * @platform ios\n */\n disableAutomaticContentInsets?: boolean;\n /**\n * The style applied to the content of the tab\n *\n * Note: Only certain style properties are supported.\n */\n contentStyle?: NativeTabOptions['contentStyle'];\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * When set on a trigger, it takes precedence over the value set on `NativeTabs`.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * Listeners for navigation events on this tab.\n *\n * Supported events:\n * - `tabPress` - called when this tab is pressed\n * - `focus` - called when this screen comes into focus\n * - `blur` - called when this screen loses focus\n *\n * @example\n * ```tsx\n * <NativeTabs.Trigger\n * name=\"home\"\n * listeners={{\n * tabPress: (e) => {\n * console.log('Home tab pressed');\n * },\n * }}\n * />\n * ```\n */\n listeners?:\n | ScreenListeners<NavigationState, EventMapBase>\n | ((prop: {\n route: RouteProp<ParamListBase, string>;\n }) => ScreenListeners<NavigationState, EventMapBase>);\n}\n\nconst SUPPORTED_TAB_BAR_ITEM_ROLES = [\n 'bookmarks',\n 'contacts',\n 'downloads',\n 'favorites',\n 'featured',\n 'history',\n 'more',\n 'mostRecent',\n 'mostViewed',\n 'recents',\n 'search',\n 'topRated',\n] as const;\n\nexport type NativeTabsTabBarItemRole = (typeof SUPPORTED_TAB_BAR_ITEM_ROLES)[number];\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.router",
|
|
5
5
|
"module": "expo.modules.router",
|
|
6
|
-
"version": "56.0
|
|
6
|
+
"version": "56.1.0",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.router-56.0.
|
|
28
|
-
"url": "expo.modules.router-56.0.
|
|
27
|
+
"name": "expo.modules.router-56.1.0.aar",
|
|
28
|
+
"url": "expo.modules.router-56.1.0.aar",
|
|
29
29
|
"size": 15835,
|
|
30
30
|
"sha512": "72b5be73401c4b0a8807373f01bd79e202212f07713d071019c24eb27227a4c8568d6148d0a48338f6955f9dbe713f56e7877d8e3fe0acec28dbb68533953d90",
|
|
31
31
|
"sha256": "7c41d508ab24d199ead0eb06525957cdd227a73925863865bf2956d48cb707ef",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
],
|
|
75
75
|
"files": [
|
|
76
76
|
{
|
|
77
|
-
"name": "expo.modules.router-56.0.
|
|
78
|
-
"url": "expo.modules.router-56.0.
|
|
77
|
+
"name": "expo.modules.router-56.1.0.aar",
|
|
78
|
+
"url": "expo.modules.router-56.1.0.aar",
|
|
79
79
|
"size": 15835,
|
|
80
80
|
"sha512": "72b5be73401c4b0a8807373f01bd79e202212f07713d071019c24eb27227a4c8568d6148d0a48338f6955f9dbe713f56e7877d8e3fe0acec28dbb68533953d90",
|
|
81
81
|
"sha256": "7c41d508ab24d199ead0eb06525957cdd227a73925863865bf2956d48cb707ef",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
},
|
|
95
95
|
"files": [
|
|
96
96
|
{
|
|
97
|
-
"name": "expo.modules.router-56.0
|
|
98
|
-
"url": "expo.modules.router-56.0
|
|
97
|
+
"name": "expo.modules.router-56.1.0-sources.jar",
|
|
98
|
+
"url": "expo.modules.router-56.1.0-sources.jar",
|
|
99
99
|
"size": 2326,
|
|
100
100
|
"sha512": "a1a1537b57bc0d66efbf2bdfd5f514684400b9598e549eaf53c528d1bf32ff42b7826e74fb6e115f8ec0490b9e06ffbb3c3efe9f2f703652c13291ef82b0fa03",
|
|
101
101
|
"sha256": "2add0f802e663eb9b5f90e086dca0e0e337a1442e15fb372a05945e01ee0d289",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
78da3843475949591ebb405d9d18f9b2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d2e848eb0744dcf93b799787b3a71393ec4215ef
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0c776cb50adff8b28c170428f74ae21eae74618a3f45c358bccbc3e52965b38f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e557b6f45d0733b2be8bbc9ffc65587577e686e3c8d8d9249f9a9cb08078e5951627a92cbb0fa84826f306fbefaa3b6f3034c92fbc4f6351249e376facd9fd2e
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>expo.modules.router</groupId>
|
|
11
11
|
<artifactId>expo.modules.router</artifactId>
|
|
12
|
-
<version>56.0
|
|
12
|
+
<version>56.1.0</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.router</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
37f4f0988b686f4e3fa0d5334bb0f8be
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a665a9fd0ad808f3c4823dcf66632048a3376ad6
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8bfca11a760b72751755bede92bcf1788d5eab9ccfbacfe8846b433f76f0b47d
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
39f93d8769264d6a822bd503946a677055944cb020ddae36399b4fca547ada22df0bc88ba8b371de30684076be04de440ae7c23f5d6581b0588cc6edeee91667
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>expo.modules.router</groupId>
|
|
4
4
|
<artifactId>expo.modules.router</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>56.0
|
|
7
|
-
<release>56.0
|
|
6
|
+
<latest>56.1.0</latest>
|
|
7
|
+
<release>56.1.0</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>56.0
|
|
9
|
+
<version>56.1.0</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260507183241</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
56fc98b2ec30e53a20f225ea2981b7f9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
07d2b94ae6b1779e1bf7ad430fa2287d5520d550
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4282dd3df171830f8e8af01055881e18d6cd2907479484cfc1ac0629e8706b52
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
43e59afbbcbd931b1f077b8a23ebc4e91a8c09f5a4aad4ed4a439d9da2ec4634838bb9da47169f5878ff2b1c8455fce9b4a2e04b4916a60c6bfae663ff280442
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-router",
|
|
3
|
-
"version": "56.0
|
|
3
|
+
"version": "56.1.0",
|
|
4
4
|
"description": "Expo Router is a file-based router for React Native and web applications.",
|
|
5
5
|
"author": "650 Industries, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -78,11 +78,11 @@
|
|
|
78
78
|
"expo"
|
|
79
79
|
],
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@expo/log-box": "56.0.
|
|
81
|
+
"@expo/log-box": "56.0.5",
|
|
82
82
|
"@expo/metro-runtime": "^56.0.4",
|
|
83
83
|
"@testing-library/react-native": ">= 13.2.0",
|
|
84
84
|
"expo": "*",
|
|
85
|
-
"expo-constants": "^56.0.
|
|
85
|
+
"expo-constants": "^56.0.5",
|
|
86
86
|
"expo-linking": "^56.0.3",
|
|
87
87
|
"react": "*",
|
|
88
88
|
"react-dom": "*",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"react-native-gesture-handler": "*",
|
|
91
91
|
"react-native-reanimated": "*",
|
|
92
92
|
"react-native-safe-area-context": ">= 5.4.0",
|
|
93
|
-
"react-native-screens": "4.25.0-beta.
|
|
93
|
+
"react-native-screens": "4.25.0-beta.3",
|
|
94
94
|
"react-native-web": "*",
|
|
95
95
|
"react-server-dom-webpack": "~19.0.4 || ~19.1.5 || ~19.2.4"
|
|
96
96
|
},
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
|
+
"@jest/globals": "^29.7.0",
|
|
118
119
|
"@testing-library/dom": "^10.4.0",
|
|
119
120
|
"@testing-library/react": "^16.3.0",
|
|
120
121
|
"@testing-library/react-native": "^13.3.0",
|
|
@@ -131,17 +132,16 @@
|
|
|
131
132
|
"react-native-gesture-handler": "~2.30.0",
|
|
132
133
|
"react-native-reanimated": "~4.3.0",
|
|
133
134
|
"react-native-safe-area-context": "~5.6.2",
|
|
134
|
-
"react-native-screens": "4.25.0-beta.
|
|
135
|
+
"react-native-screens": "4.25.0-beta.3",
|
|
135
136
|
"react-native-web": "~0.21.0",
|
|
136
137
|
"react-server-dom-webpack": "~19.0.4",
|
|
137
138
|
"tsd": "^0.33.0",
|
|
138
|
-
"expo": "56.0.0-preview.
|
|
139
|
+
"expo": "56.0.0-preview.6"
|
|
139
140
|
},
|
|
140
141
|
"dependencies": {
|
|
141
142
|
"@expo/metro-runtime": "^56.0.4",
|
|
142
143
|
"@expo/schema-utils": "^56.0.0",
|
|
143
|
-
"@expo/ui": "^56.0.
|
|
144
|
-
"@jest/globals": "^29.7.0",
|
|
144
|
+
"@expo/ui": "^56.0.3",
|
|
145
145
|
"@radix-ui/react-slot": "^1.2.0",
|
|
146
146
|
"@radix-ui/react-tabs": "^1.1.12",
|
|
147
147
|
"@react-native-masked-view/masked-view": "^0.3.2",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"expo-glass-effect": "^56.0.4",
|
|
155
155
|
"expo-image": "^56.0.4",
|
|
156
156
|
"expo-server": "^56.0.0",
|
|
157
|
-
"expo-symbols": "^56.0.
|
|
157
|
+
"expo-symbols": "^56.0.5",
|
|
158
158
|
"fast-deep-equal": "^3.1.3",
|
|
159
159
|
"invariant": "^2.2.4",
|
|
160
160
|
"nanoid": "^3.3.8",
|
|
@@ -162,13 +162,13 @@
|
|
|
162
162
|
"react-fast-compare": "^3.2.2",
|
|
163
163
|
"react-is": "^19.1.0",
|
|
164
164
|
"react-native-drawer-layout": "^4.2.2",
|
|
165
|
-
"react-native-screens": "4.25.0-beta.
|
|
165
|
+
"react-native-screens": "4.25.0-beta.3",
|
|
166
166
|
"server-only": "^0.0.1",
|
|
167
167
|
"sf-symbols-typescript": "^2.1.0",
|
|
168
168
|
"shallowequal": "^1.1.0",
|
|
169
169
|
"vaul": "^1.1.2"
|
|
170
170
|
},
|
|
171
|
-
"gitHead": "
|
|
171
|
+
"gitHead": "d7b4e5edff4bf2e619d2c2f16d158798c6d592ef",
|
|
172
172
|
"scripts": {
|
|
173
173
|
"build": "node ./scripts/build.js",
|
|
174
174
|
"clean": "expo-module clean",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
64575170974b99a9f28c79b2d92d126e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
25d87570dc979af07591f3c1d878b23d76263c4e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fb130808cc9a6c1a8f0305b3643c59af716e20ac187fa6debbce6d0068b5ac05
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
aca3c4dc1220622357032f89d178098d2202336aee94643d5373ed30f170bbff0ba463ad7e4cca69a373b499a8002a0f6288a2dcf76d81d4ce91eb27ae89ba59
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0026603e97125023e319bce6fef6544f
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
22f35eb73102e4d7be57e748354d0d59944ab012
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
dad9cb2cece3992274d2097ef365e43a391d6384dfe8e112ea2e909871f43641
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
318b008d38c95ca417c3a5808e11b09427ba55d5346127a464199a25606643b767f1710bf71c61a784af2337efdce01553398e9cc2713285d1cffe7a38dac18f
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|